survey-core 1.9.136 → 1.9.138

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 (257) hide show
  1. package/defaultV2.css +353 -9
  2. package/defaultV2.css.map +1 -1
  3. package/defaultV2.fontless.css +353 -9
  4. package/defaultV2.fontless.css.map +1 -1
  5. package/defaultV2.fontless.min.css +2 -2
  6. package/defaultV2.min.css +2 -2
  7. package/i18n/arabic.js +1 -1
  8. package/i18n/arabic.min.js +1 -1
  9. package/i18n/basque.js +1 -1
  10. package/i18n/basque.min.js +1 -1
  11. package/i18n/bulgarian.js +1 -1
  12. package/i18n/bulgarian.min.js +1 -1
  13. package/i18n/catalan.js +1 -1
  14. package/i18n/catalan.min.js +1 -1
  15. package/i18n/croatian.js +1 -1
  16. package/i18n/croatian.min.js +1 -1
  17. package/i18n/czech.js +1 -1
  18. package/i18n/czech.min.js +1 -1
  19. package/i18n/danish.js +1 -1
  20. package/i18n/danish.min.js +1 -1
  21. package/i18n/dutch.js +1 -1
  22. package/i18n/dutch.min.js +1 -1
  23. package/i18n/english.js +1 -1
  24. package/i18n/english.min.js +1 -1
  25. package/i18n/estonian.js +1 -1
  26. package/i18n/estonian.min.js +1 -1
  27. package/i18n/finnish.js +1 -1
  28. package/i18n/finnish.min.js +1 -1
  29. package/i18n/french.js +1 -1
  30. package/i18n/french.min.js +1 -1
  31. package/i18n/georgian.js +1 -1
  32. package/i18n/georgian.min.js +1 -1
  33. package/i18n/german.js +2 -2
  34. package/i18n/german.js.map +1 -1
  35. package/i18n/german.min.js +2 -2
  36. package/i18n/greek.js +1 -1
  37. package/i18n/greek.min.js +1 -1
  38. package/i18n/hebrew.js +2 -2
  39. package/i18n/hebrew.js.map +1 -1
  40. package/i18n/hebrew.min.js +2 -2
  41. package/i18n/hindi.js +1 -1
  42. package/i18n/hindi.min.js +1 -1
  43. package/i18n/hungarian.js +1 -1
  44. package/i18n/hungarian.min.js +1 -1
  45. package/i18n/icelandic.js +1 -1
  46. package/i18n/icelandic.min.js +1 -1
  47. package/i18n/index.js +3 -3
  48. package/i18n/index.js.map +1 -1
  49. package/i18n/index.min.js +2 -2
  50. package/i18n/indonesian.js +1 -1
  51. package/i18n/indonesian.min.js +1 -1
  52. package/i18n/italian.js +1 -1
  53. package/i18n/italian.min.js +1 -1
  54. package/i18n/japanese.js +1 -1
  55. package/i18n/japanese.min.js +1 -1
  56. package/i18n/kazakh.js +1 -1
  57. package/i18n/kazakh.min.js +1 -1
  58. package/i18n/korean.js +1 -1
  59. package/i18n/korean.min.js +1 -1
  60. package/i18n/latvian.js +1 -1
  61. package/i18n/latvian.min.js +1 -1
  62. package/i18n/lithuanian.js +1 -1
  63. package/i18n/lithuanian.min.js +1 -1
  64. package/i18n/macedonian.js +1 -1
  65. package/i18n/macedonian.min.js +1 -1
  66. package/i18n/malay.js +1 -1
  67. package/i18n/malay.min.js +1 -1
  68. package/i18n/nl-BE.js +1 -1
  69. package/i18n/nl-BE.min.js +1 -1
  70. package/i18n/norwegian.js +1 -1
  71. package/i18n/norwegian.min.js +1 -1
  72. package/i18n/persian.js +1 -1
  73. package/i18n/persian.min.js +1 -1
  74. package/i18n/polish.js +1 -1
  75. package/i18n/polish.min.js +1 -1
  76. package/i18n/portuguese-br.js +1 -1
  77. package/i18n/portuguese-br.min.js +1 -1
  78. package/i18n/portuguese.js +1 -1
  79. package/i18n/portuguese.min.js +1 -1
  80. package/i18n/romanian.js +1 -1
  81. package/i18n/romanian.min.js +1 -1
  82. package/i18n/russian.js +1 -1
  83. package/i18n/russian.min.js +1 -1
  84. package/i18n/serbian.js +1 -1
  85. package/i18n/serbian.min.js +1 -1
  86. package/i18n/simplified-chinese.js +1 -1
  87. package/i18n/simplified-chinese.min.js +1 -1
  88. package/i18n/slovak.js +1 -1
  89. package/i18n/slovak.min.js +1 -1
  90. package/i18n/spanish.js +1 -1
  91. package/i18n/spanish.min.js +1 -1
  92. package/i18n/swahili.js +1 -1
  93. package/i18n/swahili.min.js +1 -1
  94. package/i18n/swedish.js +1 -1
  95. package/i18n/swedish.min.js +1 -1
  96. package/i18n/tajik.js +1 -1
  97. package/i18n/tajik.min.js +1 -1
  98. package/i18n/telugu.js +1 -1
  99. package/i18n/telugu.min.js +1 -1
  100. package/i18n/thai.js +1 -1
  101. package/i18n/thai.min.js +1 -1
  102. package/i18n/traditional-chinese.js +1 -1
  103. package/i18n/traditional-chinese.min.js +1 -1
  104. package/i18n/turkish.js +1 -1
  105. package/i18n/turkish.min.js +1 -1
  106. package/i18n/ukrainian.js +1 -1
  107. package/i18n/ukrainian.min.js +1 -1
  108. package/i18n/urdu.js +1 -1
  109. package/i18n/urdu.min.js +1 -1
  110. package/i18n/vietnamese.js +1 -1
  111. package/i18n/vietnamese.min.js +1 -1
  112. package/i18n/welsh.js +1 -1
  113. package/i18n/welsh.min.js +1 -1
  114. package/modern.css +187 -1
  115. package/modern.css.map +1 -1
  116. package/modern.fontless.css +187 -1
  117. package/modern.fontless.css.map +1 -1
  118. package/modern.fontless.min.css +2 -2
  119. package/modern.min.css +2 -2
  120. package/package.json +1 -1
  121. package/plugins/bootstrap-integration.js +1 -1
  122. package/plugins/bootstrap-integration.min.js +1 -1
  123. package/plugins/bootstrap-material-integration.js +1 -1
  124. package/plugins/bootstrap-material-integration.min.js +1 -1
  125. package/survey.core.js +1218 -233
  126. package/survey.core.js.map +1 -1
  127. package/survey.core.min.js +3 -3
  128. package/survey.css +1 -1
  129. package/survey.css.map +1 -1
  130. package/survey.i18n.js +3 -3
  131. package/survey.i18n.js.map +1 -1
  132. package/survey.i18n.min.js +2 -2
  133. package/survey.min.css +1 -1
  134. package/themes/borderless-dark-panelless.js +1 -1
  135. package/themes/borderless-dark-panelless.min.js +1 -1
  136. package/themes/borderless-dark.js +1 -1
  137. package/themes/borderless-dark.min.js +1 -1
  138. package/themes/borderless-light-panelless..js +1 -1
  139. package/themes/borderless-light-panelless..min.js +1 -1
  140. package/themes/borderless-light.js +1 -1
  141. package/themes/borderless-light.min.js +1 -1
  142. package/themes/contrast-dark-panelless.js +1 -1
  143. package/themes/contrast-dark-panelless.min.js +1 -1
  144. package/themes/contrast-dark.js +1 -1
  145. package/themes/contrast-dark.min.js +1 -1
  146. package/themes/contrast-light-panelless.js +1 -1
  147. package/themes/contrast-light-panelless.min.js +1 -1
  148. package/themes/contrast-light.js +1 -1
  149. package/themes/contrast-light.min.js +1 -1
  150. package/themes/default-dark-panelless.js +1 -1
  151. package/themes/default-dark-panelless.min.js +1 -1
  152. package/themes/default-dark.js +1 -1
  153. package/themes/default-dark.min.js +1 -1
  154. package/themes/default-light-panelless.js +1 -1
  155. package/themes/default-light-panelless.min.js +1 -1
  156. package/themes/default-light.js +1 -1
  157. package/themes/default-light.min.js +1 -1
  158. package/themes/doubleborder-dark-panelless.js +1 -1
  159. package/themes/doubleborder-dark-panelless.min.js +1 -1
  160. package/themes/doubleborder-dark.js +1 -1
  161. package/themes/doubleborder-dark.min.js +1 -1
  162. package/themes/doubleborder-light-panelles.js +1 -1
  163. package/themes/doubleborder-light-panelles.min.js +1 -1
  164. package/themes/doubleborder-light.js +1 -1
  165. package/themes/doubleborder-light.min.js +1 -1
  166. package/themes/flat-dark-panelless.js +1 -1
  167. package/themes/flat-dark-panelless.min.js +1 -1
  168. package/themes/flat-dark.js +1 -1
  169. package/themes/flat-dark.min.js +1 -1
  170. package/themes/flat-light-panelless.js +1 -1
  171. package/themes/flat-light-panelless.min.js +1 -1
  172. package/themes/flat-light.js +1 -1
  173. package/themes/flat-light.min.js +1 -1
  174. package/themes/index.js +1 -1
  175. package/themes/index.min.js +1 -1
  176. package/themes/layered-dark-panelless.js +1 -1
  177. package/themes/layered-dark-panelless.min.js +1 -1
  178. package/themes/layered-dark.js +1 -1
  179. package/themes/layered-dark.min.js +1 -1
  180. package/themes/layered-light-panelless.js +1 -1
  181. package/themes/layered-light-panelless.min.js +1 -1
  182. package/themes/layered-light.js +1 -1
  183. package/themes/layered-light.min.js +1 -1
  184. package/themes/plain-dark-panelless.js +1 -1
  185. package/themes/plain-dark-panelless.min.js +1 -1
  186. package/themes/plain-dark.js +1 -1
  187. package/themes/plain-dark.min.js +1 -1
  188. package/themes/plain-light-panelless.js +1 -1
  189. package/themes/plain-light-panelless.min.js +1 -1
  190. package/themes/plain-light.js +1 -1
  191. package/themes/plain-light.min.js +1 -1
  192. package/themes/sharp-dark-panelless.js +1 -1
  193. package/themes/sharp-dark-panelless.min.js +1 -1
  194. package/themes/sharp-dark.js +1 -1
  195. package/themes/sharp-dark.min.js +1 -1
  196. package/themes/sharp-light-panelless.js +1 -1
  197. package/themes/sharp-light-panelless.min.js +1 -1
  198. package/themes/sharp-light.js +1 -1
  199. package/themes/sharp-light.min.js +1 -1
  200. package/themes/solid-dark-panelless.js +1 -1
  201. package/themes/solid-dark-panelless.min.js +1 -1
  202. package/themes/solid-dark.js +1 -1
  203. package/themes/solid-dark.min.js +1 -1
  204. package/themes/solid-light-panelless.js +1 -1
  205. package/themes/solid-light-panelless.min.js +1 -1
  206. package/themes/solid-light.js +1 -1
  207. package/themes/solid-light.min.js +1 -1
  208. package/themes/three-dimensional-dark-panelless.js +1 -1
  209. package/themes/three-dimensional-dark-panelless.min.js +1 -1
  210. package/themes/three-dimensional-dark.js +1 -1
  211. package/themes/three-dimensional-dark.min.js +1 -1
  212. package/themes/three-dimensional-light-panelless.js +1 -1
  213. package/themes/three-dimensional-light-panelless.min.js +1 -1
  214. package/themes/three-dimensional-light.js +1 -1
  215. package/themes/three-dimensional-light.min.js +1 -1
  216. package/ts3.4/typings/base.d.ts +4 -4
  217. package/ts3.4/typings/defaultCss/defaultV2Css.d.ts +14 -0
  218. package/ts3.4/typings/dragdrop/matrix-rows.d.ts +2 -1
  219. package/ts3.4/typings/dragdrop/ranking-choices.d.ts +1 -1
  220. package/ts3.4/typings/dragdrop/ranking-select-to-rank.d.ts +6 -3
  221. package/ts3.4/typings/entries/core-wo-model.d.ts +1 -0
  222. package/ts3.4/typings/mask/input_element_adapter.d.ts +1 -0
  223. package/ts3.4/typings/mask/mask_datetime.d.ts +12 -2
  224. package/ts3.4/typings/mask/mask_numeric.d.ts +1 -1
  225. package/ts3.4/typings/panel.d.ts +17 -4
  226. package/ts3.4/typings/popup-view-model.d.ts +14 -5
  227. package/ts3.4/typings/question_custom.d.ts +11 -0
  228. package/ts3.4/typings/question_imagepicker.d.ts +36 -6
  229. package/ts3.4/typings/question_matrixdropdowncolumn.d.ts +1 -2
  230. package/ts3.4/typings/question_matrixdynamic.d.ts +1 -0
  231. package/ts3.4/typings/question_multipletext.d.ts +67 -20
  232. package/ts3.4/typings/question_ranking.d.ts +12 -3
  233. package/ts3.4/typings/question_text.d.ts +2 -0
  234. package/ts3.4/typings/survey-element.d.ts +12 -1
  235. package/ts3.4/typings/utils/animation.d.ts +54 -0
  236. package/ts3.4/typings/utils/taskmanager.d.ts +28 -0
  237. package/typings/base.d.ts +4 -4
  238. package/typings/defaultCss/defaultV2Css.d.ts +14 -0
  239. package/typings/dragdrop/matrix-rows.d.ts +2 -1
  240. package/typings/dragdrop/ranking-choices.d.ts +1 -1
  241. package/typings/dragdrop/ranking-select-to-rank.d.ts +6 -3
  242. package/typings/entries/core-wo-model.d.ts +1 -0
  243. package/typings/mask/input_element_adapter.d.ts +1 -0
  244. package/typings/mask/mask_datetime.d.ts +12 -2
  245. package/typings/mask/mask_numeric.d.ts +1 -1
  246. package/typings/panel.d.ts +18 -3
  247. package/typings/popup-view-model.d.ts +15 -5
  248. package/typings/question_custom.d.ts +11 -0
  249. package/typings/question_imagepicker.d.ts +36 -6
  250. package/typings/question_matrixdropdowncolumn.d.ts +1 -2
  251. package/typings/question_matrixdynamic.d.ts +2 -0
  252. package/typings/question_multipletext.d.ts +70 -20
  253. package/typings/question_ranking.d.ts +12 -1
  254. package/typings/question_text.d.ts +2 -0
  255. package/typings/survey-element.d.ts +15 -1
  256. package/typings/utils/animation.d.ts +50 -0
  257. package/typings/utils/taskmanager.d.ts +28 -0
package/survey.core.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.136
2
+ * surveyjs - Survey JavaScript library v1.9.138
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
  */
@@ -2222,6 +2222,8 @@ var Base = /** @class */ (function () {
2222
2222
  * @param val A new value for the property.
2223
2223
  */
2224
2224
  Base.prototype.setPropertyValue = function (name, val) {
2225
+ if (name) {
2226
+ }
2225
2227
  if (!this.isLoadingFromJson) {
2226
2228
  var prop = this.getPropertyByName(name);
2227
2229
  if (!!prop) {
@@ -2283,7 +2285,7 @@ var Base = /** @class */ (function () {
2283
2285
  return;
2284
2286
  for (var i = 0; i < this.onPropChangeFunctions.length; i++) {
2285
2287
  if (this.onPropChangeFunctions[i].name == name)
2286
- this.onPropChangeFunctions[i].func(newValue);
2288
+ this.onPropChangeFunctions[i].func(newValue, arrayChanges);
2287
2289
  }
2288
2290
  };
2289
2291
  Base.prototype.onBindingChanged = function (oldValue, newValue) {
@@ -5419,9 +5421,13 @@ var defaultV2Css = {
5419
5421
  next: "sd-navigation__next-btn",
5420
5422
  start: "sd-navigation__start-btn",
5421
5423
  preview: "sd-navigation__preview-btn",
5422
- edit: "",
5424
+ edit: "sd-btn sd-btn--small",
5423
5425
  },
5424
5426
  panel: {
5427
+ contentFadeIn: "sd-element__content--fade-in",
5428
+ contentFadeOut: "sd-element__content--fade-out",
5429
+ fadeIn: "sd-element-wrapper--fade-in",
5430
+ fadeOut: "sd-element-wrapper--fade-out",
5425
5431
  asPage: "sd-panel--as-page",
5426
5432
  number: "sd-element__num",
5427
5433
  title: "sd-title sd-element__title sd-panel__title",
@@ -5436,7 +5442,7 @@ var defaultV2Css = {
5436
5442
  description: "sd-description sd-panel__description",
5437
5443
  container: "sd-element sd-element--complex sd-panel sd-row__panel",
5438
5444
  withFrame: "sd-element--with-frame",
5439
- content: "sd-panel__content",
5445
+ content: "sd-element__content sd-panel__content",
5440
5446
  icon: "sd-panel__icon",
5441
5447
  iconExpanded: "sd-panel__icon--expanded",
5442
5448
  footer: "sd-panel__footer",
@@ -5444,6 +5450,8 @@ var defaultV2Css = {
5444
5450
  header: "sd-panel__header sd-element__header sd-element__header--location-top",
5445
5451
  collapsed: "sd-element--collapsed",
5446
5452
  expanded: "sd-element--expanded",
5453
+ expandable: "sd-element--expandable",
5454
+ expandableAnimating: "sd-elemenet--expandable--animating",
5447
5455
  nested: "sd-element--nested sd-element--nested-with-borders",
5448
5456
  invisible: "sd-element--invisible",
5449
5457
  navigationButton: "",
@@ -5531,8 +5539,14 @@ var defaultV2Css = {
5531
5539
  row: "sd-row sd-clearfix",
5532
5540
  rowMultiple: "sd-row--multiple",
5533
5541
  rowCompact: "sd-row--compact",
5542
+ rowFadeIn: "sd-row--fade-in",
5543
+ rowFadeOut: "sd-row--fade-out",
5534
5544
  pageRow: "sd-page__row",
5535
5545
  question: {
5546
+ contentFadeIn: "sd-element__content--fade-in",
5547
+ contentFadeOut: "sd-element__content--fade-out",
5548
+ fadeIn: "sd-element-wrapper--fade-in",
5549
+ fadeOut: "sd-element-wrapper--fade-out",
5536
5550
  mainRoot: "sd-element sd-question sd-row__question",
5537
5551
  flowRoot: "sd-element sd-question sd-row__question sd-row__question--flow",
5538
5552
  withFrame: "sd-element--with-frame",
@@ -5542,7 +5556,7 @@ var defaultV2Css = {
5542
5556
  headerLeft: "sd-question__header--location--left",
5543
5557
  headerTop: "sd-question__header--location-top sd-element__header--location-top",
5544
5558
  headerBottom: "sd-question__header--location--bottom",
5545
- content: "sd-question__content",
5559
+ content: "sd-element__content sd-question__content",
5546
5560
  contentSupportContainerQueries: "sd-question__content--support-container-queries",
5547
5561
  contentLeft: "sd-question__content--left",
5548
5562
  titleNumInline: "sd-element__title--num-inline",
@@ -5575,6 +5589,8 @@ var defaultV2Css = {
5575
5589
  hasErrorTop: "sd-question--error-top",
5576
5590
  hasErrorBottom: "sd-question--error-bottom",
5577
5591
  collapsed: "sd-element--collapsed",
5592
+ expandable: "sd-element--expandable",
5593
+ expandableAnimating: "sd-elemenet--expandable--animating",
5578
5594
  expanded: "sd-element--expanded",
5579
5595
  nested: "sd-element--nested",
5580
5596
  invisible: "sd-element--invisible",
@@ -6771,8 +6787,6 @@ var DragDropChoices = /** @class */ (function (_super) {
6771
6787
  DragDropChoices.prototype.afterDragOver = function (dropTargetNode) {
6772
6788
  if (this.isDropTargetDoesntChanged(this.isBottom))
6773
6789
  return;
6774
- if (this.dropTarget === this.draggedElement)
6775
- return;
6776
6790
  var choices = this.getVisibleChoices();
6777
6791
  var dropTargetIndex = choices.indexOf(this.dropTarget);
6778
6792
  var draggedElementIndex = choices.indexOf(this.draggedElement);
@@ -6919,7 +6933,7 @@ var DragDropCore = /** @class */ (function () {
6919
6933
  return (this.dropTarget === this.prevDropTarget && newIsBottom === this.isBottom);
6920
6934
  };
6921
6935
  DragDropCore.prototype.getShortcutText = function (draggedElement) {
6922
- return draggedElement.shortcutText;
6936
+ return draggedElement === null || draggedElement === void 0 ? void 0 : draggedElement.shortcutText;
6923
6937
  };
6924
6938
  DragDropCore.prototype.createDraggedElementShortcut = function (text, draggedElementNode, event) {
6925
6939
  var draggedElementShortcut = _global_variables_utils__WEBPACK_IMPORTED_MODULE_2__["DomDocumentHelper"].createElement("div");
@@ -6997,7 +7011,9 @@ var DragDropCore = /** @class */ (function () {
6997
7011
  return;
6998
7012
  this.isBottom = null; //TODO need for property change trigger with guarantee but it would be better not to watch on isBottom property but have some event like onValidTargetDragOver
6999
7013
  this.isBottom = isBottom;
7000
- this.afterDragOver(dropTargetNode);
7014
+ if (this.draggedElement != this.dropTarget) {
7015
+ this.afterDragOver(dropTargetNode);
7016
+ }
7001
7017
  this.prevDropTarget = this.dropTarget;
7002
7018
  };
7003
7019
  DragDropCore.prototype.drop = function () {
@@ -7454,8 +7470,12 @@ var DragDropMatrixRows = /** @class */ (function (_super) {
7454
7470
  dropTargetRenderedRow = matrix.renderedTable.rows.filter(function (renderedRow) { return renderedRow.row && renderedRow.row.id === dataAttributeValue; })[0];
7455
7471
  return dropTargetRenderedRow.row;
7456
7472
  };
7473
+ DragDropMatrixRows.prototype.canInsertIntoThisRow = function (row) {
7474
+ var lockedRows = this.parentElement.lockedRowCount;
7475
+ return lockedRows <= 0 || row.rowIndex > lockedRows;
7476
+ };
7457
7477
  DragDropMatrixRows.prototype.isDropTargetValid = function (dropTarget, dropTargetNode) {
7458
- return true;
7478
+ return this.canInsertIntoThisRow(dropTarget);
7459
7479
  };
7460
7480
  DragDropMatrixRows.prototype.calculateIsBottom = function (clientY) {
7461
7481
  var rendreredRows = this.parentElement.renderedTable.rows;
@@ -7466,8 +7486,6 @@ var DragDropMatrixRows = /** @class */ (function (_super) {
7466
7486
  var _this = this;
7467
7487
  if (this.isDropTargetDoesntChanged(this.isBottom))
7468
7488
  return;
7469
- if (this.dropTarget === this.draggedElement)
7470
- return;
7471
7489
  var dropTargetIndex;
7472
7490
  var draggedElementIndex;
7473
7491
  var draggedRenderedRow;
@@ -7575,10 +7593,6 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
7575
7593
  var node = _this.domAdapter.draggedElementShortcut.querySelector(".sv-ranking-item");
7576
7594
  node.style.cursor = "not-allowed";
7577
7595
  };
7578
- _this.doDrop = function () {
7579
- _this.parentElement.setValue();
7580
- return _this.parentElement;
7581
- };
7582
7596
  return _this;
7583
7597
  }
7584
7598
  Object.defineProperty(DragDropRankingChoices.prototype, "draggedElementType", {
@@ -7681,6 +7695,10 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
7681
7695
  this.parentElement.currentDropTarget = this.draggedElement;
7682
7696
  _super.prototype.ghostPositionChanged.call(this);
7683
7697
  };
7698
+ DragDropRankingChoices.prototype.doDrop = function () {
7699
+ this.parentElement.setValue();
7700
+ return this.parentElement;
7701
+ };
7684
7702
  DragDropRankingChoices.prototype.clear = function () {
7685
7703
  if (!!this.parentElement) {
7686
7704
  this.parentElement.dropTargetNodeMove = null;
@@ -7705,7 +7723,8 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
7705
7723
  "use strict";
7706
7724
  __webpack_require__.r(__webpack_exports__);
7707
7725
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragDropRankingSelectToRank", function() { return DragDropRankingSelectToRank; });
7708
- /* harmony import */ var _ranking_choices__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ranking-choices */ "./src/dragdrop/ranking-choices.ts");
7726
+ /* harmony import */ var _itemvalue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../itemvalue */ "./src/itemvalue.ts");
7727
+ /* harmony import */ var _ranking_choices__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ranking-choices */ "./src/dragdrop/ranking-choices.ts");
7709
7728
  var __extends = (undefined && undefined.__extends) || (function () {
7710
7729
  var extendStatics = function (d, b) {
7711
7730
  extendStatics = Object.setPrototypeOf ||
@@ -7722,10 +7741,37 @@ var __extends = (undefined && undefined.__extends) || (function () {
7722
7741
  };
7723
7742
  })();
7724
7743
 
7744
+
7725
7745
  var DragDropRankingSelectToRank = /** @class */ (function (_super) {
7726
7746
  __extends(DragDropRankingSelectToRank, _super);
7727
7747
  function DragDropRankingSelectToRank() {
7728
- return _super !== null && _super.apply(this, arguments) || this;
7748
+ var _this = _super !== null && _super.apply(this, arguments) || this;
7749
+ _this.selectToRank = function (questionModel, fromIndex, toIndex) {
7750
+ var rankingChoices = [].concat(questionModel.rankingChoices);
7751
+ var unRankingChoices = questionModel.unRankingChoices;
7752
+ var item = unRankingChoices[fromIndex];
7753
+ rankingChoices.splice(toIndex, 0, item);
7754
+ _this.updateChoices(questionModel, rankingChoices);
7755
+ };
7756
+ _this.unselectFromRank = function (questionModel, fromIndex, toIndex) {
7757
+ var rankingChoices = [].concat(questionModel.rankingChoices);
7758
+ rankingChoices.splice(fromIndex, 1);
7759
+ _this.updateChoices(questionModel, rankingChoices);
7760
+ };
7761
+ _this.reorderRankedItem = function (questionModel, fromIndex, toIndex, dropTargetNode) {
7762
+ var rankingChoices = questionModel.rankingChoices;
7763
+ var item = rankingChoices[fromIndex];
7764
+ if (fromIndex == toIndex)
7765
+ return;
7766
+ questionModel.isValueSetByUser = true;
7767
+ rankingChoices.splice(fromIndex, 1);
7768
+ rankingChoices.splice(toIndex, 0, item);
7769
+ questionModel.setPropertyValue("rankingChoices", rankingChoices);
7770
+ if (dropTargetNode) {
7771
+ _this.doUIEffects(dropTargetNode, fromIndex, toIndex);
7772
+ }
7773
+ };
7774
+ return _this;
7729
7775
  }
7730
7776
  DragDropRankingSelectToRank.prototype.findDropTargetNodeByDragOverNode = function (dragOverNode) {
7731
7777
  if (dragOverNode.dataset.ranking === "from-container" || dragOverNode.dataset.ranking === "to-container") {
@@ -7779,18 +7825,34 @@ var DragDropRankingSelectToRank = /** @class */ (function (_super) {
7779
7825
  DragDropRankingSelectToRank.prototype.doRankBetween = function (dropTargetNode, fromChoicesArray, toChoicesArray, rankFunction) {
7780
7826
  var questionModel = this.parentElement;
7781
7827
  var _a = this.getIndixies(questionModel, fromChoicesArray, toChoicesArray), fromIndex = _a.fromIndex, toIndex = _a.toIndex;
7782
- rankFunction(questionModel, fromIndex, toIndex);
7783
- this.doUIEffects(dropTargetNode, fromIndex, toIndex);
7828
+ rankFunction(questionModel, fromIndex, toIndex, dropTargetNode);
7784
7829
  };
7785
7830
  DragDropRankingSelectToRank.prototype.getIndixies = function (model, fromChoicesArray, toChoicesArray) {
7786
7831
  var fromIndex = fromChoicesArray.indexOf(this.draggedElement);
7787
7832
  var toIndex = toChoicesArray.indexOf(this.dropTarget);
7788
7833
  if (toIndex === -1) {
7789
7834
  var length_1 = model.value.length;
7790
- toIndex = fromChoicesArray === toChoicesArray ? length_1 - 1 : length_1;
7835
+ toIndex = length_1;
7836
+ }
7837
+ else if (fromChoicesArray == toChoicesArray) {
7838
+ if (!this.isBottom && fromIndex < toIndex)
7839
+ toIndex--;
7840
+ if (this.isBottom && fromIndex > toIndex)
7841
+ toIndex++;
7842
+ }
7843
+ else if (fromChoicesArray != toChoicesArray) {
7844
+ if (this.isBottom)
7845
+ toIndex++;
7791
7846
  }
7792
7847
  return { fromIndex: fromIndex, toIndex: toIndex };
7793
7848
  };
7849
+ DragDropRankingSelectToRank.prototype.calculateIsBottom = function (clientY, dropTargetNode) {
7850
+ if (this.dropTarget instanceof _itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"] && this.draggedElement !== this.dropTarget) {
7851
+ var rect = dropTargetNode.getBoundingClientRect();
7852
+ return clientY >= rect.y + rect.height / 2;
7853
+ }
7854
+ return _super.prototype.calculateIsBottom.call(this, clientY);
7855
+ };
7794
7856
  DragDropRankingSelectToRank.prototype.doUIEffects = function (dropTargetNode, fromIndex, toIndex) {
7795
7857
  var questionModel = this.parentElement;
7796
7858
  var isDropToEmptyRankedContainer = this.dropTarget === "to-container" && questionModel.isEmpty();
@@ -7839,30 +7901,21 @@ var DragDropRankingSelectToRank = /** @class */ (function (_super) {
7839
7901
  enumerable: false,
7840
7902
  configurable: true
7841
7903
  });
7842
- DragDropRankingSelectToRank.prototype.selectToRank = function (questionModel, fromIndex, toIndex) {
7843
- var rankingChoices = questionModel.rankingChoices;
7844
- var unRankingChoices = questionModel.unRankingChoices;
7845
- var item = unRankingChoices[fromIndex];
7904
+ DragDropRankingSelectToRank.prototype.updateChoices = function (questionModel, rankingChoices) {
7846
7905
  questionModel.isValueSetByUser = true;
7847
- rankingChoices.splice(toIndex, 0, item);
7848
- questionModel.setPropertyValue("rankingChoices", rankingChoices);
7906
+ questionModel.rankingChoices = rankingChoices;
7907
+ questionModel.updateUnRankingChoices(rankingChoices);
7849
7908
  };
7850
- DragDropRankingSelectToRank.prototype.unselectFromRank = function (questionModel, fromIndex, toIndex) {
7851
- var rankingChoices = questionModel.rankingChoices;
7852
- questionModel.isValueSetByUser = true;
7853
- rankingChoices.splice(fromIndex, 1);
7854
- questionModel.setPropertyValue("rankingChoices", rankingChoices);
7855
- };
7856
- DragDropRankingSelectToRank.prototype.reorderRankedItem = function (questionModel, fromIndex, toIndex) {
7857
- var rankingChoices = questionModel.rankingChoices;
7858
- var item = rankingChoices[fromIndex];
7859
- questionModel.isValueSetByUser = true;
7860
- rankingChoices.splice(fromIndex, 1);
7861
- rankingChoices.splice(toIndex, 0, item);
7862
- questionModel.setPropertyValue("rankingChoices", rankingChoices);
7909
+ DragDropRankingSelectToRank.prototype.clear = function () {
7910
+ var questionModel = this.parentElement;
7911
+ if (!!questionModel) {
7912
+ questionModel.rankingChoicesAnimation.cancel();
7913
+ questionModel.unRankingChoicesAnimation.cancel();
7914
+ }
7915
+ _super.prototype.clear.call(this);
7863
7916
  };
7864
7917
  return DragDropRankingSelectToRank;
7865
- }(_ranking_choices__WEBPACK_IMPORTED_MODULE_0__["DragDropRankingChoices"]));
7918
+ }(_ranking_choices__WEBPACK_IMPORTED_MODULE_1__["DragDropRankingChoices"]));
7866
7919
 
7867
7920
 
7868
7921
 
@@ -9510,8 +9563,8 @@ __webpack_require__.r(__webpack_exports__);
9510
9563
 
9511
9564
  var Version;
9512
9565
  var ReleaseDate;
9513
- Version = "" + "1.9.136";
9514
- ReleaseDate = "" + "2024-03-26";
9566
+ Version = "" + "1.9.138";
9567
+ ReleaseDate = "" + "2024-04-09";
9515
9568
  function checkLibraryVersion(ver, libraryName) {
9516
9569
  if (Version != ver) {
9517
9570
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -9692,7 +9745,7 @@ function checkPrefix(prefix) {
9692
9745
  /*!**************************************!*\
9693
9746
  !*** ./src/entries/core-wo-model.ts ***!
9694
9747
  \**************************************/
9695
- /*! 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, StylesManager, 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, InputMaskBase, InputMaskPattern, InputMaskNumeric, InputMaskDateTime, InputMaskCurrency, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, createDropdownActionModel, createDropdownActionModelAdvanced, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, DragOrClickHelper */
9748
+ /*! 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, StylesManager, 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, InputMaskBase, InputMaskPattern, InputMaskNumeric, InputMaskDateTime, InputMaskCurrency, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, createDropdownActionModel, createDropdownActionModelAdvanced, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel, AnimationUtils, AnimationPropertyUtils, AnimationGroupUtils, AnimationBoolean, AnimationGroup, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, DragOrClickHelper */
9696
9749
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
9697
9750
 
9698
9751
  "use strict";
@@ -10137,16 +10190,27 @@ __webpack_require__.r(__webpack_exports__);
10137
10190
 
10138
10191
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionDropdownViewModel", function() { return _actions_action__WEBPACK_IMPORTED_MODULE_7__["ActionDropdownViewModel"]; });
10139
10192
 
10140
- /* harmony import */ var _actions_adaptive_container__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../actions/adaptive-container */ "./src/actions/adaptive-container.ts");
10141
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AdaptiveActionContainer", function() { return _actions_adaptive_container__WEBPACK_IMPORTED_MODULE_8__["AdaptiveActionContainer"]; });
10193
+ /* harmony import */ var _utils_animation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/animation */ "./src/utils/animation.ts");
10194
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationUtils", function() { return _utils_animation__WEBPACK_IMPORTED_MODULE_8__["AnimationUtils"]; });
10195
+
10196
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationPropertyUtils", function() { return _utils_animation__WEBPACK_IMPORTED_MODULE_8__["AnimationPropertyUtils"]; });
10142
10197
 
10143
- /* harmony import */ var _actions_container__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../actions/container */ "./src/actions/container.ts");
10144
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultActionBarCss", function() { return _actions_container__WEBPACK_IMPORTED_MODULE_9__["defaultActionBarCss"]; });
10198
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationGroupUtils", function() { return _utils_animation__WEBPACK_IMPORTED_MODULE_8__["AnimationGroupUtils"]; });
10145
10199
 
10146
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionContainer", function() { return _actions_container__WEBPACK_IMPORTED_MODULE_9__["ActionContainer"]; });
10200
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationBoolean", function() { return _utils_animation__WEBPACK_IMPORTED_MODULE_8__["AnimationBoolean"]; });
10147
10201
 
10148
- /* harmony import */ var _utils_dragOrClickHelper__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/dragOrClickHelper */ "./src/utils/dragOrClickHelper.ts");
10149
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragOrClickHelper", function() { return _utils_dragOrClickHelper__WEBPACK_IMPORTED_MODULE_10__["DragOrClickHelper"]; });
10202
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationGroup", function() { return _utils_animation__WEBPACK_IMPORTED_MODULE_8__["AnimationGroup"]; });
10203
+
10204
+ /* harmony import */ var _actions_adaptive_container__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../actions/adaptive-container */ "./src/actions/adaptive-container.ts");
10205
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AdaptiveActionContainer", function() { return _actions_adaptive_container__WEBPACK_IMPORTED_MODULE_9__["AdaptiveActionContainer"]; });
10206
+
10207
+ /* harmony import */ var _actions_container__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../actions/container */ "./src/actions/container.ts");
10208
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultActionBarCss", function() { return _actions_container__WEBPACK_IMPORTED_MODULE_10__["defaultActionBarCss"]; });
10209
+
10210
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionContainer", function() { return _actions_container__WEBPACK_IMPORTED_MODULE_10__["ActionContainer"]; });
10211
+
10212
+ /* harmony import */ var _utils_dragOrClickHelper__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/dragOrClickHelper */ "./src/utils/dragOrClickHelper.ts");
10213
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragOrClickHelper", function() { return _utils_dragOrClickHelper__WEBPACK_IMPORTED_MODULE_11__["DragOrClickHelper"]; });
10150
10214
 
10151
10215
  // model
10152
10216
 
@@ -10165,13 +10229,14 @@ __webpack_require__.r(__webpack_exports__);
10165
10229
 
10166
10230
 
10167
10231
 
10232
+
10168
10233
  /***/ }),
10169
10234
 
10170
10235
  /***/ "./src/entries/core.ts":
10171
10236
  /*!*****************************!*\
10172
10237
  !*** ./src/entries/core.ts ***!
10173
10238
  \*****************************/
10174
- /*! 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, StylesManager, 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, InputMaskBase, InputMaskPattern, InputMaskNumeric, InputMaskDateTime, InputMaskCurrency, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, createDropdownActionModel, createDropdownActionModelAdvanced, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, DragOrClickHelper, Model */
10239
+ /*! 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, StylesManager, 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, InputMaskBase, InputMaskPattern, InputMaskNumeric, InputMaskDateTime, InputMaskCurrency, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, createDropdownActionModel, createDropdownActionModelAdvanced, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel, AnimationUtils, AnimationPropertyUtils, AnimationGroupUtils, AnimationBoolean, AnimationGroup, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, DragOrClickHelper, Model */
10175
10240
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
10176
10241
 
10177
10242
  "use strict";
@@ -10609,6 +10674,16 @@ __webpack_require__.r(__webpack_exports__);
10609
10674
 
10610
10675
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionDropdownViewModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["ActionDropdownViewModel"]; });
10611
10676
 
10677
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationUtils", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["AnimationUtils"]; });
10678
+
10679
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationPropertyUtils", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["AnimationPropertyUtils"]; });
10680
+
10681
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationGroupUtils", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["AnimationGroupUtils"]; });
10682
+
10683
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationBoolean", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["AnimationBoolean"]; });
10684
+
10685
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationGroup", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["AnimationGroup"]; });
10686
+
10612
10687
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AdaptiveActionContainer", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["AdaptiveActionContainer"]; });
10613
10688
 
10614
10689
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultActionBarCss", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["defaultActionBarCss"]; });
@@ -21476,7 +21551,6 @@ __webpack_require__.r(__webpack_exports__);
21476
21551
  var InputElementAdapter = /** @class */ (function () {
21477
21552
  function InputElementAdapter(inputMaskInstance, inputElement, value) {
21478
21553
  var _this = this;
21479
- if (value === void 0) { value = ""; }
21480
21554
  this.inputMaskInstance = inputMaskInstance;
21481
21555
  this.inputElement = inputElement;
21482
21556
  this.prevUnmaskedValue = undefined;
@@ -21486,6 +21560,12 @@ var InputElementAdapter = /** @class */ (function () {
21486
21560
  _this.inputElement.value = maskedValue;
21487
21561
  }
21488
21562
  };
21563
+ this.clickHandler = function (event) {
21564
+ if (_this.inputElement.value == _this.inputMaskInstance.getMaskedValue("")) {
21565
+ _this.inputElement.setSelectionRange(0, 0);
21566
+ event.preventDefault();
21567
+ }
21568
+ };
21489
21569
  this.beforeInputHandler = function (event) {
21490
21570
  var args = _this.createArgs(event);
21491
21571
  var result = _this.inputMaskInstance.processInput(args);
@@ -21495,8 +21575,15 @@ var InputElementAdapter = /** @class */ (function () {
21495
21575
  event.preventDefault();
21496
21576
  }
21497
21577
  };
21498
- this.inputElement.value = inputMaskInstance.getMaskedValue(value);
21499
- this.prevUnmaskedValue = value;
21578
+ var _value = value;
21579
+ if (_value === null || _value === undefined) {
21580
+ _value = "";
21581
+ }
21582
+ else if (typeof _value !== "string") {
21583
+ _value = _value.toString();
21584
+ }
21585
+ this.inputElement.value = inputMaskInstance.getMaskedValue(_value);
21586
+ this.prevUnmaskedValue = _value;
21500
21587
  inputMaskInstance.onPropertyChanged.add(this.inputMaskInstancePropertyChangedHandler);
21501
21588
  this.addInputEventListener();
21502
21589
  }
@@ -21522,11 +21609,15 @@ var InputElementAdapter = /** @class */ (function () {
21522
21609
  InputElementAdapter.prototype.addInputEventListener = function () {
21523
21610
  if (!!this.inputElement) {
21524
21611
  this.inputElement.addEventListener("beforeinput", this.beforeInputHandler);
21612
+ this.inputElement.addEventListener("click", this.clickHandler);
21613
+ this.inputElement.addEventListener("focus", this.clickHandler);
21525
21614
  }
21526
21615
  };
21527
21616
  InputElementAdapter.prototype.removeInputEventListener = function () {
21528
21617
  if (!!this.inputElement) {
21529
21618
  this.inputElement.removeEventListener("beforeinput", this.beforeInputHandler);
21619
+ this.inputElement.removeEventListener("click", this.clickHandler);
21620
+ this.inputElement.removeEventListener("focus", this.clickHandler);
21530
21621
  }
21531
21622
  };
21532
21623
  InputElementAdapter.prototype.dispose = function () {
@@ -21961,12 +22052,20 @@ var InputMaskDateTime = /** @class */ (function (_super) {
21961
22052
  });
21962
22053
  };
21963
22054
  InputMaskDateTime.prototype.getISO_8601Format = function (dateTime) {
21964
- if (dateTime.year === undefined || dateTime.month === undefined || dateTime.day === undefined)
21965
- return "";
21966
- var year = this.getPlaceholder(4, dateTime.year.toString(), "0") + dateTime.year;
21967
- var month = this.getPlaceholder(2, dateTime.month.toString(), "0") + dateTime.month;
21968
- var day = this.getPlaceholder(2, dateTime.day.toString(), "0") + dateTime.day;
21969
- return [year, month, day].join("-");
22055
+ var date = [];
22056
+ if (dateTime.year !== undefined) {
22057
+ var year = this.getPlaceholder(4, dateTime.year.toString(), "0") + dateTime.year;
22058
+ date.push(year);
22059
+ }
22060
+ if (dateTime.month !== undefined && dateTime.year !== undefined) {
22061
+ var month = this.getPlaceholder(2, dateTime.month.toString(), "0") + dateTime.month;
22062
+ date.push(month);
22063
+ }
22064
+ if (dateTime.day !== undefined && dateTime.month !== undefined && dateTime.year !== undefined) {
22065
+ var day = this.getPlaceholder(2, dateTime.day.toString(), "0") + dateTime.day;
22066
+ date.push(day);
22067
+ }
22068
+ return date.join("-");
21970
22069
  };
21971
22070
  InputMaskDateTime.prototype.isYearValid = function (dateTime) {
21972
22071
  if (dateTime.min === undefined && dateTime.max === undefined)
@@ -22009,13 +22108,36 @@ var InputMaskDateTime = /** @class */ (function (_super) {
22009
22108
  data = data.slice(0, data.length - 1);
22010
22109
  }
22011
22110
  }
22012
- else if (propertyName === "year" && !this.isYearValid(dateTime)) {
22111
+ dateTime[propertyName] = parseInt(data);
22112
+ if (propertyName === "year" && !this.isYearValid(dateTime)) {
22013
22113
  data = data.slice(0, data.length - 1);
22014
22114
  }
22015
22115
  else if ((propertyName === "day" && parseInt(data[0]) > 3) || (propertyName === "month" && parseInt(data[0]) > 1)) {
22116
+ if (this.isDateValid(dateTime)) {
22117
+ newItem.isCompleted = true;
22118
+ }
22119
+ else {
22120
+ data = data.slice(0, data.length - 1);
22121
+ }
22122
+ }
22123
+ else if ((propertyName === "day" && parseInt(data[0]) <= 3 && parseInt(data[0]) !== 0) || (propertyName === "month" && parseInt(data[0]) <= 1 && parseInt(data[0]) !== 0)) {
22124
+ var prevValue = dateTime[propertyName];
22125
+ var tempValue = prevValue * 10;
22126
+ var maxValue = propertyName === "month" ? 3 : 10;
22016
22127
  newItem.isCompleted = true;
22128
+ for (var index = 0; index < maxValue; index++) {
22129
+ dateTime[propertyName] = tempValue + index;
22130
+ if (this.isDateValid(dateTime)) {
22131
+ newItem.isCompleted = false;
22132
+ break;
22133
+ }
22134
+ }
22135
+ dateTime[propertyName] = prevValue;
22136
+ if (newItem.isCompleted && !this.isDateValid(dateTime)) {
22137
+ data = data.slice(0, data.length - 1);
22138
+ }
22017
22139
  }
22018
- newItem.value = data;
22140
+ newItem.value = data || undefined;
22019
22141
  dateTime[propertyName] = parseInt(data) > 0 ? parseInt(data) : undefined;
22020
22142
  };
22021
22143
  InputMaskDateTime.prototype.getCorrectDatePartFormat = function (inputData, matchWholeMask) {
@@ -22062,6 +22184,11 @@ var InputMaskDateTime = /** @class */ (function (_super) {
22062
22184
  var result = "";
22063
22185
  var prevSeparator = "";
22064
22186
  var prevIsCompleted = false;
22187
+ var lastItemWithDataIndex = this.inputDateTimeData.length - 1;
22188
+ if (!matchWholeMask) {
22189
+ var arr = this.inputDateTimeData.filter(function (item) { return !!item.value; });
22190
+ lastItemWithDataIndex = this.inputDateTimeData.indexOf(arr[arr.length - 1]);
22191
+ }
22065
22192
  for (var index = 0; index < this.inputDateTimeData.length; index++) {
22066
22193
  var inputData = this.inputDateTimeData[index];
22067
22194
  switch (inputData.lexem.type) {
@@ -22073,7 +22200,8 @@ var InputMaskDateTime = /** @class */ (function (_super) {
22073
22200
  return result;
22074
22201
  }
22075
22202
  else {
22076
- var data = this.getCorrectDatePartFormat(inputData, matchWholeMask);
22203
+ var _matchWholeMask = matchWholeMask || lastItemWithDataIndex !== index;
22204
+ var data = this.getCorrectDatePartFormat(inputData, _matchWholeMask);
22077
22205
  result += (prevSeparator + data);
22078
22206
  prevIsCompleted = inputData.isCompleted;
22079
22207
  }
@@ -22110,32 +22238,6 @@ var InputMaskDateTime = /** @class */ (function (_super) {
22110
22238
  var result = this.getFormatedString(matchWholeMask);
22111
22239
  return result;
22112
22240
  };
22113
- InputMaskDateTime.prototype.getPartsOld = function (input) {
22114
- var inputParts = [];
22115
- var separatorLexems = this.lexems.filter(function (l) { return l.type === "separator"; });
22116
- var separatorLexemsIndex = 0;
22117
- do {
22118
- if (!separatorLexems[separatorLexemsIndex]) {
22119
- if (!!input) {
22120
- inputParts.push(input);
22121
- input = "";
22122
- }
22123
- break;
22124
- }
22125
- var separatorCharIndex = input.indexOf(separatorLexems[separatorLexemsIndex].value);
22126
- if (separatorCharIndex !== -1) {
22127
- var part = input.slice(0, separatorCharIndex);
22128
- if (!!part) {
22129
- inputParts.push(part);
22130
- }
22131
- input = input.slice(separatorCharIndex + 1);
22132
- }
22133
- else {
22134
- }
22135
- separatorLexemsIndex++;
22136
- } while (!!input);
22137
- return inputParts;
22138
- };
22139
22241
  InputMaskDateTime.prototype.getParts = function (input) {
22140
22242
  var inputParts = [];
22141
22243
  var lexemsWithValue = this.lexems.filter(function (l) { return l.type !== "separator"; });
@@ -22380,7 +22482,7 @@ var InputMaskNumeric = /** @class */ (function (_super) {
22380
22482
  }
22381
22483
  return value;
22382
22484
  };
22383
- InputMaskNumeric.prototype.validateNumber = function (number) {
22485
+ InputMaskNumeric.prototype.validateNumber = function (number, matchWholeMask) {
22384
22486
  var min = this.min || Number.MIN_SAFE_INTEGER;
22385
22487
  var max = this.max || Number.MAX_SAFE_INTEGER;
22386
22488
  if (this.min !== undefined || this.max !== undefined) {
@@ -22388,7 +22490,12 @@ var InputMaskNumeric = /** @class */ (function (_super) {
22388
22490
  if (Number.isNaN(value)) {
22389
22491
  return true;
22390
22492
  }
22391
- return value >= min && value <= max;
22493
+ if (!matchWholeMask) {
22494
+ return value >= 0 && value <= max || value < 0 && value >= min;
22495
+ }
22496
+ else {
22497
+ return value >= min && value <= max;
22498
+ }
22392
22499
  }
22393
22500
  return true;
22394
22501
  };
@@ -22403,7 +22510,7 @@ var InputMaskNumeric = /** @class */ (function (_super) {
22403
22510
  var currentChar = input[inputIndex];
22404
22511
  switch (currentChar) {
22405
22512
  case "-": {
22406
- if (this.allowNegativeValues) {
22513
+ if (this.allowNegativeValues && (this.min === undefined || this.min < 0)) {
22407
22514
  minusCharCount++;
22408
22515
  }
22409
22516
  break;
@@ -22439,6 +22546,9 @@ var InputMaskNumeric = /** @class */ (function (_super) {
22439
22546
  if (matchWholeMask === void 0) { matchWholeMask = false; }
22440
22547
  var input = (src === undefined || src === null) ? "" : src;
22441
22548
  var parsedNumber = this.parseNumber(input);
22549
+ if (!this.validateNumber(parsedNumber, matchWholeMask)) {
22550
+ return null;
22551
+ }
22442
22552
  var displayText = this.displayNumber(parsedNumber, true, matchWholeMask);
22443
22553
  return displayText;
22444
22554
  };
@@ -22458,7 +22568,7 @@ var InputMaskNumeric = /** @class */ (function (_super) {
22458
22568
  var rightPart = args.prevValue.slice(args.selectionEnd);
22459
22569
  var src = leftPart + rightPart;
22460
22570
  var parsedNumber = this.parseNumber(src);
22461
- if (!this.validateNumber(parsedNumber)) {
22571
+ if (!this.validateNumber(parsedNumber, false)) {
22462
22572
  return result;
22463
22573
  }
22464
22574
  var maskedValue = this.getNumberMaskedValue(src);
@@ -23146,7 +23256,7 @@ var PageModel = /** @class */ (function (_super) {
23146
23256
  configurable: true
23147
23257
  });
23148
23258
  PageModel.prototype.calcCssClasses = function (css) {
23149
- var classes = { page: {}, error: {}, pageTitle: "", pageDescription: "", row: "", rowMultiple: "", pageRow: "", rowCompact: "" };
23259
+ var classes = { page: {}, error: {}, pageTitle: "", pageDescription: "", row: "", rowMultiple: "", pageRow: "", rowCompact: "", rowFadeIn: "", rowFadeOut: "", rowFadeOutActive: "" };
23150
23260
  this.copyCssClasses(classes.page, css.page);
23151
23261
  this.copyCssClasses(classes.error, css.error);
23152
23262
  if (!!css.pageTitle) {
@@ -23167,6 +23277,15 @@ var PageModel = /** @class */ (function (_super) {
23167
23277
  if (!!css.rowCompact) {
23168
23278
  classes.rowCompact = css.rowCompact;
23169
23279
  }
23280
+ if (!!css.rowFadeIn) {
23281
+ classes.rowFadeIn = css.rowFadeIn;
23282
+ }
23283
+ if (!!css.rowFadeOut) {
23284
+ classes.rowFadeOut = css.rowFadeOut;
23285
+ }
23286
+ if (!!css.rowFadeOutActive) {
23287
+ classes.rowFadeOutActive = css.rowFadeOutActive;
23288
+ }
23170
23289
  if (this.survey) {
23171
23290
  this.survey.updatePageCssClasses(this, classes);
23172
23291
  }
@@ -23392,7 +23511,9 @@ __webpack_require__.r(__webpack_exports__);
23392
23511
  /* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
23393
23512
  /* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
23394
23513
  /* harmony import */ var _drag_drop_panel_helper_v1__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./drag-drop-panel-helper-v1 */ "./src/drag-drop-panel-helper-v1.ts");
23395
- /* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./global_variables_utils */ "./src/global_variables_utils.ts");
23514
+ /* harmony import */ var _utils_animation__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/animation */ "./src/utils/animation.ts");
23515
+ /* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./global_variables_utils */ "./src/global_variables_utils.ts");
23516
+ /* harmony import */ var _page__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./page */ "./src/page.ts");
23396
23517
  var __extends = (undefined && undefined.__extends) || (function () {
23397
23518
  var extendStatics = function (d, b) {
23398
23519
  extendStatics = Object.setPrototypeOf ||
@@ -23431,6 +23552,8 @@ var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from
23431
23552
 
23432
23553
 
23433
23554
 
23555
+
23556
+
23434
23557
  var QuestionRowModel = /** @class */ (function (_super) {
23435
23558
  __extends(QuestionRowModel, _super);
23436
23559
  function QuestionRowModel(panel) {
@@ -23438,6 +23561,10 @@ var QuestionRowModel = /** @class */ (function (_super) {
23438
23561
  _this.panel = panel;
23439
23562
  _this._scrollableParent = undefined;
23440
23563
  _this._updateVisibility = undefined;
23564
+ _this.visibleElementsAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_11__["AnimationGroup"](_this.getVisibleElementsAnimationOptions(), function (value) {
23565
+ _this.setPropertyValue("visibleElements", value);
23566
+ _this.setWidth();
23567
+ }, function () { return _this.visibleElements; });
23441
23568
  _this.idValue = QuestionRowModel.getRowId();
23442
23569
  _this.visible = panel.areInvisibleElementsShowing;
23443
23570
  _this.createNewArray("elements");
@@ -23450,12 +23577,12 @@ var QuestionRowModel = /** @class */ (function (_super) {
23450
23577
  QuestionRowModel.prototype.startLazyRendering = function (rowContainerDiv, findScrollableContainer) {
23451
23578
  var _this = this;
23452
23579
  if (findScrollableContainer === void 0) { findScrollableContainer = _utils_utils__WEBPACK_IMPORTED_MODULE_8__["findScrollableParent"]; }
23453
- if (!_global_variables_utils__WEBPACK_IMPORTED_MODULE_11__["DomDocumentHelper"].isAvailable())
23580
+ if (!_global_variables_utils__WEBPACK_IMPORTED_MODULE_12__["DomDocumentHelper"].isAvailable())
23454
23581
  return;
23455
23582
  this._scrollableParent = findScrollableContainer(rowContainerDiv);
23456
23583
  // if this._scrollableParent is html the scroll event isn't fired, so we should use window
23457
- if (this._scrollableParent === _global_variables_utils__WEBPACK_IMPORTED_MODULE_11__["DomDocumentHelper"].getDocumentElement()) {
23458
- this._scrollableParent = _global_variables_utils__WEBPACK_IMPORTED_MODULE_11__["DomWindowHelper"].getWindow();
23584
+ if (this._scrollableParent === _global_variables_utils__WEBPACK_IMPORTED_MODULE_12__["DomDocumentHelper"].getDocumentElement()) {
23585
+ this._scrollableParent = _global_variables_utils__WEBPACK_IMPORTED_MODULE_12__["DomWindowHelper"].getWindow();
23459
23586
  }
23460
23587
  var hasScroll = this._scrollableParent.scrollHeight > this._scrollableParent.clientHeight;
23461
23588
  this.isNeedRender = !hasScroll;
@@ -23504,6 +23631,9 @@ var QuestionRowModel = /** @class */ (function (_super) {
23504
23631
  enumerable: false,
23505
23632
  configurable: true
23506
23633
  });
23634
+ QuestionRowModel.prototype.equalsCore = function (obj) {
23635
+ return this == obj;
23636
+ };
23507
23637
  Object.defineProperty(QuestionRowModel.prototype, "elements", {
23508
23638
  get: function () {
23509
23639
  return this.getPropertyValue("elements");
@@ -23511,10 +23641,48 @@ var QuestionRowModel = /** @class */ (function (_super) {
23511
23641
  enumerable: false,
23512
23642
  configurable: true
23513
23643
  });
23644
+ QuestionRowModel.prototype.getVisibleElementsAnimationOptions = function () {
23645
+ var _this = this;
23646
+ var beforeRunAnimation = function (el) {
23647
+ el.style.setProperty("--animation-height", el.offsetHeight + "px");
23648
+ el.style.setProperty("--animation-width", Object(_utils_utils__WEBPACK_IMPORTED_MODULE_8__["getElementWidth"])(el) + "px");
23649
+ };
23650
+ return {
23651
+ isAnimationEnabled: function () { var _a; return _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].animationEnabled && ((_a = _this.panel) === null || _a === void 0 ? void 0 : _a.animationAllowed) && _this.visible; },
23652
+ getAnimatedElement: function (element) { return element.getWrapperElement(); },
23653
+ getLeaveOptions: function (element) {
23654
+ var surveyElement = element;
23655
+ var cssClasses = element.isPanel ? surveyElement.cssClasses.panel : surveyElement.cssClasses;
23656
+ return {
23657
+ cssClass: cssClasses.fadeOut,
23658
+ onBeforeRunAnimation: beforeRunAnimation
23659
+ };
23660
+ },
23661
+ getEnterOptions: function (element) {
23662
+ var surveyElement = element;
23663
+ var cssClasses = element.isPanel ? surveyElement.cssClasses.panel : surveyElement.cssClasses;
23664
+ return {
23665
+ cssClass: cssClasses.fadeIn,
23666
+ onBeforeRunAnimation: beforeRunAnimation
23667
+ };
23668
+ }
23669
+ };
23670
+ };
23514
23671
  Object.defineProperty(QuestionRowModel.prototype, "visibleElements", {
23515
23672
  get: function () {
23516
23673
  return this.getPropertyValue("visibleElements");
23517
23674
  },
23675
+ set: function (val) {
23676
+ if (!val.length) {
23677
+ this.visible = false;
23678
+ this.visibleElementsAnimation.cancel();
23679
+ return;
23680
+ }
23681
+ else {
23682
+ this.visible = true;
23683
+ }
23684
+ this.visibleElementsAnimation.sync(val);
23685
+ },
23518
23686
  enumerable: false,
23519
23687
  configurable: true
23520
23688
  });
@@ -23524,6 +23692,7 @@ var QuestionRowModel = /** @class */ (function (_super) {
23524
23692
  },
23525
23693
  set: function (val) {
23526
23694
  this.setPropertyValue("visible", val);
23695
+ this.onVisibleChangedCallback && this.onVisibleChangedCallback();
23527
23696
  },
23528
23697
  enumerable: false,
23529
23698
  configurable: true
@@ -23539,9 +23708,14 @@ var QuestionRowModel = /** @class */ (function (_super) {
23539
23708
  configurable: true
23540
23709
  });
23541
23710
  QuestionRowModel.prototype.updateVisible = function () {
23542
- var isVisible = this.calcVisible();
23543
- this.setWidth();
23544
- this.visible = isVisible;
23711
+ var visElements = [];
23712
+ for (var i = 0; i < this.elements.length; i++) {
23713
+ if (this.elements[i].isVisible) {
23714
+ visElements.push(this.elements[i]);
23715
+ }
23716
+ }
23717
+ this.visibleElements = visElements;
23718
+ return;
23545
23719
  };
23546
23720
  QuestionRowModel.prototype.addElement = function (q) {
23547
23721
  this.elements.push(q);
@@ -23615,27 +23789,6 @@ var QuestionRowModel = /** @class */ (function (_super) {
23615
23789
  QuestionRowModel.prototype.getRenderedWidthFromWidth = function (width) {
23616
23790
  return _helpers__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isNumber(width) ? width + "px" : width;
23617
23791
  };
23618
- QuestionRowModel.prototype.calcVisible = function () {
23619
- var visElements = [];
23620
- for (var i = 0; i < this.elements.length; i++) {
23621
- if (this.elements[i].isVisible) {
23622
- visElements.push(this.elements[i]);
23623
- }
23624
- }
23625
- if (this.needToUpdateVisibleElements(visElements)) {
23626
- this.setPropertyValue("visibleElements", visElements);
23627
- }
23628
- return visElements.length > 0;
23629
- };
23630
- QuestionRowModel.prototype.needToUpdateVisibleElements = function (visElements) {
23631
- if (visElements.length !== this.visibleElements.length)
23632
- return true;
23633
- for (var i = 0; i < visElements.length; i++) {
23634
- if (visElements[i] !== this.visibleElements[i])
23635
- return true;
23636
- }
23637
- return false;
23638
- };
23639
23792
  QuestionRowModel.prototype.dispose = function () {
23640
23793
  _super.prototype.dispose.call(this);
23641
23794
  this.stopLazyRendering();
@@ -23644,10 +23797,16 @@ var QuestionRowModel = /** @class */ (function (_super) {
23644
23797
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
23645
23798
  .append(this.panel.cssClasses.row)
23646
23799
  .append(this.panel.cssClasses.rowCompact, this.panel["isCompact"])
23647
- .append(this.panel.cssClasses.pageRow, this.panel.isPage || (!!this.panel.originalPage && !this.panel.survey.isShowingPreview))
23800
+ .append(this.panel.cssClasses.pageRow, this.panel.isPage || (!!this.panel.originalPage))
23648
23801
  .append(this.panel.cssClasses.rowMultiple, this.visibleElements.length > 1)
23649
23802
  .toString();
23650
23803
  };
23804
+ QuestionRowModel.prototype.setRootElement = function (element) {
23805
+ this.rootElement = element;
23806
+ };
23807
+ QuestionRowModel.prototype.getRootElement = function () {
23808
+ return this.rootElement;
23809
+ };
23651
23810
  QuestionRowModel.rowCounter = 100;
23652
23811
  __decorate([
23653
23812
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: null })
@@ -23665,9 +23824,13 @@ var PanelModelBase = /** @class */ (function (_super) {
23665
23824
  var _this = _super.call(this, name) || this;
23666
23825
  _this.isQuestionsReady = false;
23667
23826
  _this.questionsValue = new Array();
23827
+ _this.rowsAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_11__["AnimationGroup"](_this.getRowsAnimationOptions(), function (value) {
23828
+ _this.setPropertyValue("visibleRows", value);
23829
+ }, function () { return _this.visibleRows; });
23668
23830
  _this.isRandomizing = false;
23669
23831
  _this.locCountRowUpdates = 0;
23670
- _this.createNewArray("rows");
23832
+ _this.createNewArray("rows", function (el, index) { _this.onAddRow(el); }, function (el) { _this.onRemoveRow(el); });
23833
+ _this.createNewArray("visibleRows");
23671
23834
  _this.elementsValue = _this.createNewArray("elements", _this.onAddElement.bind(_this), _this.onRemoveElement.bind(_this));
23672
23835
  _this.id = PanelModelBase.getPanelId();
23673
23836
  _this.addExpressionProperty("visibleIf", function (obj, res) { _this.visible = res === true; }, function (obj) { return !_this.areInvisibleElementsShowing; });
@@ -23687,16 +23850,62 @@ var PanelModelBase = /** @class */ (function (_super) {
23687
23850
  PanelModelBase.getPanelId = function () {
23688
23851
  return "sp_" + PanelModelBase.panelCounter++;
23689
23852
  };
23853
+ PanelModelBase.prototype.onAddRow = function (row) {
23854
+ var _this = this;
23855
+ this.onRowVisibleChanged();
23856
+ row.onVisibleChangedCallback = function () { return _this.onRowVisibleChanged(); };
23857
+ };
23858
+ PanelModelBase.prototype.getRowsAnimationOptions = function () {
23859
+ var _this = this;
23860
+ var beforeRunAnimation = function (el) {
23861
+ el.style.setProperty("--animation-height", el.offsetHeight + "px");
23862
+ };
23863
+ return {
23864
+ isAnimationEnabled: function () { return _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].animationEnabled && _this.animationAllowed; },
23865
+ getAnimatedElement: function (row) { return row.getRootElement(); },
23866
+ getLeaveOptions: function (_) {
23867
+ return { cssClass: _this.cssClasses.rowFadeOut,
23868
+ onBeforeRunAnimation: beforeRunAnimation
23869
+ };
23870
+ },
23871
+ getEnterOptions: function (_) {
23872
+ return {
23873
+ cssClass: _this.cssClasses.rowFadeIn,
23874
+ onBeforeRunAnimation: beforeRunAnimation
23875
+ };
23876
+ }
23877
+ };
23878
+ };
23879
+ Object.defineProperty(PanelModelBase.prototype, "visibleRows", {
23880
+ get: function () {
23881
+ return this.getPropertyValue("visibleRows");
23882
+ },
23883
+ set: function (val) {
23884
+ this.rowsAnimation.sync(val);
23885
+ },
23886
+ enumerable: false,
23887
+ configurable: true
23888
+ });
23889
+ PanelModelBase.prototype.onRemoveRow = function (row) {
23890
+ row.visibleElementsAnimation.cancel();
23891
+ this.visibleRows = this.rows.filter(function (row) { return row.visible; });
23892
+ row.onVisibleChangedCallback = undefined;
23893
+ };
23894
+ PanelModelBase.prototype.onRowVisibleChanged = function () {
23895
+ this.visibleRows = this.rows.filter(function (row) { return row.visible; });
23896
+ };
23690
23897
  PanelModelBase.prototype.getType = function () {
23691
23898
  return "panelbase";
23692
23899
  };
23693
23900
  PanelModelBase.prototype.setSurveyImpl = function (value, isLight) {
23901
+ this.animationAllowed = false;
23694
23902
  _super.prototype.setSurveyImpl.call(this, value, isLight);
23695
23903
  if (this.isDesignMode)
23696
23904
  this.onVisibleChanged();
23697
23905
  for (var i = 0; i < this.elements.length; i++) {
23698
23906
  this.elements[i].setSurveyImpl(value, isLight);
23699
23907
  }
23908
+ this.animationAllowed = true;
23700
23909
  };
23701
23910
  PanelModelBase.prototype.endLoadingFromJson = function () {
23702
23911
  _super.prototype.endLoadingFromJson.call(this);
@@ -23912,7 +24121,7 @@ var PanelModelBase = /** @class */ (function (_super) {
23912
24121
  configurable: true
23913
24122
  });
23914
24123
  PanelModelBase.prototype.calcCssClasses = function (css) {
23915
- var classes = { panel: {}, error: {}, row: "", rowMultiple: "", pageRow: "", rowCompact: "" };
24124
+ var classes = { panel: {}, error: {}, row: "", rowFadeIn: "", rowFadeOut: "", rowFadeOutActive: "", rowMultiple: "", pageRow: "", rowCompact: "" };
23916
24125
  this.copyCssClasses(classes.panel, css.panel);
23917
24126
  this.copyCssClasses(classes.error, css.error);
23918
24127
  if (!!css.pageRow) {
@@ -23924,6 +24133,15 @@ var PanelModelBase = /** @class */ (function (_super) {
23924
24133
  if (!!css.row) {
23925
24134
  classes.row = css.row;
23926
24135
  }
24136
+ if (!!css.rowFadeIn) {
24137
+ classes.rowFadeIn = css.rowFadeIn;
24138
+ }
24139
+ if (!!css.rowFadeOut) {
24140
+ classes.rowFadeOut = css.rowFadeOut;
24141
+ }
24142
+ if (!!css.rowFadeOutActive) {
24143
+ classes.rowFadeOutActive = css.rowFadeOutActive;
24144
+ }
23927
24145
  if (!!css.rowMultiple) {
23928
24146
  classes.rowMultiple = css.rowMultiple;
23929
24147
  }
@@ -24502,10 +24720,13 @@ var PanelModelBase = /** @class */ (function (_super) {
24502
24720
  return new QuestionRowModel(this);
24503
24721
  };
24504
24722
  PanelModelBase.prototype.onSurveyLoad = function () {
24723
+ this.animationAllowed = false;
24724
+ _super.prototype.onSurveyLoad.call(this);
24505
24725
  for (var i = 0; i < this.elements.length; i++) {
24506
24726
  this.elements[i].onSurveyLoad();
24507
24727
  }
24508
24728
  this.onElementVisibilityChanged(this);
24729
+ this.animationAllowed = true;
24509
24730
  };
24510
24731
  PanelModelBase.prototype.onFirstRendering = function () {
24511
24732
  _super.prototype.onFirstRendering.call(this);
@@ -24539,7 +24760,9 @@ var PanelModelBase = /** @class */ (function (_super) {
24539
24760
  PanelModelBase.prototype.onRowsChanged = function () {
24540
24761
  if (this.isLoadingFromJson)
24541
24762
  return;
24763
+ this.animationAllowed = false;
24542
24764
  this.setArrayPropertyDirectly("rows", this.buildRows());
24765
+ this.animationAllowed = true;
24543
24766
  };
24544
24767
  PanelModelBase.prototype.blockRowsUpdates = function () {
24545
24768
  this.locCountRowUpdates++;
@@ -24859,9 +25082,9 @@ var PanelModelBase = /** @class */ (function (_super) {
24859
25082
  enumerable: false,
24860
25083
  configurable: true
24861
25084
  });
24862
- PanelModelBase.prototype.getIsPageVisible = function (exceptionQuestion) {
24863
- if (!this.visible)
24864
- return false;
25085
+ PanelModelBase.prototype.getIsContentVisible = function (exceptionQuestion) {
25086
+ if (this.areInvisibleElementsShowing)
25087
+ return true;
24865
25088
  for (var i = 0; i < this.elements.length; i++) {
24866
25089
  if (this.elements[i] == exceptionQuestion)
24867
25090
  continue;
@@ -24870,6 +25093,9 @@ var PanelModelBase = /** @class */ (function (_super) {
24870
25093
  }
24871
25094
  return false;
24872
25095
  };
25096
+ PanelModelBase.prototype.getIsPageVisible = function (exceptionQuestion) {
25097
+ return this.visible && this.getIsContentVisible(exceptionQuestion);
25098
+ };
24873
25099
  PanelModelBase.prototype.setVisibleIndex = function (index) {
24874
25100
  if (!this.isVisible || index < 0) {
24875
25101
  this.resetVisibleIndexes();
@@ -25537,6 +25763,7 @@ var PanelModel = /** @class */ (function (_super) {
25537
25763
  id: "cancel-preview",
25538
25764
  locTitle: this.survey.locEditText,
25539
25765
  innerCss: this.survey.cssNavigationEdit,
25766
+ component: "sv-nav-btn",
25540
25767
  action: function () { _this.cancelPreview(); }
25541
25768
  });
25542
25769
  }
@@ -25561,7 +25788,7 @@ var PanelModel = /** @class */ (function (_super) {
25561
25788
  Object.defineProperty(PanelModel.prototype, "hasEditButton", {
25562
25789
  get: function () {
25563
25790
  if (this.survey && this.survey.state === "preview")
25564
- return this.depth === 1;
25791
+ return (this.parent && this.parent instanceof _page__WEBPACK_IMPORTED_MODULE_13__["PageModel"]);
25565
25792
  return false;
25566
25793
  },
25567
25794
  enumerable: false,
@@ -25617,7 +25844,7 @@ var PanelModel = /** @class */ (function (_super) {
25617
25844
  };
25618
25845
  Object.defineProperty(PanelModel.prototype, "showPanelAsPage", {
25619
25846
  get: function () {
25620
- return !!this.originalPage && !this.survey.isShowingPreview;
25847
+ return !!this.originalPage;
25621
25848
  },
25622
25849
  enumerable: false,
25623
25850
  configurable: true
@@ -25881,7 +26108,7 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
25881
26108
  .append("sv-popup--dropdown-overlay", this.isOverlay && this.model.overlayDisplayMode !== "overlay")
25882
26109
  .append("sv-popup--tablet", this.isTablet && this.isOverlay)
25883
26110
  .append("sv-popup--show-pointer", !this.isOverlay && this.showHeader)
25884
- .append("sv-popup--" + this.popupDirection, !this.isOverlay && this.showHeader);
26111
+ .append("sv-popup--" + this.popupDirection, !this.isOverlay && (this.showHeader || this.popupDirection == "top" || this.popupDirection == "bottom"));
25885
26112
  };
25886
26113
  PopupDropdownViewModel.prototype.getShowHeader = function () {
25887
26114
  return this.model.showPointer && !this.isOverlay;
@@ -26563,12 +26790,7 @@ __webpack_require__.r(__webpack_exports__);
26563
26790
 
26564
26791
  function createPopupModalViewModel(options, rootElement) {
26565
26792
  var _a;
26566
- var popupModel = new _popup__WEBPACK_IMPORTED_MODULE_1__["PopupModel"](options.componentName, options.data, "top", "left", false, true, options.onCancel, options.onApply, function () {
26567
- options.onHide();
26568
- if (!!container) {
26569
- popupViewModel.resetComponentElement();
26570
- }
26571
- }, options.onShow, options.cssClass, options.title);
26793
+ var popupModel = new _popup__WEBPACK_IMPORTED_MODULE_1__["PopupModel"](options.componentName, options.data, "top", "left", false, true, options.onCancel, options.onApply, options.onHide, options.onShow, options.cssClass, options.title);
26572
26794
  popupModel.displayMode = options.displayMode || "popup";
26573
26795
  popupModel.isFocusedContent = (_a = options.isFocusedContent) !== null && _a !== void 0 ? _a : true;
26574
26796
  var popupViewModel = new _popup_modal_view_model__WEBPACK_IMPORTED_MODULE_3__["PopupModalViewModel"](popupModel);
@@ -26580,6 +26802,15 @@ function createPopupModalViewModel(options, rootElement) {
26580
26802
  if (!popupViewModel.container) {
26581
26803
  popupViewModel.initializePopupContainer();
26582
26804
  }
26805
+ var onVisibilityChangedCallback = function (sender, options) {
26806
+ if (!options.isVisible) {
26807
+ if (!!container) {
26808
+ popupViewModel.resetComponentElement();
26809
+ }
26810
+ }
26811
+ popupViewModel.onVisibilityChanged.remove(onVisibilityChangedCallback);
26812
+ };
26813
+ popupViewModel.onVisibilityChanged.add(onVisibilityChangedCallback);
26583
26814
  return popupViewModel;
26584
26815
  }
26585
26816
  function createPopupViewModel(model, targetElement) {
@@ -26611,7 +26842,8 @@ __webpack_require__.r(__webpack_exports__);
26611
26842
  /* harmony import */ var _actions_container__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./actions/container */ "./src/actions/container.ts");
26612
26843
  /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
26613
26844
  /* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
26614
- /* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./global_variables_utils */ "./src/global_variables_utils.ts");
26845
+ /* harmony import */ var _utils_animation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/animation */ "./src/utils/animation.ts");
26846
+ /* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./global_variables_utils */ "./src/global_variables_utils.ts");
26615
26847
  var __extends = (undefined && undefined.__extends) || (function () {
26616
26848
  var extendStatics = function (d, b) {
26617
26849
  extendStatics = Object.setPrototypeOf ||
@@ -26640,19 +26872,64 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
26640
26872
 
26641
26873
 
26642
26874
 
26875
+
26643
26876
  var FOCUS_INPUT_SELECTOR = "input:not(:disabled):not([readonly]):not([type=hidden]),select:not(:disabled):not([readonly]),textarea:not(:disabled):not([readonly]), button:not(:disabled):not([readonly]), [tabindex]:not([tabindex^=\"-\"])";
26644
26877
  var PopupBaseViewModel = /** @class */ (function (_super) {
26645
26878
  __extends(PopupBaseViewModel, _super);
26646
26879
  function PopupBaseViewModel(model) {
26647
26880
  var _this = _super.call(this) || this;
26648
- _this.subscriptionId = PopupBaseViewModel.SubscriptionId++;
26649
26881
  _this.popupSelector = ".sv-popup";
26650
26882
  _this.fixedPopupContainer = ".sv-popup";
26651
26883
  _this.containerSelector = ".sv-popup__container";
26652
26884
  _this.scrollingContentSelector = ".sv-popup__scrolling-content";
26885
+ _this.visibilityAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_6__["AnimationBoolean"](_this, function (val) {
26886
+ if (_this._isVisible !== val) {
26887
+ if (!val) {
26888
+ _this.updateOnHiding();
26889
+ _this.updateIsVisible(val);
26890
+ }
26891
+ else {
26892
+ _this.updateIsVisible(val);
26893
+ }
26894
+ }
26895
+ }, function () { return _this._isVisible; });
26896
+ _this.onVisibilityChanged = new _base__WEBPACK_IMPORTED_MODULE_0__["EventBase"]();
26897
+ _this.onModelIsVisibleChangedCallback = function () {
26898
+ _this.isVisible = _this.model.isVisible;
26899
+ };
26653
26900
  _this.model = model;
26654
26901
  return _this;
26655
26902
  }
26903
+ PopupBaseViewModel.prototype.updateIsVisible = function (val) {
26904
+ this._isVisible = val;
26905
+ this.onVisibilityChanged.fire(this, { isVisible: val });
26906
+ };
26907
+ PopupBaseViewModel.prototype.getLeaveOptions = function () {
26908
+ return { cssClass: "sv-popup--animate-leave" };
26909
+ };
26910
+ PopupBaseViewModel.prototype.getEnterOptions = function () {
26911
+ return { cssClass: "sv-popup--animate-enter" };
26912
+ };
26913
+ PopupBaseViewModel.prototype.getAnimatedElement = function () {
26914
+ return this.getAnimationContainer();
26915
+ };
26916
+ PopupBaseViewModel.prototype.isAnimationEnabled = function () {
26917
+ return this.model.displayMode !== "overlay" && _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].animationEnabled;
26918
+ };
26919
+ PopupBaseViewModel.prototype.getAnimationContainer = function () {
26920
+ var _a;
26921
+ return (_a = this.container) === null || _a === void 0 ? void 0 : _a.querySelector(this.fixedPopupContainer);
26922
+ };
26923
+ Object.defineProperty(PopupBaseViewModel.prototype, "isVisible", {
26924
+ get: function () {
26925
+ return this._isVisible;
26926
+ },
26927
+ set: function (val) {
26928
+ this.visibilityAnimation.sync(val);
26929
+ },
26930
+ enumerable: false,
26931
+ configurable: true
26932
+ });
26656
26933
  Object.defineProperty(PopupBaseViewModel.prototype, "container", {
26657
26934
  get: function () {
26658
26935
  return this.containerElement || this.createdContainer;
@@ -26711,20 +26988,13 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
26711
26988
  PopupBaseViewModel.prototype.onModelChanging = function (newModel) {
26712
26989
  };
26713
26990
  PopupBaseViewModel.prototype.setupModel = function (model) {
26714
- var _this = this;
26715
26991
  if (!!this.model) {
26716
- this.model.unregisterPropertyChangedHandlers(["isVisible"], "PopupBaseViewModel" + this.subscriptionId);
26992
+ this.model.onVisibilityChanged.remove(this.onModelIsVisibleChangedCallback);
26717
26993
  }
26718
26994
  this.onModelChanging(model);
26719
26995
  this._model = model;
26720
- var onIsVisibleChangedHandler = function () {
26721
- if (!model.isVisible) {
26722
- _this.updateOnHiding();
26723
- }
26724
- _this.isVisible = model.isVisible;
26725
- };
26726
- model.registerPropertyChangedHandlers(["isVisible"], onIsVisibleChangedHandler, "PopupBaseViewModel" + this.subscriptionId);
26727
- onIsVisibleChangedHandler();
26996
+ model.onVisibilityChanged.add(this.onModelIsVisibleChangedCallback);
26997
+ this.onModelIsVisibleChangedCallback();
26728
26998
  };
26729
26999
  Object.defineProperty(PopupBaseViewModel.prototype, "model", {
26730
27000
  get: function () {
@@ -26904,7 +27174,7 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
26904
27174
  PopupBaseViewModel.prototype.dispose = function () {
26905
27175
  _super.prototype.dispose.call(this);
26906
27176
  if (this.model) {
26907
- this.model.unregisterPropertyChangedHandlers(["isVisible"], "PopupBaseViewModel" + this.subscriptionId);
27177
+ this.model.onVisibilityChanged.remove(this.onModelIsVisibleChangedCallback);
26908
27178
  }
26909
27179
  if (!!this.createdContainer) {
26910
27180
  this.createdContainer.remove();
@@ -26917,7 +27187,7 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
26917
27187
  };
26918
27188
  PopupBaseViewModel.prototype.initializePopupContainer = function () {
26919
27189
  if (!this.container) {
26920
- var container = _global_variables_utils__WEBPACK_IMPORTED_MODULE_6__["DomDocumentHelper"].createElement("div");
27190
+ var container = _global_variables_utils__WEBPACK_IMPORTED_MODULE_7__["DomDocumentHelper"].createElement("div");
26921
27191
  this.createdContainer = container;
26922
27192
  Object(_utils_utils__WEBPACK_IMPORTED_MODULE_5__["getElement"])(_settings__WEBPACK_IMPORTED_MODULE_4__["settings"].environment.popupMountContainer).appendChild(container);
26923
27193
  }
@@ -26934,7 +27204,7 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
26934
27204
  PopupBaseViewModel.prototype.preventScrollOuside = function (event, deltaY) {
26935
27205
  var currentElement = event.target;
26936
27206
  while (currentElement !== this.container) {
26937
- if (_global_variables_utils__WEBPACK_IMPORTED_MODULE_6__["DomDocumentHelper"].getComputedStyle(currentElement).overflowY === "auto" && currentElement.scrollHeight !== currentElement.offsetHeight) {
27207
+ if (_global_variables_utils__WEBPACK_IMPORTED_MODULE_7__["DomDocumentHelper"].getComputedStyle(currentElement).overflowY === "auto" && currentElement.scrollHeight !== currentElement.offsetHeight) {
26938
27208
  var scrollHeight = currentElement.scrollHeight, scrollTop = currentElement.scrollTop, clientHeight = currentElement.clientHeight;
26939
27209
  if (!(deltaY > 0 && Math.abs(scrollHeight - clientHeight - scrollTop) < 1) && !(deltaY < 0 && scrollTop <= 0)) {
26940
27210
  return;
@@ -26946,7 +27216,6 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
26946
27216
  event.preventDefault();
26947
27217
  }
26948
27218
  };
26949
- PopupBaseViewModel.SubscriptionId = 0;
26950
27219
  __decorate([
26951
27220
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: "0px" })
26952
27221
  ], PopupBaseViewModel.prototype, "top", void 0);
@@ -26964,7 +27233,7 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
26964
27233
  ], PopupBaseViewModel.prototype, "minWidth", void 0);
26965
27234
  __decorate([
26966
27235
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: false })
26967
- ], PopupBaseViewModel.prototype, "isVisible", void 0);
27236
+ ], PopupBaseViewModel.prototype, "_isVisible", void 0);
26968
27237
  __decorate([
26969
27238
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
26970
27239
  ], PopupBaseViewModel.prototype, "locale", void 0);
@@ -35099,6 +35368,7 @@ __webpack_require__.r(__webpack_exports__);
35099
35368
  /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
35100
35369
  /* harmony import */ var _textPreProcessor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./textPreProcessor */ "./src/textPreProcessor.ts");
35101
35370
  /* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
35371
+ /* harmony import */ var _error__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./error */ "./src/error.ts");
35102
35372
  var __extends = (undefined && undefined.__extends) || (function () {
35103
35373
  var extendStatics = function (d, b) {
35104
35374
  extendStatics = Object.setPrototypeOf ||
@@ -35120,6 +35390,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
35120
35390
 
35121
35391
 
35122
35392
 
35393
+
35123
35394
  var ComponentQuestionJSON = /** @class */ (function () {
35124
35395
  function ComponentQuestionJSON(name, json) {
35125
35396
  this.name = name;
@@ -35160,6 +35431,11 @@ var ComponentQuestionJSON = /** @class */ (function () {
35160
35431
  return;
35161
35432
  this.json.onUpdateQuestionCssClasses(question, element, css);
35162
35433
  };
35434
+ ComponentQuestionJSON.prototype.onSetQuestionValue = function (question, newValue) {
35435
+ if (!this.json.onSetQuestionValue)
35436
+ return;
35437
+ this.json.onSetQuestionValue(question, newValue);
35438
+ };
35163
35439
  ComponentQuestionJSON.prototype.onPropertyChanged = function (question, propertyName, newValue) {
35164
35440
  if (!this.json.onPropertyChanged)
35165
35441
  return;
@@ -35175,6 +35451,11 @@ var ComponentQuestionJSON = /** @class */ (function () {
35175
35451
  return newValue;
35176
35452
  return this.json.onValueChanging(question, name, newValue);
35177
35453
  };
35454
+ ComponentQuestionJSON.prototype.onGetErrorText = function (question) {
35455
+ if (!this.json.getErrorText)
35456
+ return undefined;
35457
+ return this.json.getErrorText(question);
35458
+ };
35178
35459
  ComponentQuestionJSON.prototype.onItemValuePropertyChanged = function (question, item, propertyName, name, newValue) {
35179
35460
  if (!this.json.onItemValuePropertyChanged)
35180
35461
  return;
@@ -35450,11 +35731,23 @@ var QuestionCustomModelBase = /** @class */ (function (_super) {
35450
35731
  if (updateIsAnswered === void 0) { updateIsAnswered = true; }
35451
35732
  _super.prototype.setQuestionValue.call(this, newValue, updateIsAnswered);
35452
35733
  this.updateElementCss();
35734
+ if (!!this.customQuestion) {
35735
+ this.customQuestion.onSetQuestionValue(this, newValue);
35736
+ }
35453
35737
  };
35454
35738
  QuestionCustomModelBase.prototype.setNewValue = function (newValue) {
35455
35739
  _super.prototype.setNewValue.call(this, newValue);
35456
35740
  this.updateElementCss();
35457
35741
  };
35742
+ QuestionCustomModelBase.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
35743
+ _super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
35744
+ if (!!this.customQuestion) {
35745
+ var text = this.customQuestion.onGetErrorText(this);
35746
+ if (!!text) {
35747
+ errors.push(new _error__WEBPACK_IMPORTED_MODULE_6__["CustomError"](text, this));
35748
+ }
35749
+ }
35750
+ };
35458
35751
  //ISurveyImpl
35459
35752
  QuestionCustomModelBase.prototype.getSurveyData = function () {
35460
35753
  return this;
@@ -35469,6 +35762,9 @@ var QuestionCustomModelBase = /** @class */ (function (_super) {
35469
35762
  QuestionCustomModelBase.prototype.setValue = function (name, newValue, locNotification, allowNotifyValueChanged) {
35470
35763
  if (!this.data)
35471
35764
  return;
35765
+ if (!!this.customQuestion) {
35766
+ this.customQuestion.onValueChanged(this, name, newValue);
35767
+ }
35472
35768
  var newName = this.convertDataName(name);
35473
35769
  var valueForSurvey = this.convertDataValue(name, newValue);
35474
35770
  if (this.valueToDataCallback) {
@@ -35477,9 +35773,6 @@ var QuestionCustomModelBase = /** @class */ (function (_super) {
35477
35773
  this.data.setValue(newName, valueForSurvey, locNotification, allowNotifyValueChanged);
35478
35774
  this.updateIsAnswered();
35479
35775
  this.updateElementCss();
35480
- if (!!this.customQuestion) {
35481
- this.customQuestion.onValueChanged(this, name, newValue);
35482
- }
35483
35776
  };
35484
35777
  QuestionCustomModelBase.prototype.getQuestionByName = function (name) {
35485
35778
  return undefined;
@@ -36086,7 +36379,8 @@ var QuestionCompositeModel = /** @class */ (function (_super) {
36086
36379
  this.contentPanel.questions.forEach(function (q) { return q.collectNestedQuestions(questions, visibleOnly); });
36087
36380
  };
36088
36381
  QuestionCompositeModel.prototype.convertDataValue = function (name, newValue) {
36089
- var val = this.getValueForContentPanel(this.value);
36382
+ var val = !!this.contentPanel && !this.isEditingSurveyElement ?
36383
+ this.contentPanel.getValue() : this.getValueForContentPanel(this.value);
36090
36384
  if (!val)
36091
36385
  val = {};
36092
36386
  if (this.isValueEmpty(newValue) && !this.isEditingSurveyElement) {
@@ -39325,11 +39619,12 @@ var QuestionImagePickerModel = /** @class */ (function (_super) {
39325
39619
  /**
39326
39620
  * Specifies the height of containers for images or videos. Accepts positive numbers and CSS values.
39327
39621
  *
39328
- * Default value: undefined
39622
+ * Default value: `auto`
39623
+ *
39624
+ * This property allows you to specify the exact image height. If you do not set it, the height will be calculated automatically based on the [`minImageHeight`](#minImageHeight) and [`maxImageHeight`](#maxImageHeight) values and available screen height.
39329
39625
  *
39330
- * Use the `imageFit` property to specify how to fit the images or videos into their containers.
39626
+ * Use the [`imageFit`](#imageFit) property to specify how to fit the images or videos into their containers.
39331
39627
  * @see imageWidth
39332
- * @see imageFit
39333
39628
  */
39334
39629
  get: function () {
39335
39630
  return this.getPropertyValue("imageHeight");
@@ -39352,11 +39647,12 @@ var QuestionImagePickerModel = /** @class */ (function (_super) {
39352
39647
  /**
39353
39648
  * Specifies the width of containers for images or videos. Accepts positive numbers and CSS values.
39354
39649
  *
39355
- * Default value: 200
39650
+ * Default value: `auto`
39651
+ *
39652
+ * This property allows you to specify the exact image width. If you do not set it, the width will be calculated automatically based on the [`minImageWidth`](#minImageWidth) and [`maxImageWidth`](#maxImageWidth) values and available screen width.
39356
39653
  *
39357
- * Use the `imageFit` property to specify how to fit the images or videos into their containers.
39654
+ * Use the [`imageFit`](#imageFit) property to specify how to fit the images or videos into their containers.
39358
39655
  * @see imageHeight
39359
- * @see imageFit
39360
39656
  */
39361
39657
  get: function () {
39362
39658
  return this.getPropertyValue("imageWidth");
@@ -43748,10 +44044,9 @@ var MatrixDropdownColumn = /** @class */ (function (_super) {
43748
44044
  });
43749
44045
  Object.defineProperty(MatrixDropdownColumn.prototype, "isRequired", {
43750
44046
  /**
43751
- * Marks the column as required. If a respondent skips any cell in a required column, the matrix displays a validation error.
44047
+ * Marks the column as required. If a respondent skips any cell in a required column, the matrix displays a [validation error](#requiredErrorText).
43752
44048
  *
43753
44049
  * If you want to mark the column as required based on a condition, specify the [`requiredIf`](#requiredIf) property.
43754
- * @see requiredErrorText
43755
44050
  * @see visible
43756
44051
  * @see readOnly
43757
44052
  */
@@ -45237,7 +45532,8 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
45237
45532
  };
45238
45533
  QuestionMatrixDropdownRenderedTable.prototype.getRowDragCell = function (rowIndex) {
45239
45534
  var cell = new QuestionMatrixDropdownRenderedCell();
45240
- cell.isDragHandlerCell = true;
45535
+ var lockedRows = this.matrix.lockedRowCount;
45536
+ cell.isDragHandlerCell = lockedRows < 1 || rowIndex >= lockedRows;
45241
45537
  cell.className = this.getActionsCellClassName(cell);
45242
45538
  cell.row = this.matrix.visibleRows[rowIndex];
45243
45539
  return cell;
@@ -45827,7 +46123,7 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
45827
46123
  _this.registerPropertyChangedHandlers(["hideColumnsIfEmpty", "allowAddRows"], function () {
45828
46124
  _this.updateShowTableAndAddRow();
45829
46125
  });
45830
- _this.registerPropertyChangedHandlers(["allowRowsDragAndDrop", "isReadOnly"], function () { _this.clearRowsAndResetRenderedTable(); });
46126
+ _this.registerPropertyChangedHandlers(["allowRowsDragAndDrop", "isReadOnly", "lockedRowCount"], function () { _this.clearRowsAndResetRenderedTable(); });
45831
46127
  _this.dragOrClickHelper = new _utils_dragOrClickHelper__WEBPACK_IMPORTED_MODULE_9__["DragOrClickHelper"](_this.startDragMatrixRow);
45832
46128
  return _this;
45833
46129
  }
@@ -46058,6 +46354,16 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
46058
46354
  enumerable: false,
46059
46355
  configurable: true
46060
46356
  });
46357
+ Object.defineProperty(QuestionMatrixDynamicModel.prototype, "lockedRowCount", {
46358
+ get: function () {
46359
+ return this.getPropertyValue("lockedRowCount", 0);
46360
+ },
46361
+ set: function (val) {
46362
+ this.setPropertyValue("lockedRowCount", val);
46363
+ },
46364
+ enumerable: false,
46365
+ configurable: true
46366
+ });
46061
46367
  Object.defineProperty(QuestionMatrixDynamicModel.prototype, "iconDragElement", {
46062
46368
  get: function () {
46063
46369
  return this.cssClasses.iconDragElement;
@@ -46215,7 +46521,10 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
46215
46521
  QuestionMatrixDynamicModel.prototype.canRemoveRow = function (row) {
46216
46522
  if (!this.survey)
46217
46523
  return true;
46218
- return this.survey.matrixAllowRemoveRow(this, row.index, row);
46524
+ var index = row.rowIndex - 1;
46525
+ if (this.lockedRowCount > 0 && index < this.lockedRowCount)
46526
+ return false;
46527
+ return this.survey.matrixAllowRemoveRow(this, index, row);
46219
46528
  };
46220
46529
  QuestionMatrixDynamicModel.prototype.addRowUI = function () {
46221
46530
  this.addRow(true);
@@ -46923,9 +47232,9 @@ var MultipleTextEditorModel = /** @class */ (function (_super) {
46923
47232
  }(_question_text__WEBPACK_IMPORTED_MODULE_3__["QuestionTextModel"]));
46924
47233
 
46925
47234
  /**
46926
- * A class that describes an item in a [Multiple Textboxes](https://surveyjs.io/form-library/documentation/api-reference/multiple-text-entry-question-model) question.
47235
+ * A class that describes an [item](https://surveyjs.io/form-library/documentation/api-reference/multiple-text-entry-question-model#items) in a Multiple Textboxes question.
46927
47236
  *
46928
- * [View Demo](https://surveyjs.io/form-library/examples/multiple-text-box-question/)
47237
+ * [View Demo](https://surveyjs.io/form-library/examples/multiple-text-box-question/ (linkStyle))
46929
47238
  */
46930
47239
  var MultipleTextItemModel = /** @class */ (function (_super) {
46931
47240
  __extends(MultipleTextItemModel, _super);
@@ -46937,6 +47246,7 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
46937
47246
  _this.editor.focusIn();
46938
47247
  };
46939
47248
  _this.editorValue = _this.createEditor(name);
47249
+ _this.maskSettings = _this.editorValue.maskSettings;
46940
47250
  _this.editor.questionTitleTemplateCallback = function () {
46941
47251
  return "";
46942
47252
  };
@@ -46961,7 +47271,10 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
46961
47271
  };
46962
47272
  Object.defineProperty(MultipleTextItemModel.prototype, "name", {
46963
47273
  /**
46964
- * The item name.
47274
+ * An item ID that is not visible to respondents.
47275
+ *
47276
+ * > Item IDs must be unique.
47277
+ * @see title
46965
47278
  */
46966
47279
  get: function () {
46967
47280
  return this.editor.name;
@@ -47012,7 +47325,7 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
47012
47325
  };
47013
47326
  Object.defineProperty(MultipleTextItemModel.prototype, "isRequired", {
47014
47327
  /**
47015
- * Set this property to true, to make the item a required. If a user doesn't fill the item then a validation error will be generated.
47328
+ * Marks the item as required. If a respondent leaves this item empty, the question displays a [validation error](#requiredErrorText).
47016
47329
  */
47017
47330
  get: function () {
47018
47331
  return this.editor.isRequired;
@@ -47025,7 +47338,9 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
47025
47338
  });
47026
47339
  Object.defineProperty(MultipleTextItemModel.prototype, "inputType", {
47027
47340
  /**
47028
- * Use this property to change the default input type.
47341
+ * A value passed on to the [`type`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types) attribute of the underlying `<input>` element.
47342
+ *
47343
+ * Default value: `"text"`
47029
47344
  */
47030
47345
  get: function () {
47031
47346
  return this.editor.inputType;
@@ -47038,8 +47353,7 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
47038
47353
  });
47039
47354
  Object.defineProperty(MultipleTextItemModel.prototype, "title", {
47040
47355
  /**
47041
- * Item title. If it is empty, the item name is rendered as title. This property supports markdown.
47042
- * @see name
47356
+ * A user-friendly item label to display. If `title` is undefined, [`name`](https://surveyjs.io/form-library/documentation/api-reference/multipletextitemmodel#name) is displayed instead.
47043
47357
  */
47044
47358
  get: function () {
47045
47359
  return this.editor.title;
@@ -47066,9 +47380,9 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
47066
47380
  });
47067
47381
  Object.defineProperty(MultipleTextItemModel.prototype, "maxLength", {
47068
47382
  /**
47069
- * The maximum text length. If it is -1, defaul value, then the survey maxTextLength property will be used.
47070
- * If it is 0, then the value is unlimited
47071
- * @see SurveyModel.maxTextLength
47383
+ * The maximum text length measured in characters. Assign 0 if the length should be unlimited.
47384
+ *
47385
+ * Default value: -1 (inherits the actual value from the `SurveyModel`'s [`maxTextLength`](https://surveyjs.io/form-library/documentation/surveymodel#maxTextLength) property).
47072
47386
  */
47073
47387
  get: function () {
47074
47388
  return this.editor.maxLength;
@@ -47085,7 +47399,7 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
47085
47399
  };
47086
47400
  Object.defineProperty(MultipleTextItemModel.prototype, "placeholder", {
47087
47401
  /**
47088
- * The input place holder.
47402
+ * A placeholder for the input field.
47089
47403
  */
47090
47404
  get: function () {
47091
47405
  return this.editor.placeholder;
@@ -47122,7 +47436,7 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
47122
47436
  });
47123
47437
  Object.defineProperty(MultipleTextItemModel.prototype, "requiredErrorText", {
47124
47438
  /**
47125
- * The custom text that will be shown on required error. Use this property, if you do not want to show the default text.
47439
+ * Specifies a custom error message for a [required item](#isRequired).
47126
47440
  */
47127
47441
  get: function () {
47128
47442
  return this.editor.requiredErrorText;
@@ -47142,7 +47456,9 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
47142
47456
  });
47143
47457
  Object.defineProperty(MultipleTextItemModel.prototype, "size", {
47144
47458
  /**
47145
- * The input size.
47459
+ * A value passed on to the [`size`](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/size) attribute of the underlying `<input>` element.
47460
+ *
47461
+ * If you want to set a uniform `size` for all text box items, use the [`itemSize`](https://surveyjs.io/form-library/documentation/api-reference/multiple-text-entry-question-model#itemSize) within the Multiple Textboxes configuration.
47146
47462
  */
47147
47463
  get: function () {
47148
47464
  return this.editor.size;
@@ -47155,7 +47471,9 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
47155
47471
  });
47156
47472
  Object.defineProperty(MultipleTextItemModel.prototype, "defaultValueExpression", {
47157
47473
  /**
47158
- * An expression used to calculate the [defaultValue](https://surveyjs.io/form-library/documentation/question#defaultValue).
47474
+ * An [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) used to calculate the default item value.
47475
+ * @see minValueExpression
47476
+ * @see maxValueExpression
47159
47477
  */
47160
47478
  get: function () {
47161
47479
  return this.editor.defaultValueExpression;
@@ -47168,7 +47486,9 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
47168
47486
  });
47169
47487
  Object.defineProperty(MultipleTextItemModel.prototype, "minValueExpression", {
47170
47488
  /**
47171
- * The minimum value specified as an expression. For example, `"minValueExpression": "today(-1)"` sets the minimum value to yesterday.
47489
+ * An [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) used to calculate the minimum item value.
47490
+ * @see maxValueExpression
47491
+ * @see defaultValueExpression
47172
47492
  */
47173
47493
  get: function () {
47174
47494
  return this.editor.minValueExpression;
@@ -47181,7 +47501,9 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
47181
47501
  });
47182
47502
  Object.defineProperty(MultipleTextItemModel.prototype, "maxValueExpression", {
47183
47503
  /**
47184
- * The maximum value specified as an expression. For example, `"maxValueExpression": "today(1)"` sets the maximum value to tomorrow.
47504
+ * An [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) used to calculate the maximum item value.
47505
+ * @see minValueExpression
47506
+ * @see defaultValueExpression
47185
47507
  */
47186
47508
  get: function () {
47187
47509
  return this.editor.maxValueExpression;
@@ -47194,7 +47516,9 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
47194
47516
  });
47195
47517
  Object.defineProperty(MultipleTextItemModel.prototype, "validators", {
47196
47518
  /**
47197
- * The list of question validators.
47519
+ * Item validators.
47520
+ *
47521
+ * [Data Validation](https://surveyjs.io/form-library/documentation/data-validation (linkStyle))
47198
47522
  */
47199
47523
  get: function () {
47200
47524
  return this.editor.validators;
@@ -47208,9 +47532,71 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
47208
47532
  MultipleTextItemModel.prototype.getValidators = function () {
47209
47533
  return this.validators;
47210
47534
  };
47535
+ Object.defineProperty(MultipleTextItemModel.prototype, "maskType", {
47536
+ /**
47537
+ * Specifies the type of a mask applied to the input.
47538
+ *
47539
+ * Possible values:
47540
+ *
47541
+ * - `"none"` (default)
47542
+ * - `"numeric"`
47543
+ * - `"currency"`
47544
+ * - `"datetime"`
47545
+ * - `"pattern"`
47546
+ *
47547
+ * [View Demo](https://surveyjs.io/form-library/examples/masked-input-fields/ (linkStyle))
47548
+ * @see maskSettings
47549
+ */
47550
+ get: function () {
47551
+ return this.editor.maskType;
47552
+ },
47553
+ set: function (val) {
47554
+ this.editor.maskType = val;
47555
+ this.maskSettings = this.editor.maskSettings;
47556
+ },
47557
+ enumerable: false,
47558
+ configurable: true
47559
+ });
47560
+ Object.defineProperty(MultipleTextItemModel.prototype, "maskSettings", {
47561
+ /**
47562
+ * An object with properties that configure the mask applied to the input.
47563
+ *
47564
+ * Available properties depend on the specified [`maskType`](#maskType) and belong to corresponding classes. Refer to the class APIs for a full list of properties:
47565
+ *
47566
+ * | `maskType` | Class |
47567
+ * | ---------- | ----- |
47568
+ * | `"numeric"` | [`InputMaskNumeric`](https://surveyjs.io/form-library/documentation/api-reference/inputmasknumeric) |
47569
+ * | `"currency"` | [`InputMaskCurrency`](https://surveyjs.io/form-library/documentation/api-reference/inputmaskcurrency) |
47570
+ * | `"datetime"` | [`InputMaskDateTime`](https://surveyjs.io/form-library/documentation/api-reference/inputmaskdatetime) |
47571
+ * | `"pattern"` | [`InputMaskPattern`](https://surveyjs.io/form-library/documentation/api-reference/inputmaskpattern) |
47572
+ *
47573
+ * [View Demo](https://surveyjs.io/form-library/examples/masked-input-fields/ (linkStyle))
47574
+ */
47575
+ get: function () {
47576
+ return this.getPropertyValue("maskSettings");
47577
+ },
47578
+ set: function (val) {
47579
+ this.setPropertyValue("maskSettings", val);
47580
+ if (this.editor.maskSettings !== val) {
47581
+ this.editor.maskSettings = val;
47582
+ }
47583
+ },
47584
+ enumerable: false,
47585
+ configurable: true
47586
+ });
47587
+ Object.defineProperty(MultipleTextItemModel.prototype, "inputTextAlignment", {
47588
+ get: function () {
47589
+ return this.editor.inputTextAlignment;
47590
+ },
47591
+ set: function (val) {
47592
+ this.editor.inputTextAlignment = val;
47593
+ },
47594
+ enumerable: false,
47595
+ configurable: true
47596
+ });
47211
47597
  Object.defineProperty(MultipleTextItemModel.prototype, "value", {
47212
47598
  /**
47213
- * The item value.
47599
+ * An item value.
47214
47600
  */
47215
47601
  get: function () {
47216
47602
  return this.data ? this.data.getMultipleTextValue(this.name) : null;
@@ -47400,9 +47786,9 @@ var QuestionMultipleTextModel = /** @class */ (function (_super) {
47400
47786
  };
47401
47787
  Object.defineProperty(QuestionMultipleTextModel.prototype, "items", {
47402
47788
  /**
47403
- * Gets or sets an array of `MultipleTextItemModel` objects that represent input items.
47789
+ * Gets or sets an array of [`MultipleTextItemModel`](https://surveyjs.io/form-library/documentation/api-reference/multipletextitemmodel) objects that represent input items.
47404
47790
  *
47405
- * This property accepts an array of objects with the following structure:
47791
+ * Each object in this array should have at least the following properties:
47406
47792
  *
47407
47793
  * ```js
47408
47794
  * {
@@ -47443,6 +47829,12 @@ var QuestionMultipleTextModel = /** @class */ (function (_super) {
47443
47829
  }
47444
47830
  return null;
47445
47831
  };
47832
+ QuestionMultipleTextModel.prototype.getElementsInDesign = function (includeHidden) {
47833
+ if (includeHidden === void 0) { includeHidden = false; }
47834
+ var elements;
47835
+ elements = _super.prototype.getElementsInDesign.call(this, includeHidden);
47836
+ return elements.concat(this.items);
47837
+ };
47446
47838
  QuestionMultipleTextModel.prototype.addConditionObjectsByContext = function (objects, context) {
47447
47839
  for (var i = 0; i < this.items.length; i++) {
47448
47840
  var item = this.items[i];
@@ -47896,6 +48288,31 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].addClass("multipletextite
47896
48288
  default: "text",
47897
48289
  choices: _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].questions.inputTypes,
47898
48290
  },
48291
+ {
48292
+ name: "maskType:masktype",
48293
+ default: "none",
48294
+ visibleIndex: 0,
48295
+ dependsOn: "inputType",
48296
+ visibleIf: function (obj) {
48297
+ return obj.inputType === "text";
48298
+ }
48299
+ },
48300
+ {
48301
+ name: "maskSettings:masksettings",
48302
+ className: "masksettings",
48303
+ visibleIndex: 1,
48304
+ dependsOn: "inputType",
48305
+ visibleIf: function (obj) {
48306
+ return obj.inputType === "text";
48307
+ },
48308
+ onGetValue: function (obj) {
48309
+ return obj.maskSettings.getData();
48310
+ },
48311
+ onSetValue: function (obj, value) {
48312
+ obj.maskSettings.setData(value);
48313
+ },
48314
+ },
48315
+ { name: "inputTextAlignment", default: "auto", choices: ["left", "right", "auto"], visible: false },
47899
48316
  { name: "title", serializationProperty: "locTitle" },
47900
48317
  { name: "maxLength:number", default: -1 },
47901
48318
  { name: "size:number", minValue: 0 },
@@ -50944,6 +51361,7 @@ __webpack_require__.r(__webpack_exports__);
50944
51361
  /* harmony import */ var _utils_devices__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/devices */ "./src/utils/devices.ts");
50945
51362
  /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
50946
51363
  /* harmony import */ var _src_settings__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../src/settings */ "./src/settings.ts");
51364
+ /* harmony import */ var _utils_animation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils/animation */ "./src/utils/animation.ts");
50947
51365
  var __extends = (undefined && undefined.__extends) || (function () {
50948
51366
  var extendStatics = function (d, b) {
50949
51367
  extendStatics = Object.setPrototypeOf ||
@@ -50975,6 +51393,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
50975
51393
 
50976
51394
 
50977
51395
 
51396
+
50978
51397
  /**
50979
51398
  * A class that describes the Ranking question type.
50980
51399
  *
@@ -50994,27 +51413,33 @@ var QuestionRankingModel = /** @class */ (function (_super) {
50994
51413
  if (_this.visibleChoices.length === 1 && !_this.selectToRankEnabled) {
50995
51414
  _this.value = [];
50996
51415
  _this.value.push(_this.visibleChoices[0].value);
50997
- _this.updateRankingChoices();
51416
+ _this.updateRankingChoicesSync();
50998
51417
  return;
50999
51418
  }
51000
51419
  if (_this.isEmpty()) {
51001
- _this.updateRankingChoices();
51420
+ _this.updateRankingChoicesSync();
51002
51421
  return;
51003
51422
  }
51004
51423
  if (_this.selectToRankEnabled) {
51005
- _this.updateRankingChoices();
51424
+ _this.updateRankingChoicesSync();
51006
51425
  return;
51007
51426
  }
51008
51427
  if (_this.visibleChoices.length > _this.value.length)
51009
51428
  _this.addToValueByVisibleChoices();
51010
51429
  if (_this.visibleChoices.length < _this.value.length)
51011
51430
  _this.removeFromValueByVisibleChoices();
51012
- _this.updateRankingChoices();
51431
+ _this.updateRankingChoicesSync();
51013
51432
  };
51014
51433
  _this.localeChanged = function () {
51015
51434
  _super.prototype.localeChanged.call(_this);
51016
- _this.updateRankingChoices();
51435
+ _this.updateRankingChoicesSync();
51017
51436
  };
51437
+ _this._rankingChoicesAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_10__["AnimationGroup"](_this.getChoicesAnimation(true), function (val) {
51438
+ _this.setPropertyValue("rankingChoices", val);
51439
+ }, function () { return _this.rankingChoices; });
51440
+ _this._unRankingChoicesAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_10__["AnimationGroup"](_this.getChoicesAnimation(false), function (val) {
51441
+ _this.setPropertyValue("unRankingChoices", val);
51442
+ }, function () { return _this.unRankingChoices; });
51018
51443
  _this.handlePointerDown = function (event, choice, node) {
51019
51444
  var target = event.target;
51020
51445
  if (!_this.isDragStartNodeValid(target))
@@ -51067,6 +51492,8 @@ var QuestionRankingModel = /** @class */ (function (_super) {
51067
51492
  _this.isValueSetByUser = false;
51068
51493
  _this.setValue = function () {
51069
51494
  var value = [];
51495
+ _this.rankingChoicesAnimation.cancel();
51496
+ _this.unRankingChoicesAnimation.cancel();
51070
51497
  _this.rankingChoices.forEach(function (choice) {
51071
51498
  value.push(choice.value);
51072
51499
  });
@@ -51074,10 +51501,11 @@ var QuestionRankingModel = /** @class */ (function (_super) {
51074
51501
  _this.isValueSetByUser = true;
51075
51502
  };
51076
51503
  _this.createNewArray("rankingChoices");
51504
+ _this.createNewArray("unRankingChoices");
51077
51505
  _this.registerFunctionOnPropertyValueChanged("selectToRankEnabled", function () {
51078
51506
  _this.clearValue();
51079
51507
  _this.setDragDropRankingChoices();
51080
- _this.updateRankingChoices();
51508
+ _this.updateRankingChoicesSync();
51081
51509
  });
51082
51510
  return _this;
51083
51511
  }
@@ -51114,10 +51542,12 @@ var QuestionRankingModel = /** @class */ (function (_super) {
51114
51542
  });
51115
51543
  QuestionRankingModel.prototype.getItemClassCore = function (item, options) {
51116
51544
  var itemIndex = this.rankingChoices.indexOf(item);
51545
+ var unrankedItemIndex = this.unRankingChoices.indexOf(item);
51117
51546
  var dropTargetIndex = this.rankingChoices.indexOf(this.currentDropTarget);
51547
+ var isDrop = (this.selectToRankEnabled && itemIndex > -1 && unrankedItemIndex > -1) || this.currentDropTarget === item;
51118
51548
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__["CssClassBuilder"]()
51119
51549
  .append(_super.prototype.getItemClassCore.call(this, item, options))
51120
- .append(this.cssClasses.itemGhostMod, this.currentDropTarget === item)
51550
+ .append(this.cssClasses.itemGhostMod, isDrop)
51121
51551
  .append("sv-dragdrop-movedown", itemIndex === dropTargetIndex + 1 && this.dropTargetNodeMove === "down")
51122
51552
  .append("sv-dragdrop-moveup", itemIndex === dropTargetIndex - 1 && this.dropTargetNodeMove === "up")
51123
51553
  .toString();
@@ -51169,10 +51599,15 @@ var QuestionRankingModel = /** @class */ (function (_super) {
51169
51599
  QuestionRankingModel.prototype.getNumberByIndex = function (index) {
51170
51600
  return this.isEmpty() ? "" : index + 1 + "";
51171
51601
  };
51602
+ QuestionRankingModel.prototype.updateRankingChoicesSync = function () {
51603
+ this.animationAllowed = false;
51604
+ this.updateRankingChoices();
51605
+ this.animationAllowed = true;
51606
+ };
51172
51607
  QuestionRankingModel.prototype.setSurveyImpl = function (value, isLight) {
51173
51608
  _super.prototype.setSurveyImpl.call(this, value, isLight);
51174
51609
  this.setDragDropRankingChoices();
51175
- this.updateRankingChoices();
51610
+ this.updateRankingChoicesSync();
51176
51611
  };
51177
51612
  QuestionRankingModel.prototype.isAnswerCorrect = function () {
51178
51613
  return _helpers__WEBPACK_IMPORTED_MODULE_8__["Helpers"].isArraysEqual(this.value, this.correctAnswer, false);
@@ -51186,7 +51621,7 @@ var QuestionRankingModel = /** @class */ (function (_super) {
51186
51621
  _super.prototype.onSurveyValueChanged.call(this, newValue);
51187
51622
  if (this.isLoadingFromJson)
51188
51623
  return;
51189
- this.updateRankingChoices();
51624
+ this.updateRankingChoicesSync();
51190
51625
  };
51191
51626
  QuestionRankingModel.prototype.addToValueByVisibleChoices = function () {
51192
51627
  var newValue = this.value.slice();
@@ -51207,27 +51642,61 @@ var QuestionRankingModel = /** @class */ (function (_super) {
51207
51642
  }
51208
51643
  this.value = newValue;
51209
51644
  };
51645
+ QuestionRankingModel.prototype.getChoicesAnimation = function (isRankingChoices) {
51646
+ var _this = this;
51647
+ return {
51648
+ isAnimationEnabled: function () { return _src_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].animationEnabled && _this.animationAllowed; },
51649
+ getLeaveOptions: function (item) {
51650
+ var choices = isRankingChoices ? _this.rankingChoices : _this.unRankingChoices;
51651
+ if (_this.renderedSelectToRankAreasLayout == "vertical" && choices.length == 1 && choices.indexOf(item) >= 0) {
51652
+ return { cssClass: "sv-ranking-item--animate-item-removing-empty" };
51653
+ }
51654
+ return { cssClass: "sv-ranking-item--animate-item-removing" };
51655
+ },
51656
+ getEnterOptions: function (item) {
51657
+ var choices = isRankingChoices ? _this.rankingChoices : _this.unRankingChoices;
51658
+ if (_this.renderedSelectToRankAreasLayout == "vertical" && choices.length == 1 && choices.indexOf(item) >= 0) {
51659
+ return { cssClass: "sv-ranking-item--animate-item-adding-empty" };
51660
+ }
51661
+ return { cssClass: "sv-ranking-item--animate-item-adding" };
51662
+ },
51663
+ getAnimatedElement: function (item) {
51664
+ var _a;
51665
+ var containerSelector = isRankingChoices ? ".sv-ranking__container--to" : ".sv-ranking__container--from";
51666
+ return (_a = _this.getWrapperElement()) === null || _a === void 0 ? void 0 : _a.querySelector(containerSelector + " .sv-ranking-item--ghost");
51667
+ }
51668
+ };
51669
+ };
51670
+ Object.defineProperty(QuestionRankingModel.prototype, "rankingChoicesAnimation", {
51671
+ get: function () {
51672
+ return this._rankingChoicesAnimation;
51673
+ },
51674
+ enumerable: false,
51675
+ configurable: true
51676
+ });
51677
+ Object.defineProperty(QuestionRankingModel.prototype, "unRankingChoicesAnimation", {
51678
+ get: function () {
51679
+ return this._unRankingChoicesAnimation;
51680
+ },
51681
+ enumerable: false,
51682
+ configurable: true
51683
+ });
51210
51684
  Object.defineProperty(QuestionRankingModel.prototype, "rankingChoices", {
51211
51685
  get: function () {
51212
51686
  return this.getPropertyValue("rankingChoices", []);
51213
51687
  },
51688
+ set: function (val) {
51689
+ this._rankingChoicesAnimation.sync(val);
51690
+ },
51214
51691
  enumerable: false,
51215
51692
  configurable: true
51216
51693
  });
51217
51694
  Object.defineProperty(QuestionRankingModel.prototype, "unRankingChoices", {
51218
51695
  get: function () {
51219
- var unRankingChoices = [];
51220
- var rankingChoices = this.rankingChoices;
51221
- this.visibleChoices.forEach(function (choice) {
51222
- unRankingChoices.push(choice);
51223
- });
51224
- rankingChoices.forEach(function (rankingChoice) {
51225
- unRankingChoices.forEach(function (choice, index) {
51226
- if (choice.value === rankingChoice.value)
51227
- unRankingChoices.splice(index, 1);
51228
- });
51229
- });
51230
- return unRankingChoices;
51696
+ return this.getPropertyValue("unRankingChoices", []);
51697
+ },
51698
+ set: function (val) {
51699
+ this._unRankingChoicesAnimation.sync(val);
51231
51700
  },
51232
51701
  enumerable: false,
51233
51702
  configurable: true
@@ -51259,20 +51728,32 @@ var QuestionRankingModel = /** @class */ (function (_super) {
51259
51728
  });
51260
51729
  this.setPropertyValue("rankingChoices", newRankingChoices);
51261
51730
  };
51731
+ QuestionRankingModel.prototype.updateUnRankingChoices = function (newRankingChoices) {
51732
+ var unRankingChoices = [];
51733
+ this.visibleChoices.forEach(function (choice) {
51734
+ unRankingChoices.push(choice);
51735
+ });
51736
+ newRankingChoices.forEach(function (rankingChoice) {
51737
+ unRankingChoices.forEach(function (choice, index) {
51738
+ if (choice.value === rankingChoice.value)
51739
+ unRankingChoices.splice(index, 1);
51740
+ });
51741
+ });
51742
+ this.unRankingChoices = unRankingChoices;
51743
+ };
51262
51744
  QuestionRankingModel.prototype.updateRankingChoicesSelectToRankMode = function (forceUpdate) {
51263
51745
  var _this = this;
51264
- if (this.isEmpty()) {
51265
- this.setPropertyValue("rankingChoices", []);
51266
- return;
51267
- }
51268
51746
  var newRankingChoices = [];
51269
- this.value.forEach(function (valueItem) {
51270
- _this.visibleChoices.forEach(function (choice) {
51271
- if (choice.value === valueItem)
51272
- newRankingChoices.push(choice);
51747
+ if (!this.isEmpty()) {
51748
+ this.value.forEach(function (valueItem) {
51749
+ _this.visibleChoices.forEach(function (choice) {
51750
+ if (choice.value === valueItem)
51751
+ newRankingChoices.push(choice);
51752
+ });
51273
51753
  });
51274
- });
51275
- this.setPropertyValue("rankingChoices", newRankingChoices);
51754
+ }
51755
+ this.updateUnRankingChoices(newRankingChoices);
51756
+ this.rankingChoices = newRankingChoices;
51276
51757
  };
51277
51758
  QuestionRankingModel.prototype.endLoadingFromJson = function () {
51278
51759
  _super.prototype.endLoadingFromJson.call(this);
@@ -51348,14 +51829,18 @@ var QuestionRankingModel = /** @class */ (function (_super) {
51348
51829
  var toIndex;
51349
51830
  if (key === " " && !isMovedElementRanked) {
51350
51831
  toIndex = 0;
51832
+ this.animationAllowed = false;
51351
51833
  dnd.selectToRank(this, fromIndex, toIndex);
51834
+ this.animationAllowed = true;
51352
51835
  this.setValueAfterKeydown(toIndex, "to-container");
51353
51836
  return;
51354
51837
  }
51355
51838
  if (!isMovedElementRanked)
51356
51839
  return;
51357
51840
  if (key === " ") {
51841
+ this.animationAllowed = false;
51358
51842
  dnd.unselectFromRank(this, fromIndex);
51843
+ this.animationAllowed = true;
51359
51844
  toIndex = this.unRankingChoices.indexOf(movedElement); //'this.' leads to actual array after the 'unselectFromRank' method
51360
51845
  this.setValueAfterKeydown(toIndex, "from-container");
51361
51846
  return;
@@ -52058,7 +52543,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
52058
52543
  return this.inputId + "_" + index;
52059
52544
  };
52060
52545
  QuestionRatingModel.prototype.supportGoNextPageAutomatic = function () {
52061
- return this.isMouseDown === true;
52546
+ return this.isMouseDown === true || this.renderAs === "dropdown";
52062
52547
  };
52063
52548
  QuestionRatingModel.prototype.supportOther = function () {
52064
52549
  return false;
@@ -53808,6 +54293,8 @@ var QuestionTextModel = /** @class */ (function (_super) {
53808
54293
  Object.defineProperty(QuestionTextModel.prototype, "inputType", {
53809
54294
  /**
53810
54295
  * A value passed on to the [`type`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types) attribute of the underlying `<input>` element.
54296
+ *
54297
+ * Default value: `"text"`
53811
54298
  */
53812
54299
  get: function () {
53813
54300
  return this.getPropertyValue("inputType");
@@ -56204,7 +56691,9 @@ __webpack_require__.r(__webpack_exports__);
56204
56691
  /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
56205
56692
  /* harmony import */ var _actions_container__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./actions/container */ "./src/actions/container.ts");
56206
56693
  /* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
56207
- /* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./global_variables_utils */ "./src/global_variables_utils.ts");
56694
+ /* harmony import */ var _utils_animation__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/animation */ "./src/utils/animation.ts");
56695
+ /* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
56696
+ /* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./global_variables_utils */ "./src/global_variables_utils.ts");
56208
56697
  var __extends = (undefined && undefined.__extends) || (function () {
56209
56698
  var extendStatics = function (d, b) {
56210
56699
  extendStatics = Object.setPrototypeOf ||
@@ -56234,6 +56723,8 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
56234
56723
 
56235
56724
 
56236
56725
 
56726
+
56727
+
56237
56728
  /**
56238
56729
  * A base class for the [`SurveyElement`](https://surveyjs.io/form-library/documentation/surveyelement) and [`SurveyModel`](https://surveyjs.io/form-library/documentation/surveymodel) classes.
56239
56730
  */
@@ -56418,6 +56909,20 @@ var SurveyElement = /** @class */ (function (_super) {
56418
56909
  _this.isEditableTemplateElement = false;
56419
56910
  _this.isInteractiveDesignElement = true;
56420
56911
  _this.isSingleInRow = true;
56912
+ _this._renderedIsExpanded = true;
56913
+ _this._isAnimatingCollapseExpand = false;
56914
+ _this.animationCollapsed = new _utils_animation__WEBPACK_IMPORTED_MODULE_7__["AnimationBoolean"](_this.getExpandCollapseAnimationOptions(), function (val) {
56915
+ _this._renderedIsExpanded = val;
56916
+ if (_this.animationAllowed) {
56917
+ if (val) {
56918
+ _this.isAnimatingCollapseExpand = true;
56919
+ }
56920
+ else {
56921
+ _this.updateElementCss(false);
56922
+ }
56923
+ }
56924
+ }, function () { return _this.renderedIsExpanded; });
56925
+ _this.animationAllowedValue = true;
56421
56926
  _this.name = name;
56422
56927
  _this.createNewArray("errors");
56423
56928
  _this.createNewArray("titleActions");
@@ -56463,11 +56968,11 @@ var SurveyElement = /** @class */ (function (_super) {
56463
56968
  elLeft = el.getBoundingClientRect().left;
56464
56969
  needScroll = elLeft < 0;
56465
56970
  }
56466
- if (!needScroll && _global_variables_utils__WEBPACK_IMPORTED_MODULE_7__["DomWindowHelper"].isAvailable()) {
56467
- var height = _global_variables_utils__WEBPACK_IMPORTED_MODULE_7__["DomWindowHelper"].getInnerHeight();
56971
+ if (!needScroll && _global_variables_utils__WEBPACK_IMPORTED_MODULE_9__["DomWindowHelper"].isAvailable()) {
56972
+ var height = _global_variables_utils__WEBPACK_IMPORTED_MODULE_9__["DomWindowHelper"].getInnerHeight();
56468
56973
  needScroll = height > 0 && height < elTop;
56469
56974
  if (!needScroll && checkLeft) {
56470
- var width = _global_variables_utils__WEBPACK_IMPORTED_MODULE_7__["DomWindowHelper"].getInnerWidth();
56975
+ var width = _global_variables_utils__WEBPACK_IMPORTED_MODULE_9__["DomWindowHelper"].getInnerWidth();
56471
56976
  needScroll = width > 0 && width < elLeft;
56472
56977
  }
56473
56978
  }
@@ -56495,7 +57000,7 @@ var SurveyElement = /** @class */ (function (_super) {
56495
57000
  return null;
56496
57001
  };
56497
57002
  SurveyElement.FocusElement = function (elementId) {
56498
- if (!elementId || !_global_variables_utils__WEBPACK_IMPORTED_MODULE_7__["DomDocumentHelper"].isAvailable())
57003
+ if (!elementId || !_global_variables_utils__WEBPACK_IMPORTED_MODULE_9__["DomDocumentHelper"].isAvailable())
56499
57004
  return false;
56500
57005
  var res = SurveyElement.focusElementCore(elementId);
56501
57006
  if (!res) {
@@ -56578,6 +57083,7 @@ var SurveyElement = /** @class */ (function (_super) {
56578
57083
  },
56579
57084
  set: function (val) {
56580
57085
  this.setPropertyValue("state", val);
57086
+ this.renderedIsExpanded = !(this.state === "collapsed" && !this.isDesignMode);
56581
57087
  },
56582
57088
  enumerable: false,
56583
57089
  configurable: true
@@ -57232,7 +57738,7 @@ var SurveyElement = /** @class */ (function (_super) {
57232
57738
  });
57233
57739
  Object.defineProperty(SurveyElement.prototype, "hasParent", {
57234
57740
  get: function () {
57235
- return (this.parent && !this.parent.isPage && (!this.parent.originalPage || this.survey.isShowingPreview)) || (this.parent === undefined);
57741
+ return (this.parent && !this.parent.isPage && (!this.parent.originalPage)) || (this.parent === undefined);
57236
57742
  },
57237
57743
  enumerable: false,
57238
57744
  configurable: true
@@ -57254,11 +57760,14 @@ var SurveyElement = /** @class */ (function (_super) {
57254
57760
  return this.shouldAddRunnerStyles() && (this.hasParent);
57255
57761
  };
57256
57762
  SurveyElement.prototype.getCssRoot = function (cssClasses) {
57763
+ var isExpanadable = !!this.isCollapsed || !!this.isExpanded;
57257
57764
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__["CssClassBuilder"]()
57258
57765
  .append(cssClasses.withFrame, this.getHasFrameV2() && !this.isCompact)
57259
57766
  .append(cssClasses.compact, this.isCompact && this.getHasFrameV2())
57260
57767
  .append(cssClasses.collapsed, !!this.isCollapsed)
57261
- .append(cssClasses.expanded, !!this.isExpanded)
57768
+ .append(cssClasses.expandableAnimating, isExpanadable && this.isAnimatingCollapseExpand)
57769
+ .append(cssClasses.expanded, !!this.isExpanded && this.renderedIsExpanded)
57770
+ .append(cssClasses.expandable, isExpanadable)
57262
57771
  .append(cssClasses.nested, this.getIsNested())
57263
57772
  .toString();
57264
57773
  };
@@ -57410,12 +57919,12 @@ var SurveyElement = /** @class */ (function (_super) {
57410
57919
  });
57411
57920
  SurveyElement.prototype.isContainsSelection = function (el) {
57412
57921
  var elementWithSelection = undefined;
57413
- var _document = _global_variables_utils__WEBPACK_IMPORTED_MODULE_7__["DomDocumentHelper"].getDocument();
57414
- if (_global_variables_utils__WEBPACK_IMPORTED_MODULE_7__["DomDocumentHelper"].isAvailable() && !!_document && _document["selection"]) {
57922
+ var _document = _global_variables_utils__WEBPACK_IMPORTED_MODULE_9__["DomDocumentHelper"].getDocument();
57923
+ if (_global_variables_utils__WEBPACK_IMPORTED_MODULE_9__["DomDocumentHelper"].isAvailable() && !!_document && _document["selection"]) {
57415
57924
  elementWithSelection = _document["selection"].createRange().parentElement();
57416
57925
  }
57417
57926
  else {
57418
- var selection = _global_variables_utils__WEBPACK_IMPORTED_MODULE_7__["DomWindowHelper"].getSelection();
57927
+ var selection = _global_variables_utils__WEBPACK_IMPORTED_MODULE_9__["DomWindowHelper"].getSelection();
57419
57928
  if (!!selection && selection.rangeCount > 0) {
57420
57929
  var range = selection.getRangeAt(0);
57421
57930
  if (range.startOffset !== range.endOffset) {
@@ -57480,6 +57989,84 @@ var SurveyElement = /** @class */ (function (_super) {
57480
57989
  });
57481
57990
  }
57482
57991
  };
57992
+ SurveyElement.prototype.setWrapperElement = function (element) {
57993
+ this.wrapperElement = element;
57994
+ };
57995
+ SurveyElement.prototype.getWrapperElement = function () {
57996
+ return this.wrapperElement;
57997
+ };
57998
+ Object.defineProperty(SurveyElement.prototype, "isAnimatingCollapseExpand", {
57999
+ get: function () {
58000
+ return this._isAnimatingCollapseExpand || this._renderedIsExpanded != this.isExpanded;
58001
+ },
58002
+ set: function (val) {
58003
+ if (val !== this._isAnimatingCollapseExpand) {
58004
+ this._isAnimatingCollapseExpand = val;
58005
+ this.updateElementCss(false);
58006
+ }
58007
+ },
58008
+ enumerable: false,
58009
+ configurable: true
58010
+ });
58011
+ SurveyElement.prototype.getExpandCollapseAnimationOptions = function () {
58012
+ var _this = this;
58013
+ var beforeRunAnimation = function (el) {
58014
+ _this.isAnimatingCollapseExpand = true;
58015
+ el.style.setProperty("--animation-height", el.offsetHeight + "px");
58016
+ };
58017
+ var afterRunAnimation = function (el) {
58018
+ _this.isAnimatingCollapseExpand = false;
58019
+ };
58020
+ return {
58021
+ getEnterOptions: function () {
58022
+ var cssClasses = _this.isPanel ? _this.cssClasses.panel : _this.cssClasses;
58023
+ return {
58024
+ cssClass: cssClasses.contentFadeIn,
58025
+ onBeforeRunAnimation: beforeRunAnimation,
58026
+ onAfterRunAnimation: afterRunAnimation,
58027
+ };
58028
+ },
58029
+ getLeaveOptions: function () {
58030
+ var cssClasses = _this.isPanel ? _this.cssClasses.panel : _this.cssClasses;
58031
+ return { cssClass: cssClasses.contentFadeOut,
58032
+ onBeforeRunAnimation: beforeRunAnimation,
58033
+ onAfterRunAnimation: afterRunAnimation
58034
+ };
58035
+ },
58036
+ getAnimatedElement: function () {
58037
+ var _a;
58038
+ var cssClasses = _this.isPanel ? _this.cssClasses.panel : _this.cssClasses;
58039
+ if (cssClasses.content) {
58040
+ var selector = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_8__["classesToSelector"])(cssClasses.content);
58041
+ if (selector) {
58042
+ return (_a = _this.getWrapperElement()) === null || _a === void 0 ? void 0 : _a.querySelector(selector);
58043
+ }
58044
+ }
58045
+ return undefined;
58046
+ },
58047
+ isAnimationEnabled: function () { return _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].animationEnabled && _this.animationAllowed && !_this.isDesignMode; }
58048
+ };
58049
+ };
58050
+ Object.defineProperty(SurveyElement.prototype, "renderedIsExpanded", {
58051
+ get: function () {
58052
+ return !!this._renderedIsExpanded;
58053
+ },
58054
+ set: function (val) {
58055
+ this.animationCollapsed.sync(val);
58056
+ },
58057
+ enumerable: false,
58058
+ configurable: true
58059
+ });
58060
+ Object.defineProperty(SurveyElement.prototype, "animationAllowed", {
58061
+ get: function () {
58062
+ return !this.isLoadingFromJson && !this.isDisposed && !!this.survey && this.animationAllowedValue;
58063
+ },
58064
+ set: function (val) {
58065
+ this.animationAllowedValue = val;
58066
+ },
58067
+ enumerable: false,
58068
+ configurable: true
58069
+ });
57483
58070
  SurveyElement.prototype.dispose = function () {
57484
58071
  _super.prototype.dispose.call(this);
57485
58072
  if (this.titleToolbarValue) {
@@ -57502,6 +58089,9 @@ var SurveyElement = /** @class */ (function (_super) {
57502
58089
  __decorate([
57503
58090
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: true })
57504
58091
  ], SurveyElement.prototype, "allowRootStyle", void 0);
58092
+ __decorate([
58093
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
58094
+ ], SurveyElement.prototype, "_renderedIsExpanded", void 0);
57505
58095
  return SurveyElement;
57506
58096
  }(SurveyElementCore));
57507
58097
 
@@ -65738,7 +66328,7 @@ var SurveyModel = /** @class */ (function (_super) {
65738
66328
  }
65739
66329
  }
65740
66330
  else if (isStrCiEqual(layoutElement.id, "advanced-header")) {
65741
- if (this.state === "running" && layoutElement.container === container) {
66331
+ if ((this.state === "running" || this.state === "starting") && layoutElement.container === container) {
65742
66332
  containerLayoutElements.push(layoutElement);
65743
66333
  }
65744
66334
  }
@@ -67873,6 +68463,290 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("runexpressiontr
67873
68463
  }, "surveytrigger");
67874
68464
 
67875
68465
 
68466
+ /***/ }),
68467
+
68468
+ /***/ "./src/utils/animation.ts":
68469
+ /*!********************************!*\
68470
+ !*** ./src/utils/animation.ts ***!
68471
+ \********************************/
68472
+ /*! exports provided: AnimationUtils, AnimationPropertyUtils, AnimationGroupUtils, AnimationBoolean, AnimationGroup */
68473
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
68474
+
68475
+ "use strict";
68476
+ __webpack_require__.r(__webpack_exports__);
68477
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationUtils", function() { return AnimationUtils; });
68478
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationPropertyUtils", function() { return AnimationPropertyUtils; });
68479
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationGroupUtils", function() { return AnimationGroupUtils; });
68480
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationBoolean", function() { return AnimationBoolean; });
68481
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationGroup", function() { return AnimationGroup; });
68482
+ /* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../global_variables_utils */ "./src/global_variables_utils.ts");
68483
+ /* harmony import */ var _taskmanager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./taskmanager */ "./src/utils/taskmanager.ts");
68484
+ var __extends = (undefined && undefined.__extends) || (function () {
68485
+ var extendStatics = function (d, b) {
68486
+ extendStatics = Object.setPrototypeOf ||
68487
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
68488
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
68489
+ return extendStatics(d, b);
68490
+ };
68491
+ return function (d, b) {
68492
+ if (typeof b !== "function" && b !== null)
68493
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
68494
+ extendStatics(d, b);
68495
+ function __() { this.constructor = d; }
68496
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
68497
+ };
68498
+ })();
68499
+
68500
+
68501
+ var AnimationUtils = /** @class */ (function () {
68502
+ function AnimationUtils() {
68503
+ this.cancelQueue = [];
68504
+ }
68505
+ AnimationUtils.prototype.getMsFromRule = function (value) {
68506
+ if (value === "auto")
68507
+ return 0;
68508
+ return Number(value.slice(0, -1).replace(",", ".")) * 1000;
68509
+ };
68510
+ AnimationUtils.prototype.getAnimationsCount = function (element) {
68511
+ var animationName = "";
68512
+ if (getComputedStyle) {
68513
+ animationName = getComputedStyle(element).animationName;
68514
+ }
68515
+ return (animationName && animationName != "none" ? animationName.split(", ").length : 0);
68516
+ };
68517
+ AnimationUtils.prototype.getAnimationDuration = function (element) {
68518
+ var style = getComputedStyle(element);
68519
+ var delays = style["animationDelay"].split(", ");
68520
+ var durations = style["animationDuration"].split(", ");
68521
+ var duration = 0;
68522
+ for (var i = 0; i < Math.max(durations.length, delays.length); i++) {
68523
+ duration = Math.max(duration, this.getMsFromRule(durations[i % durations.length]) + this.getMsFromRule(delays[i % delays.length]));
68524
+ }
68525
+ return duration;
68526
+ };
68527
+ AnimationUtils.prototype.onAnimationEnd = function (element, callback, options) {
68528
+ var _this = this;
68529
+ var cancelTimeout;
68530
+ var animationsCount = this.getAnimationsCount(element);
68531
+ var onEndCallback = function (isCancel) {
68532
+ if (isCancel === void 0) { isCancel = true; }
68533
+ options.onAfterRunAnimation && options.onAfterRunAnimation(element);
68534
+ callback(isCancel);
68535
+ clearTimeout(cancelTimeout);
68536
+ _this.cancelQueue.splice(_this.cancelQueue.indexOf(onEndCallback), 1);
68537
+ element.removeEventListener("animationend", onAnimationEndCallback);
68538
+ };
68539
+ var onAnimationEndCallback = function (event) {
68540
+ if (event.target == event.currentTarget && --animationsCount <= 0) {
68541
+ onEndCallback(false);
68542
+ }
68543
+ };
68544
+ if (animationsCount > 0) {
68545
+ element.addEventListener("animationend", onAnimationEndCallback);
68546
+ this.cancelQueue.push(onEndCallback);
68547
+ cancelTimeout = setTimeout(function () {
68548
+ onEndCallback(false);
68549
+ }, this.getAnimationDuration(element) + 10);
68550
+ }
68551
+ else {
68552
+ callback(true);
68553
+ }
68554
+ };
68555
+ AnimationUtils.prototype.beforeAnimationRun = function (element, options) {
68556
+ if (element) {
68557
+ options.onBeforeRunAnimation && options.onBeforeRunAnimation(element);
68558
+ }
68559
+ };
68560
+ AnimationUtils.prototype.runLeaveAnimation = function (element, options, callback) {
68561
+ if (element && options.cssClass) {
68562
+ element.classList.add(options.cssClass);
68563
+ var onAnimationEndCallback = function (isCancel) {
68564
+ callback();
68565
+ if (isCancel) {
68566
+ element.classList.remove(options.cssClass);
68567
+ }
68568
+ else {
68569
+ _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(function () {
68570
+ _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(function () {
68571
+ element.classList.remove(options.cssClass);
68572
+ });
68573
+ });
68574
+ }
68575
+ };
68576
+ this.onAnimationEnd(element, onAnimationEndCallback, options);
68577
+ }
68578
+ else {
68579
+ callback();
68580
+ }
68581
+ };
68582
+ AnimationUtils.prototype.runEnterAnimation = function (element, options) {
68583
+ if (element && options.cssClass) {
68584
+ element.classList.add(options.cssClass);
68585
+ this.onAnimationEnd(element, function () {
68586
+ element.classList.remove(options.cssClass);
68587
+ }, options);
68588
+ }
68589
+ };
68590
+ AnimationUtils.prototype.cancel = function () {
68591
+ var cancelQueue = [].concat(this.cancelQueue);
68592
+ cancelQueue.forEach(function (callback) { return callback(); });
68593
+ this.cancelQueue = [];
68594
+ };
68595
+ return AnimationUtils;
68596
+ }());
68597
+
68598
+ var AnimationPropertyUtils = /** @class */ (function (_super) {
68599
+ __extends(AnimationPropertyUtils, _super);
68600
+ function AnimationPropertyUtils() {
68601
+ return _super !== null && _super.apply(this, arguments) || this;
68602
+ }
68603
+ AnimationPropertyUtils.prototype.onEnter = function (getElement, options) {
68604
+ var _this = this;
68605
+ var callback = function () {
68606
+ var element = getElement();
68607
+ _this.beforeAnimationRun(element, options);
68608
+ _this.runEnterAnimation(element, options);
68609
+ };
68610
+ _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(function () {
68611
+ if (getElement()) {
68612
+ callback();
68613
+ }
68614
+ else {
68615
+ _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(callback);
68616
+ }
68617
+ });
68618
+ };
68619
+ AnimationPropertyUtils.prototype.onLeave = function (getElement, callback, options) {
68620
+ var element = getElement();
68621
+ this.beforeAnimationRun(element, options);
68622
+ this.runLeaveAnimation(element, options, callback);
68623
+ };
68624
+ return AnimationPropertyUtils;
68625
+ }(AnimationUtils));
68626
+
68627
+ var AnimationGroupUtils = /** @class */ (function (_super) {
68628
+ __extends(AnimationGroupUtils, _super);
68629
+ function AnimationGroupUtils() {
68630
+ return _super !== null && _super.apply(this, arguments) || this;
68631
+ }
68632
+ AnimationGroupUtils.prototype.onEnter = function (getElement, getOptions, elements) {
68633
+ var _this = this;
68634
+ if (elements.length == 0)
68635
+ return;
68636
+ _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(function () {
68637
+ var callback = function () {
68638
+ elements.forEach(function (el) {
68639
+ _this.beforeAnimationRun(getElement(el), getOptions(el));
68640
+ });
68641
+ elements.forEach(function (el) {
68642
+ _this.runEnterAnimation(getElement(el), getOptions(el));
68643
+ });
68644
+ };
68645
+ if (!getElement(elements[0])) {
68646
+ _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(callback);
68647
+ }
68648
+ else {
68649
+ callback();
68650
+ }
68651
+ });
68652
+ };
68653
+ AnimationGroupUtils.prototype.onLeave = function (getElement, callback, getOptions, elements) {
68654
+ var _this = this;
68655
+ elements.forEach(function (el) {
68656
+ _this.beforeAnimationRun(getElement(el), getOptions(el));
68657
+ });
68658
+ var counter = elements.length;
68659
+ var onEndCallback = function () {
68660
+ if (--counter <= 0) {
68661
+ callback();
68662
+ }
68663
+ };
68664
+ elements.forEach(function (el) {
68665
+ _this.runLeaveAnimation(getElement(el), getOptions(el), onEndCallback);
68666
+ });
68667
+ };
68668
+ return AnimationGroupUtils;
68669
+ }(AnimationUtils));
68670
+
68671
+ var AnimationProperty = /** @class */ (function () {
68672
+ function AnimationProperty(animationOptions, update, getCurrentValue) {
68673
+ var _this = this;
68674
+ this.animationOptions = animationOptions;
68675
+ this.update = update;
68676
+ this.getCurrentValue = getCurrentValue;
68677
+ this._debouncedSync = Object(_taskmanager__WEBPACK_IMPORTED_MODULE_1__["debounce"])(function (newValue) {
68678
+ _this.animation.cancel();
68679
+ _this._sync(newValue);
68680
+ });
68681
+ }
68682
+ AnimationProperty.prototype.sync = function (newValue) {
68683
+ if (this.animationOptions.isAnimationEnabled()) {
68684
+ this._debouncedSync.run(newValue);
68685
+ }
68686
+ else {
68687
+ this.update(newValue);
68688
+ }
68689
+ };
68690
+ AnimationProperty.prototype.cancel = function () {
68691
+ this.animation.cancel();
68692
+ this._debouncedSync.cancel();
68693
+ };
68694
+ return AnimationProperty;
68695
+ }());
68696
+ var AnimationBoolean = /** @class */ (function (_super) {
68697
+ __extends(AnimationBoolean, _super);
68698
+ function AnimationBoolean() {
68699
+ var _this = _super !== null && _super.apply(this, arguments) || this;
68700
+ _this.animation = new AnimationPropertyUtils();
68701
+ return _this;
68702
+ }
68703
+ AnimationBoolean.prototype._sync = function (newValue) {
68704
+ var _this = this;
68705
+ if (newValue !== this.getCurrentValue()) {
68706
+ if (newValue) {
68707
+ this.update(newValue);
68708
+ this.animation.onEnter(function () { return _this.animationOptions.getAnimatedElement(); }, this.animationOptions.getEnterOptions());
68709
+ }
68710
+ else {
68711
+ this.animation.onLeave(function () { return _this.animationOptions.getAnimatedElement(); }, function () {
68712
+ _this.update(newValue);
68713
+ }, this.animationOptions.getLeaveOptions());
68714
+ }
68715
+ }
68716
+ else {
68717
+ this.update(newValue);
68718
+ }
68719
+ };
68720
+ return AnimationBoolean;
68721
+ }(AnimationProperty));
68722
+
68723
+ var AnimationGroup = /** @class */ (function (_super) {
68724
+ __extends(AnimationGroup, _super);
68725
+ function AnimationGroup() {
68726
+ var _this = _super !== null && _super.apply(this, arguments) || this;
68727
+ _this.animation = new AnimationGroupUtils();
68728
+ return _this;
68729
+ }
68730
+ AnimationGroup.prototype._sync = function (newValue) {
68731
+ var _this = this;
68732
+ var oldValue = this.getCurrentValue();
68733
+ var itemsToAdd = newValue.filter(function (el) { return oldValue.indexOf(el) < 0; });
68734
+ var deletedItems = oldValue.filter(function (el) { return newValue.indexOf(el) < 0; });
68735
+ this.animation.onEnter(function (el) { return _this.animationOptions.getAnimatedElement(el); }, function (el) { return _this.animationOptions.getEnterOptions(el); }, itemsToAdd);
68736
+ if (itemsToAdd.length == 0 && (deletedItems === null || deletedItems === void 0 ? void 0 : deletedItems.length) > 0) {
68737
+ this.animation.onLeave(function (el) { return _this.animationOptions.getAnimatedElement(el); }, function () {
68738
+ _this.update(newValue);
68739
+ }, function (el) { return _this.animationOptions.getLeaveOptions(el); }, deletedItems);
68740
+ }
68741
+ else {
68742
+ this.update(newValue);
68743
+ }
68744
+ };
68745
+ return AnimationGroup;
68746
+ }(AnimationProperty));
68747
+
68748
+
68749
+
67876
68750
  /***/ }),
67877
68751
 
67878
68752
  /***/ "./src/utils/camera.ts":
@@ -68612,6 +69486,117 @@ var VerticalResponsivityManager = /** @class */ (function (_super) {
68612
69486
 
68613
69487
 
68614
69488
 
69489
+ /***/ }),
69490
+
69491
+ /***/ "./src/utils/taskmanager.ts":
69492
+ /*!**********************************!*\
69493
+ !*** ./src/utils/taskmanager.ts ***!
69494
+ \**********************************/
69495
+ /*! exports provided: Task, TaskManger, debounce */
69496
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
69497
+
69498
+ "use strict";
69499
+ __webpack_require__.r(__webpack_exports__);
69500
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Task", function() { return Task; });
69501
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TaskManger", function() { return TaskManger; });
69502
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return debounce; });
69503
+ var Task = /** @class */ (function () {
69504
+ function Task(func, isMultiple) {
69505
+ var _this = this;
69506
+ if (isMultiple === void 0) { isMultiple = false; }
69507
+ this.func = func;
69508
+ this.isMultiple = isMultiple;
69509
+ this._isCompleted = false;
69510
+ this.execute = function () {
69511
+ if (!_this._isCompleted) {
69512
+ _this.func();
69513
+ _this._isCompleted = !_this.isMultiple;
69514
+ }
69515
+ };
69516
+ }
69517
+ Task.prototype.discard = function () {
69518
+ this._isCompleted = true;
69519
+ };
69520
+ Object.defineProperty(Task.prototype, "isCompleted", {
69521
+ get: function () {
69522
+ return this._isCompleted;
69523
+ },
69524
+ enumerable: false,
69525
+ configurable: true
69526
+ });
69527
+ return Task;
69528
+ }());
69529
+
69530
+ var TaskManger = /** @class */ (function () {
69531
+ function TaskManger(interval) {
69532
+ if (interval === void 0) { interval = 100; }
69533
+ this.interval = interval;
69534
+ setTimeout(TaskManger.Instance().tick, interval);
69535
+ }
69536
+ // dispose
69537
+ TaskManger.Instance = function () {
69538
+ if (!TaskManger.instance) {
69539
+ TaskManger.instance = new TaskManger();
69540
+ }
69541
+ return TaskManger.instance;
69542
+ };
69543
+ TaskManger.prototype.tick = function () {
69544
+ try {
69545
+ var newTasks = [];
69546
+ for (var i = 0; i < TaskManger.tasks.length; i++) {
69547
+ var task = TaskManger.tasks[i];
69548
+ task.execute();
69549
+ if (!task.isCompleted) {
69550
+ newTasks.push(task);
69551
+ }
69552
+ else {
69553
+ if (typeof task.dispose === "function") {
69554
+ task.dispose();
69555
+ }
69556
+ }
69557
+ }
69558
+ TaskManger.tasks = newTasks;
69559
+ }
69560
+ finally {
69561
+ setTimeout(TaskManger.Instance().tick, this.interval);
69562
+ }
69563
+ };
69564
+ TaskManger.schedule = function (task) {
69565
+ TaskManger.tasks.push(task);
69566
+ };
69567
+ TaskManger.instance = undefined;
69568
+ TaskManger.tasks = [];
69569
+ return TaskManger;
69570
+ }());
69571
+
69572
+ function debounce(func) {
69573
+ var _this = this;
69574
+ var isSheduled = false;
69575
+ var isCanceled = false;
69576
+ var funcArgs;
69577
+ return { run: (function () {
69578
+ var args = [];
69579
+ for (var _i = 0; _i < arguments.length; _i++) {
69580
+ args[_i] = arguments[_i];
69581
+ }
69582
+ isCanceled = false;
69583
+ funcArgs = args;
69584
+ if (!isSheduled) {
69585
+ isSheduled = true;
69586
+ queueMicrotask(function () {
69587
+ if (!isCanceled) {
69588
+ func.apply(_this, funcArgs);
69589
+ }
69590
+ isCanceled = false;
69591
+ isSheduled = false;
69592
+ });
69593
+ }
69594
+ }), cancel: function () {
69595
+ isCanceled = true;
69596
+ } };
69597
+ }
69598
+
69599
+
68615
69600
  /***/ }),
68616
69601
 
68617
69602
  /***/ "./src/utils/utils.ts":