survey-core 1.12.12 → 1.12.14

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 (261) hide show
  1. package/defaultV2.css +49 -12
  2. package/defaultV2.css.map +1 -1
  3. package/defaultV2.fontless.css +49 -12
  4. package/defaultV2.fontless.css.map +1 -1
  5. package/defaultV2.fontless.min.css +2 -2
  6. package/defaultV2.min.css +2 -2
  7. package/i18n/arabic.js +1 -1
  8. package/i18n/arabic.min.js +1 -1
  9. package/i18n/basque.js +1 -1
  10. package/i18n/basque.min.js +1 -1
  11. package/i18n/bulgarian.js +1 -1
  12. package/i18n/bulgarian.min.js +1 -1
  13. package/i18n/catalan.js +1 -1
  14. package/i18n/catalan.min.js +1 -1
  15. package/i18n/croatian.js +1 -1
  16. package/i18n/croatian.min.js +1 -1
  17. package/i18n/czech.js +1 -1
  18. package/i18n/czech.min.js +1 -1
  19. package/i18n/danish.js +1 -1
  20. package/i18n/danish.min.js +1 -1
  21. package/i18n/dutch.js +1 -1
  22. package/i18n/dutch.min.js +1 -1
  23. package/i18n/english.js +1 -1
  24. package/i18n/english.min.js +1 -1
  25. package/i18n/estonian.js +1 -1
  26. package/i18n/estonian.min.js +1 -1
  27. package/i18n/finnish.js +1 -1
  28. package/i18n/finnish.min.js +1 -1
  29. package/i18n/french.js +1 -1
  30. package/i18n/french.min.js +1 -1
  31. package/i18n/georgian.js +1 -1
  32. package/i18n/georgian.min.js +1 -1
  33. package/i18n/german.js +1 -1
  34. package/i18n/german.min.js +1 -1
  35. package/i18n/greek.js +1 -1
  36. package/i18n/greek.min.js +1 -1
  37. package/i18n/hebrew.js +1 -1
  38. package/i18n/hebrew.min.js +1 -1
  39. package/i18n/hindi.js +1 -1
  40. package/i18n/hindi.min.js +1 -1
  41. package/i18n/hungarian.js +1 -1
  42. package/i18n/hungarian.min.js +1 -1
  43. package/i18n/icelandic.js +1 -1
  44. package/i18n/icelandic.min.js +1 -1
  45. package/i18n/index.js +1 -1
  46. package/i18n/index.min.js +1 -1
  47. package/i18n/indonesian.js +1 -1
  48. package/i18n/indonesian.min.js +1 -1
  49. package/i18n/italian.js +1 -1
  50. package/i18n/italian.min.js +1 -1
  51. package/i18n/japanese.js +1 -1
  52. package/i18n/japanese.min.js +1 -1
  53. package/i18n/kazakh.js +1 -1
  54. package/i18n/kazakh.min.js +1 -1
  55. package/i18n/korean.js +1 -1
  56. package/i18n/korean.min.js +1 -1
  57. package/i18n/latvian.js +1 -1
  58. package/i18n/latvian.min.js +1 -1
  59. package/i18n/lithuanian.js +1 -1
  60. package/i18n/lithuanian.min.js +1 -1
  61. package/i18n/macedonian.js +1 -1
  62. package/i18n/macedonian.min.js +1 -1
  63. package/i18n/malay.js +1 -1
  64. package/i18n/malay.min.js +1 -1
  65. package/i18n/nl-BE.js +1 -1
  66. package/i18n/nl-BE.min.js +1 -1
  67. package/i18n/norwegian.js +1 -1
  68. package/i18n/norwegian.min.js +1 -1
  69. package/i18n/persian.js +1 -1
  70. package/i18n/persian.min.js +1 -1
  71. package/i18n/philippines.js +1 -1
  72. package/i18n/philippines.min.js +1 -1
  73. package/i18n/polish.js +1 -1
  74. package/i18n/polish.min.js +1 -1
  75. package/i18n/portuguese-br.js +1 -1
  76. package/i18n/portuguese-br.min.js +1 -1
  77. package/i18n/portuguese.js +1 -1
  78. package/i18n/portuguese.min.js +1 -1
  79. package/i18n/romanian.js +1 -1
  80. package/i18n/romanian.min.js +1 -1
  81. package/i18n/russian.js +1 -1
  82. package/i18n/russian.min.js +1 -1
  83. package/i18n/serbian.js +1 -1
  84. package/i18n/serbian.min.js +1 -1
  85. package/i18n/simplified-chinese.js +1 -1
  86. package/i18n/simplified-chinese.min.js +1 -1
  87. package/i18n/slovak.js +1 -1
  88. package/i18n/slovak.min.js +1 -1
  89. package/i18n/spanish.js +1 -1
  90. package/i18n/spanish.min.js +1 -1
  91. package/i18n/swahili.js +1 -1
  92. package/i18n/swahili.min.js +1 -1
  93. package/i18n/swedish.js +1 -1
  94. package/i18n/swedish.min.js +1 -1
  95. package/i18n/tajik.js +1 -1
  96. package/i18n/tajik.min.js +1 -1
  97. package/i18n/telugu.js +1 -1
  98. package/i18n/telugu.min.js +1 -1
  99. package/i18n/thai.js +1 -1
  100. package/i18n/thai.min.js +1 -1
  101. package/i18n/traditional-chinese.js +1 -1
  102. package/i18n/traditional-chinese.min.js +1 -1
  103. package/i18n/turkish.js +1 -1
  104. package/i18n/turkish.min.js +1 -1
  105. package/i18n/ukrainian.js +1 -1
  106. package/i18n/ukrainian.min.js +1 -1
  107. package/i18n/urdu.js +1 -1
  108. package/i18n/urdu.min.js +1 -1
  109. package/i18n/vietnamese.js +1 -1
  110. package/i18n/vietnamese.min.js +1 -1
  111. package/i18n/welsh.js +1 -1
  112. package/i18n/welsh.min.js +1 -1
  113. package/icons/iconsV1.js +1 -1
  114. package/icons/iconsV1.min.js +1 -1
  115. package/icons/iconsV2.js +1 -1
  116. package/icons/iconsV2.min.js +1 -1
  117. package/modern.css +20 -3
  118. package/modern.css.map +1 -1
  119. package/modern.fontless.css +20 -3
  120. package/modern.fontless.css.map +1 -1
  121. package/modern.fontless.min.css +2 -2
  122. package/modern.min.css +2 -2
  123. package/package.json +1 -1
  124. package/plugins/bootstrap-integration/index.js +1 -1
  125. package/plugins/bootstrap-integration/index.min.js +1 -1
  126. package/plugins/bootstrap-material-integration/index.js +1 -1
  127. package/plugins/bootstrap-material-integration/index.min.js +1 -1
  128. package/survey.core.js +422 -273
  129. package/survey.core.js.map +1 -1
  130. package/survey.core.min.js +3 -3
  131. package/survey.css +16 -1
  132. package/survey.css.map +1 -1
  133. package/survey.i18n.js +1 -1
  134. package/survey.i18n.min.js +1 -1
  135. package/survey.min.css +2 -2
  136. package/themes/borderless-dark-panelless.js +1 -1
  137. package/themes/borderless-dark-panelless.min.js +1 -1
  138. package/themes/borderless-dark.js +1 -1
  139. package/themes/borderless-dark.min.js +1 -1
  140. package/themes/borderless-light-panelless..js +1 -1
  141. package/themes/borderless-light-panelless..min.js +1 -1
  142. package/themes/borderless-light.js +1 -1
  143. package/themes/borderless-light.min.js +1 -1
  144. package/themes/contrast-dark-panelless.js +1 -1
  145. package/themes/contrast-dark-panelless.min.js +1 -1
  146. package/themes/contrast-dark.js +1 -1
  147. package/themes/contrast-dark.min.js +1 -1
  148. package/themes/contrast-light-panelless.js +1 -1
  149. package/themes/contrast-light-panelless.min.js +1 -1
  150. package/themes/contrast-light.js +1 -1
  151. package/themes/contrast-light.min.js +1 -1
  152. package/themes/default-dark-panelless.js +1 -1
  153. package/themes/default-dark-panelless.min.js +1 -1
  154. package/themes/default-dark.js +1 -1
  155. package/themes/default-dark.min.js +1 -1
  156. package/themes/default-light-panelless.js +1 -1
  157. package/themes/default-light-panelless.min.js +1 -1
  158. package/themes/default-light.js +1 -1
  159. package/themes/default-light.min.js +1 -1
  160. package/themes/doubleborder-dark-panelless.js +1 -1
  161. package/themes/doubleborder-dark-panelless.min.js +1 -1
  162. package/themes/doubleborder-dark.js +1 -1
  163. package/themes/doubleborder-dark.min.js +1 -1
  164. package/themes/doubleborder-light-panelles.js +1 -1
  165. package/themes/doubleborder-light-panelles.min.js +1 -1
  166. package/themes/doubleborder-light.js +1 -1
  167. package/themes/doubleborder-light.min.js +1 -1
  168. package/themes/flat-dark-panelless.js +1 -1
  169. package/themes/flat-dark-panelless.min.js +1 -1
  170. package/themes/flat-dark.js +1 -1
  171. package/themes/flat-dark.min.js +1 -1
  172. package/themes/flat-light-panelless.js +1 -1
  173. package/themes/flat-light-panelless.min.js +1 -1
  174. package/themes/flat-light.js +1 -1
  175. package/themes/flat-light.min.js +1 -1
  176. package/themes/index.js +1 -1
  177. package/themes/index.min.js +1 -1
  178. package/themes/layered-dark-panelless.js +1 -1
  179. package/themes/layered-dark-panelless.min.js +1 -1
  180. package/themes/layered-dark.js +1 -1
  181. package/themes/layered-dark.min.js +1 -1
  182. package/themes/layered-light-panelless.js +1 -1
  183. package/themes/layered-light-panelless.min.js +1 -1
  184. package/themes/layered-light.js +1 -1
  185. package/themes/layered-light.min.js +1 -1
  186. package/themes/plain-dark-panelless.js +1 -1
  187. package/themes/plain-dark-panelless.min.js +1 -1
  188. package/themes/plain-dark.js +1 -1
  189. package/themes/plain-dark.min.js +1 -1
  190. package/themes/plain-light-panelless.js +1 -1
  191. package/themes/plain-light-panelless.min.js +1 -1
  192. package/themes/plain-light.js +1 -1
  193. package/themes/plain-light.min.js +1 -1
  194. package/themes/sharp-dark-panelless.js +1 -1
  195. package/themes/sharp-dark-panelless.min.js +1 -1
  196. package/themes/sharp-dark.js +1 -1
  197. package/themes/sharp-dark.min.js +1 -1
  198. package/themes/sharp-light-panelless.js +1 -1
  199. package/themes/sharp-light-panelless.min.js +1 -1
  200. package/themes/sharp-light.js +1 -1
  201. package/themes/sharp-light.min.js +1 -1
  202. package/themes/solid-dark-panelless.js +1 -1
  203. package/themes/solid-dark-panelless.min.js +1 -1
  204. package/themes/solid-dark.js +1 -1
  205. package/themes/solid-dark.min.js +1 -1
  206. package/themes/solid-light-panelless.js +1 -1
  207. package/themes/solid-light-panelless.min.js +1 -1
  208. package/themes/solid-light.js +1 -1
  209. package/themes/solid-light.min.js +1 -1
  210. package/themes/three-dimensional-dark-panelless.js +1 -1
  211. package/themes/three-dimensional-dark-panelless.min.js +1 -1
  212. package/themes/three-dimensional-dark.js +1 -1
  213. package/themes/three-dimensional-dark.min.js +1 -1
  214. package/themes/three-dimensional-light-panelless.js +1 -1
  215. package/themes/three-dimensional-light-panelless.min.js +1 -1
  216. package/themes/three-dimensional-light.js +1 -1
  217. package/themes/three-dimensional-light.min.js +1 -1
  218. package/ts3.4/typings/packages/survey-core/src/actions/action.d.ts +0 -2
  219. package/ts3.4/typings/packages/survey-core/src/base.d.ts +1 -1
  220. package/ts3.4/typings/packages/survey-core/src/dropdownListModel.d.ts +2 -1
  221. package/ts3.4/typings/packages/survey-core/src/dropdownMultiSelectListModel.d.ts +1 -1
  222. package/ts3.4/typings/packages/survey-core/src/helpers.d.ts +1 -0
  223. package/ts3.4/typings/packages/survey-core/src/list.d.ts +5 -0
  224. package/ts3.4/typings/packages/survey-core/src/page.d.ts +0 -1
  225. package/ts3.4/typings/packages/survey-core/src/panel.d.ts +6 -6
  226. package/ts3.4/typings/packages/survey-core/src/question.d.ts +7 -5
  227. package/ts3.4/typings/packages/survey-core/src/question_baseselect.d.ts +3 -4
  228. package/ts3.4/typings/packages/survey-core/src/question_comment.d.ts +4 -2
  229. package/ts3.4/typings/packages/survey-core/src/question_custom.d.ts +1 -1
  230. package/ts3.4/typings/packages/survey-core/src/question_dropdown.d.ts +3 -0
  231. package/ts3.4/typings/packages/survey-core/src/question_file.d.ts +1 -0
  232. package/ts3.4/typings/packages/survey-core/src/question_matrixdropdownbase.d.ts +2 -2
  233. package/ts3.4/typings/packages/survey-core/src/question_paneldynamic.d.ts +4 -4
  234. package/ts3.4/typings/packages/survey-core/src/question_tagbox.d.ts +4 -4
  235. package/ts3.4/typings/packages/survey-core/src/question_textbase.d.ts +1 -5
  236. package/ts3.4/typings/packages/survey-core/src/survey-element.d.ts +9 -2
  237. package/ts3.4/typings/packages/survey-core/src/survey.d.ts +5 -0
  238. package/ts3.4/typings/packages/survey-core/src/utils/text-area.d.ts +1 -1
  239. package/ts3.4/typings/packages/survey-core/src/utils/utils.d.ts +2 -1
  240. package/typings/packages/survey-core/src/actions/action.d.ts +0 -2
  241. package/typings/packages/survey-core/src/base.d.ts +1 -1
  242. package/typings/packages/survey-core/src/dropdownListModel.d.ts +2 -1
  243. package/typings/packages/survey-core/src/dropdownMultiSelectListModel.d.ts +1 -1
  244. package/typings/packages/survey-core/src/helpers.d.ts +1 -0
  245. package/typings/packages/survey-core/src/list.d.ts +5 -0
  246. package/typings/packages/survey-core/src/page.d.ts +0 -1
  247. package/typings/packages/survey-core/src/panel.d.ts +6 -6
  248. package/typings/packages/survey-core/src/question.d.ts +7 -5
  249. package/typings/packages/survey-core/src/question_baseselect.d.ts +3 -4
  250. package/typings/packages/survey-core/src/question_comment.d.ts +4 -2
  251. package/typings/packages/survey-core/src/question_custom.d.ts +1 -1
  252. package/typings/packages/survey-core/src/question_dropdown.d.ts +3 -0
  253. package/typings/packages/survey-core/src/question_file.d.ts +1 -0
  254. package/typings/packages/survey-core/src/question_matrixdropdownbase.d.ts +2 -2
  255. package/typings/packages/survey-core/src/question_paneldynamic.d.ts +4 -4
  256. package/typings/packages/survey-core/src/question_tagbox.d.ts +5 -4
  257. package/typings/packages/survey-core/src/question_textbase.d.ts +1 -5
  258. package/typings/packages/survey-core/src/survey-element.d.ts +7 -2
  259. package/typings/packages/survey-core/src/survey.d.ts +5 -0
  260. package/typings/packages/survey-core/src/utils/text-area.d.ts +1 -1
  261. package/typings/packages/survey-core/src/utils/utils.d.ts +2 -1
package/survey.core.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.12.12
2
+ * surveyjs - Survey JavaScript library v1.12.14
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
  */
@@ -714,13 +714,16 @@ var helpers_Helpers = /** @class */ (function () {
714
714
  };
715
715
  Helpers.getNumberCore = function (value) {
716
716
  if (typeof value == "string") {
717
- if (!value.trim())
717
+ value = value.trim();
718
+ if (!value)
718
719
  return NaN;
719
720
  if (value.indexOf("0x") == 0) {
720
721
  if (value.length > 32)
721
722
  return NaN;
722
723
  return parseInt(value);
723
724
  }
725
+ if (value.length > 15 && Helpers.isDigitsOnly(value))
726
+ return NaN;
724
727
  if (Helpers.isStringHasOperator(value))
725
728
  return NaN;
726
729
  }
@@ -832,6 +835,15 @@ var helpers_Helpers = /** @class */ (function () {
832
835
  Helpers.isCharDigit = function (ch) {
833
836
  return ch >= "0" && ch <= "9";
834
837
  };
838
+ Helpers.isDigitsOnly = function (str) {
839
+ if (!str)
840
+ return false;
841
+ for (var i = 0; i < str.length; i++) {
842
+ if (!Helpers.isCharDigit(str[i]))
843
+ return false;
844
+ }
845
+ return true;
846
+ };
835
847
  Helpers.getNumberFromStr = function (str, index) {
836
848
  if (!this.isCharDigit(str[index]))
837
849
  return NaN;
@@ -1328,9 +1340,11 @@ function jsonobject_property(options) {
1328
1340
  set: function (val) {
1329
1341
  var newValue = processComputedUpdater(this, val);
1330
1342
  var prevValue = this.getPropertyValue(key);
1331
- this.setPropertyValue(key, newValue);
1332
- if (!!options && options.onSet) {
1333
- options.onSet(newValue, this, prevValue);
1343
+ if (newValue !== prevValue) {
1344
+ this.setPropertyValue(key, newValue);
1345
+ if (!!options && options.onSet) {
1346
+ options.onSet(newValue, this, prevValue);
1347
+ }
1334
1348
  }
1335
1349
  },
1336
1350
  });
@@ -1894,7 +1908,7 @@ var CustomPropertiesCollection = /** @class */ (function () {
1894
1908
  prop.serializationProperty &&
1895
1909
  obj.createCustomLocalizableObj) {
1896
1910
  var locStr = obj.createCustomLocalizableObj(prop.name);
1897
- locStr.defaultValue = prop.defaultValue;
1911
+ locStr.defaultValue = prop.getDefaultValue(obj);
1898
1912
  var locDesc = {
1899
1913
  get: function () {
1900
1914
  return obj.getLocalizableString(prop.name);
@@ -1912,7 +1926,6 @@ var CustomPropertiesCollection = /** @class */ (function () {
1912
1926
  Object.defineProperty(obj, prop.name, desc);
1913
1927
  }
1914
1928
  else {
1915
- var defaultValue = prop.defaultValue;
1916
1929
  var isArrayProp = prop.isArray || prop.type === "multiplevalues";
1917
1930
  if (typeof obj.createNewArray === "function") {
1918
1931
  if (Serializer.isDescendantOf(prop.className, "itemvalue")) {
@@ -1929,10 +1942,10 @@ var CustomPropertiesCollection = /** @class */ (function () {
1929
1942
  }
1930
1943
  }
1931
1944
  if (isArrayProp) {
1945
+ var defaultValue = prop.getDefaultValue(obj);
1932
1946
  if (Array.isArray(defaultValue)) {
1933
1947
  obj.setPropertyValue(prop.name, defaultValue);
1934
1948
  }
1935
- defaultValue = null;
1936
1949
  }
1937
1950
  }
1938
1951
  if (!!obj.getPropertyValue && !!obj.setPropertyValue) {
@@ -1941,7 +1954,7 @@ var CustomPropertiesCollection = /** @class */ (function () {
1941
1954
  if (!!prop.onGetValue) {
1942
1955
  return prop.onGetValue(obj);
1943
1956
  }
1944
- return obj.getPropertyValue(prop.name, defaultValue);
1957
+ return obj.getPropertyValue(prop.name, undefined);
1945
1958
  },
1946
1959
  set: function (v) {
1947
1960
  if (!!prop.onSetValue) {
@@ -8646,8 +8659,7 @@ var base_Base = /** @class */ (function () {
8646
8659
  * @param name A property name.
8647
8660
  * @param defaultValue *(Optional)* A value to return if the property is not found or does not have a value.
8648
8661
  */
8649
- Base.prototype.getPropertyValue = function (name, defaultValue) {
8650
- if (defaultValue === void 0) { defaultValue = null; }
8662
+ Base.prototype.getPropertyValue = function (name, defaultValue, calcFunc) {
8651
8663
  var res = this.getPropertyValueWithoutDefault(name);
8652
8664
  if (this.isPropertyEmpty(res)) {
8653
8665
  var locStr = this.localizableStrings ? this.localizableStrings[name] : undefined;
@@ -8655,6 +8667,13 @@ var base_Base = /** @class */ (function () {
8655
8667
  return locStr.text;
8656
8668
  if (defaultValue !== null && defaultValue !== undefined)
8657
8669
  return defaultValue;
8670
+ if (!!calcFunc) {
8671
+ var newVal = calcFunc();
8672
+ if (newVal !== undefined) {
8673
+ this.setPropertyValueDirectly(name, newVal);
8674
+ return newVal;
8675
+ }
8676
+ }
8658
8677
  var propDefaultValue = this.getDefaultPropertyValue(name);
8659
8678
  if (propDefaultValue !== undefined)
8660
8679
  return propDefaultValue;
@@ -8665,9 +8684,9 @@ var base_Base = /** @class */ (function () {
8665
8684
  var prop = this.getPropertyByName(name);
8666
8685
  if (!prop || prop.isCustom && this.isCreating)
8667
8686
  return undefined;
8668
- var dValue = prop.defaultValue;
8669
8687
  if (!!prop.defaultValueFunc)
8670
- return dValue;
8688
+ return prop.defaultValueFunc(this);
8689
+ var dValue = prop.getDefaultValue(this);
8671
8690
  if (!this.isPropertyEmpty(dValue) && !Array.isArray(dValue))
8672
8691
  return dValue;
8673
8692
  var locStr = this.localizableStrings ? this.localizableStrings[name] : undefined;
@@ -9975,6 +9994,7 @@ var defaultListCss = {
9975
9994
  loadingIndicator: "sv-list__loading-indicator",
9976
9995
  itemSelected: "sv-list__item--selected",
9977
9996
  itemGroup: "sv-list__item--group",
9997
+ itemGroupSelected: "sv-list__item--group-selected",
9978
9998
  itemWithIcon: "sv-list__item--with-icon",
9979
9999
  itemDisabled: "sv-list__item--disabled",
9980
10000
  itemFocused: "sv-list__item--focused",
@@ -10034,13 +10054,15 @@ var list_ListModel = /** @class */ (function (_super) {
10034
10054
  .toString();
10035
10055
  };
10036
10056
  _this.getItemClass = function (itemValue) {
10057
+ var isSelected = _this.isItemSelected(itemValue);
10037
10058
  return new CssClassBuilder()
10038
10059
  .append(_this.cssClasses.item)
10039
10060
  .append(_this.cssClasses.itemWithIcon, !!itemValue.iconName)
10040
10061
  .append(_this.cssClasses.itemDisabled, _this.isItemDisabled(itemValue))
10041
10062
  .append(_this.cssClasses.itemFocused, _this.isItemFocused(itemValue))
10042
- .append(_this.cssClasses.itemSelected, _this.isItemSelected(itemValue))
10063
+ .append(_this.cssClasses.itemSelected, !itemValue.hasSubItems && isSelected)
10043
10064
  .append(_this.cssClasses.itemGroup, itemValue.hasSubItems)
10065
+ .append(_this.cssClasses.itemGroupSelected, itemValue.hasSubItems && isSelected)
10044
10066
  .append(_this.cssClasses.itemHovered, itemValue.isHovered)
10045
10067
  .append(_this.cssClasses.itemTextWrap, _this.textWrapEnabled)
10046
10068
  .append(itemValue.css)
@@ -10067,6 +10089,7 @@ var list_ListModel = /** @class */ (function (_super) {
10067
10089
  _this[key] = options_1[key];
10068
10090
  }
10069
10091
  });
10092
+ _this.updateActionsIds();
10070
10093
  }
10071
10094
  else {
10072
10095
  _this.setItems(items);
@@ -10123,10 +10146,13 @@ var list_ListModel = /** @class */ (function (_super) {
10123
10146
  configurable: true
10124
10147
  });
10125
10148
  ListModel.prototype.onFilterStringChanged = function (text) {
10126
- var _this = this;
10127
10149
  if (!!this.onFilterStringChangedCallback) {
10128
10150
  this.onFilterStringChangedCallback(text);
10129
10151
  }
10152
+ this.updateIsEmpty();
10153
+ };
10154
+ ListModel.prototype.updateIsEmpty = function () {
10155
+ var _this = this;
10130
10156
  this.isEmpty = this.renderedActions.filter(function (action) { return _this.isItemVisible(action); }).length === 0;
10131
10157
  };
10132
10158
  ListModel.prototype.scrollToItem = function (selector, ms) {
@@ -10150,16 +10176,19 @@ var list_ListModel = /** @class */ (function (_super) {
10150
10176
  this.onTextSearchCallback = callback;
10151
10177
  };
10152
10178
  ListModel.prototype.setItems = function (items, sortByVisibleIndex) {
10153
- var _this = this;
10154
10179
  if (sortByVisibleIndex === void 0) { sortByVisibleIndex = true; }
10155
10180
  _super.prototype.setItems.call(this, items, sortByVisibleIndex);
10156
- if (this.elementId) {
10157
- this.renderedActions.forEach(function (action) { action.elementId = _this.elementId + action.id; });
10158
- }
10181
+ this.updateActionsIds();
10159
10182
  if (!this.isAllDataLoaded && !!this.actions.length) {
10160
10183
  this.actions.push(this.loadingIndicator);
10161
10184
  }
10162
10185
  };
10186
+ ListModel.prototype.updateActionsIds = function () {
10187
+ var _this = this;
10188
+ if (this.elementId) {
10189
+ this.renderedActions.forEach(function (action) { action.elementId = _this.elementId + action.id; });
10190
+ }
10191
+ };
10163
10192
  ListModel.prototype.setSearchEnabled = function (newValue) {
10164
10193
  this.searchEnabled = newValue;
10165
10194
  this.showSearchClearButton = newValue;
@@ -10200,7 +10229,7 @@ var list_ListModel = /** @class */ (function (_super) {
10200
10229
  });
10201
10230
  Object.defineProperty(ListModel.prototype, "scrollableContainer", {
10202
10231
  get: function () {
10203
- return this.listContainerHtmlElement.querySelector("." + this.getDefaultCssClasses().itemsContainer);
10232
+ return this.listContainerHtmlElement.querySelector("." + this.cssClasses.itemsContainer);
10204
10233
  },
10205
10234
  enumerable: false,
10206
10235
  configurable: true
@@ -10254,7 +10283,12 @@ var list_ListModel = /** @class */ (function (_super) {
10254
10283
  };
10255
10284
  ListModel.prototype.onPointerDown = function (event, item) { };
10256
10285
  ListModel.prototype.refresh = function () {
10257
- this.filterString = "";
10286
+ if (this.filterString !== "") {
10287
+ this.filterString = "";
10288
+ }
10289
+ else {
10290
+ this.updateIsEmpty();
10291
+ }
10258
10292
  this.resetFocusedItem();
10259
10293
  };
10260
10294
  ListModel.prototype.onClickSearchClearButton = function (event) {
@@ -10323,10 +10357,15 @@ var list_ListModel = /** @class */ (function (_super) {
10323
10357
  }
10324
10358
  };
10325
10359
  ListModel.prototype.scrollToFocusedItem = function () {
10326
- this.scrollToItem(this.getDefaultCssClasses().itemFocused);
10360
+ this.scrollToItem(this.cssClasses.itemFocused);
10327
10361
  };
10328
10362
  ListModel.prototype.scrollToSelectedItem = function () {
10329
- this.scrollToItem(this.getDefaultCssClasses().itemSelected, 110);
10363
+ if (!!this.selectedItem && this.selectedItem.items && this.selectedItem.items.length > 0) {
10364
+ this.scrollToItem(this.cssClasses.itemGroupSelected, 110);
10365
+ }
10366
+ else {
10367
+ this.scrollToItem(this.cssClasses.itemSelected, 110);
10368
+ }
10330
10369
  };
10331
10370
  ListModel.prototype.addScrollEventListener = function (handler) {
10332
10371
  if (!!handler) {
@@ -10679,7 +10718,6 @@ var action_BaseAction = /** @class */ (function (_super) {
10679
10718
  function BaseAction() {
10680
10719
  var _this = _super !== null && _super.apply(this, arguments) || this;
10681
10720
  _this.rendredIdValue = BaseAction.getNextRendredId();
10682
- _this.markerIconSize = 16;
10683
10721
  return _this;
10684
10722
  }
10685
10723
  BaseAction.getNextRendredId = function () { return BaseAction.renderedId++; };
@@ -10934,9 +10972,6 @@ var action_BaseAction = /** @class */ (function (_super) {
10934
10972
  action_decorate([
10935
10973
  jsonobject_property()
10936
10974
  ], BaseAction.prototype, "markerIconName", void 0);
10937
- action_decorate([
10938
- jsonobject_property()
10939
- ], BaseAction.prototype, "markerIconSize", void 0);
10940
10975
  action_decorate([
10941
10976
  jsonobject_property()
10942
10977
  ], BaseAction.prototype, "css", void 0);
@@ -12444,6 +12479,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
12444
12479
  SurveyElement.prototype.getTitleToolbar = function () {
12445
12480
  if (!this.titleToolbarValue) {
12446
12481
  this.titleToolbarValue = this.createActionContainer(true);
12482
+ this.titleToolbarValue.locOwner = this;
12447
12483
  this.titleToolbarValue.containerCss = (this.isPanel ? this.cssClasses.panel.titleBar : this.cssClasses.titleBar) || "sv-action-title-bar";
12448
12484
  this.titleToolbarValue.setItems(this.getTitleActions());
12449
12485
  }
@@ -12480,6 +12516,12 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
12480
12516
  }
12481
12517
  this.setPropertyValue("titleActions", actions);
12482
12518
  };
12519
+ SurveyElement.prototype.locStrsChanged = function () {
12520
+ _super.prototype.locStrsChanged.call(this);
12521
+ if (!!this.titleToolbarValue) {
12522
+ this.titleToolbarValue.locStrsChanged();
12523
+ }
12524
+ };
12483
12525
  Object.defineProperty(SurveyElement.prototype, "hasTitleActions", {
12484
12526
  get: function () {
12485
12527
  return this.getTitleActions().length > 0;
@@ -12531,7 +12573,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
12531
12573
  this.textProcessorValue = this.surveyImplValue.getTextProcessor();
12532
12574
  this.onSetData();
12533
12575
  }
12534
- if (!!this.survey) {
12576
+ if (!!this.survey /* && !this.isLoadingFromJson*/) {
12535
12577
  this.updateDescriptionVisibility(this.description);
12536
12578
  this.clearCssClasses();
12537
12579
  }
@@ -12674,20 +12716,28 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
12674
12716
  });
12675
12717
  Object.defineProperty(SurveyElement.prototype, "cssClassesValue", {
12676
12718
  get: function () {
12677
- return this.getPropertyValueWithoutDefault("cssClassesValue");
12678
- },
12679
- set: function (val) {
12680
- this.setPropertyValue("cssClassesValue", val);
12719
+ var res = this.getPropertyValueWithoutDefault("cssClassesValue");
12720
+ if (!res && !this.isCssValueCalculating) {
12721
+ this.isCssValueCalculating = true;
12722
+ res = this.createCssClassesValue();
12723
+ this.isCssValueCalculating = false;
12724
+ }
12725
+ return res;
12681
12726
  },
12682
12727
  enumerable: false,
12683
12728
  configurable: true
12684
12729
  });
12685
12730
  SurveyElement.prototype.ensureCssClassesValue = function () {
12686
12731
  if (!this.cssClassesValue) {
12687
- this.cssClassesValue = this.calcCssClasses(this.css);
12688
- this.updateElementCssCore(this.cssClassesValue);
12732
+ this.createCssClassesValue();
12689
12733
  }
12690
12734
  };
12735
+ SurveyElement.prototype.createCssClassesValue = function () {
12736
+ var res = this.calcCssClasses(this.css);
12737
+ this.setPropertyValue("cssClassesValue", res);
12738
+ this.updateElementCssCore(this.cssClassesValue);
12739
+ return res;
12740
+ };
12691
12741
  Object.defineProperty(SurveyElement.prototype, "cssClasses", {
12692
12742
  /**
12693
12743
  * Returns an object in which keys are UI elements and values are CSS classes applied to them.
@@ -12743,7 +12793,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
12743
12793
  this.clearCssClasses();
12744
12794
  };
12745
12795
  SurveyElement.prototype.clearCssClasses = function () {
12746
- this.cssClassesValue = undefined;
12796
+ this.resetPropertyValue("cssClassesValue");
12747
12797
  };
12748
12798
  SurveyElement.prototype.getIsLoadingFromJson = function () {
12749
12799
  if (_super.prototype.getIsLoadingFromJson.call(this))
@@ -12838,7 +12888,12 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
12838
12888
  configurable: true
12839
12889
  });
12840
12890
  SurveyElement.prototype.onFirstRendering = function () {
12841
- this.wasRenderedValue = true;
12891
+ if (!this.wasRendered) {
12892
+ this.wasRenderedValue = true;
12893
+ this.onFirstRenderingCore();
12894
+ }
12895
+ };
12896
+ SurveyElement.prototype.onFirstRenderingCore = function () {
12842
12897
  this.ensureCssClassesValue();
12843
12898
  };
12844
12899
  SurveyElement.prototype.endLoadingFromJson = function () {
@@ -13133,17 +13188,19 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
13133
13188
  };
13134
13189
  Object.defineProperty(SurveyElement.prototype, "paddingLeft", {
13135
13190
  get: function () {
13136
- return this.getPropertyValue("paddingLeft", "");
13137
- },
13138
- set: function (val) {
13139
- this.setPropertyValue("paddingLeft", val);
13191
+ var _this = this;
13192
+ return this.getPropertyValue("paddingLeft", undefined, function () { return _this.calcPaddingLeft(); });
13140
13193
  },
13141
13194
  enumerable: false,
13142
13195
  configurable: true
13143
13196
  });
13197
+ SurveyElement.prototype.calcPaddingLeft = function () {
13198
+ return "";
13199
+ };
13144
13200
  Object.defineProperty(SurveyElement.prototype, "paddingRight", {
13145
13201
  get: function () {
13146
- return this.getPropertyValue("paddingRight", "");
13202
+ var _this = this;
13203
+ return this.getPropertyValue("paddingRight", undefined, function () { return _this.calcPaddingRight(); });
13147
13204
  },
13148
13205
  set: function (val) {
13149
13206
  this.setPropertyValue("paddingRight", val);
@@ -13151,6 +13208,13 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
13151
13208
  enumerable: false,
13152
13209
  configurable: true
13153
13210
  });
13211
+ SurveyElement.prototype.calcPaddingRight = function () {
13212
+ return "";
13213
+ };
13214
+ SurveyElement.prototype.resetIndents = function () {
13215
+ this.resetPropertyValue("paddingLeft");
13216
+ this.resetPropertyValue("paddingRight");
13217
+ };
13154
13218
  SurveyElement.prototype.updateRootStyle = function () {
13155
13219
  var style = {};
13156
13220
  var _width;
@@ -14662,6 +14726,12 @@ function mergeValues(src, dest) {
14662
14726
  }
14663
14727
  }
14664
14728
  }
14729
+ function updateListCssValues(res, css) {
14730
+ var listCssClasses = {};
14731
+ mergeValues(css.list, listCssClasses);
14732
+ mergeValues(res.list, listCssClasses);
14733
+ res["list"] = listCssClasses;
14734
+ }
14665
14735
  var Logger = /** @class */ (function () {
14666
14736
  function Logger() {
14667
14737
  this._result = "";
@@ -17135,7 +17205,6 @@ var question_Question = /** @class */ (function (_super) {
17135
17205
  _this.createNewArray("validators", function (validator) {
17136
17206
  validator.errorOwner = _this;
17137
17207
  });
17138
- _this.commentTextAreaModel = new text_area_TextAreaModel(_this.getCommentTextAreaOptions());
17139
17208
  _this.addExpressionProperty("visibleIf", function (obj, res) { _this.visible = res === true; });
17140
17209
  _this.addExpressionProperty("enableIf", function (obj, res) { _this.readOnly = res === false; });
17141
17210
  _this.addExpressionProperty("requiredIf", function (obj, res) { _this.isRequired = res === true; });
@@ -17163,7 +17232,7 @@ var question_Question = /** @class */ (function (_super) {
17163
17232
  _this.clearCssClasses();
17164
17233
  });
17165
17234
  _this.registerPropertyChangedHandlers(["indent", "rightIndent"], function () {
17166
- _this.onIndentChanged();
17235
+ _this.resetIndents();
17167
17236
  });
17168
17237
  _this.registerPropertyChangedHandlers(["showCommentArea", "showOtherItem"], function () {
17169
17238
  _this.initCommentFromSurvey();
@@ -17178,26 +17247,6 @@ var question_Question = /** @class */ (function (_super) {
17178
17247
  Question.getQuestionId = function () {
17179
17248
  return "sq_" + Question.questionCounter++;
17180
17249
  };
17181
- Question.prototype.getCommentTextAreaOptions = function () {
17182
- var _this = this;
17183
- var options = {
17184
- question: this,
17185
- id: function () { return _this.commentId; },
17186
- propertyName: "comment",
17187
- className: function () { return _this.cssClasses.comment; },
17188
- placeholder: function () { return _this.renderedCommentPlaceholder; },
17189
- isDisabledAttr: function () { return _this.isInputReadOnly || false; },
17190
- rows: function () { return _this.commentAreaRows; },
17191
- autoGrow: function () { return _this.autoGrowComment; },
17192
- maxLength: function () { return _this.getOthersMaxLength(); },
17193
- ariaRequired: function () { return _this.a11y_input_ariaRequired; },
17194
- ariaLabel: function () { return _this.a11y_input_ariaLabel; },
17195
- getTextValue: function () { return _this.comment; },
17196
- onTextAreaChange: function (e) { _this.onCommentChange(e); },
17197
- onTextAreaInput: function (e) { _this.onCommentInput(e); },
17198
- };
17199
- return options;
17200
- };
17201
17250
  Question.prototype.isReadOnlyRenderDiv = function () {
17202
17251
  return this.isReadOnly && settings.readOnly.commentRenderMode === "div";
17203
17252
  };
@@ -17242,6 +17291,36 @@ var question_Question = /** @class */ (function (_super) {
17242
17291
  this.locProcessedTitle.sharedData = locTitleValue;
17243
17292
  return locTitleValue;
17244
17293
  };
17294
+ Object.defineProperty(Question.prototype, "commentTextAreaModel", {
17295
+ get: function () {
17296
+ if (!this.commentTextAreaModelValue) {
17297
+ this.commentTextAreaModelValue = new text_area_TextAreaModel(this.getCommentTextAreaOptions());
17298
+ }
17299
+ return this.commentTextAreaModelValue;
17300
+ },
17301
+ enumerable: false,
17302
+ configurable: true
17303
+ });
17304
+ Question.prototype.getCommentTextAreaOptions = function () {
17305
+ var _this = this;
17306
+ var options = {
17307
+ question: this,
17308
+ id: function () { return _this.commentId; },
17309
+ propertyName: "comment",
17310
+ className: function () { return _this.cssClasses.comment; },
17311
+ placeholder: function () { return _this.renderedCommentPlaceholder; },
17312
+ isDisabledAttr: function () { return _this.isInputReadOnly || false; },
17313
+ rows: function () { return _this.commentAreaRows; },
17314
+ autoGrow: function () { return _this.autoGrowComment; },
17315
+ maxLength: function () { return _this.getOthersMaxLength(); },
17316
+ ariaRequired: function () { return _this.a11y_input_ariaRequired; },
17317
+ ariaLabel: function () { return _this.a11y_input_ariaLabel; },
17318
+ getTextValue: function () { return _this.comment; },
17319
+ onTextAreaChange: function (e) { _this.onCommentChange(e); },
17320
+ onTextAreaInput: function (e) { _this.onCommentInput(e); },
17321
+ };
17322
+ return options;
17323
+ };
17245
17324
  Question.prototype.getSurvey = function (live) {
17246
17325
  if (live === void 0) { live = false; }
17247
17326
  if (live) {
@@ -17676,10 +17755,8 @@ var question_Question = /** @class */ (function (_super) {
17676
17755
  this.triggersInfo.push(info);
17677
17756
  return info;
17678
17757
  };
17679
- Question.prototype.runTriggerInfo = function (info, name, value) {
17758
+ Question.prototype.runTriggerInfo = function (info, keys) {
17680
17759
  var expression = this[info.name];
17681
- var keys = {};
17682
- keys[name] = value;
17683
17760
  if (!expression || info.isRunning || !info.canRun()) {
17684
17761
  if (info.runSecondCheck(keys)) {
17685
17762
  info.doComplete();
@@ -17703,12 +17780,16 @@ var question_Question = /** @class */ (function (_super) {
17703
17780
  info.isRunning = true;
17704
17781
  info.runner.run(this.getDataFilteredValues(), this.getDataFilteredProperties());
17705
17782
  };
17706
- Question.prototype.runTriggers = function (name, value) {
17783
+ Question.prototype.runTriggers = function (name, value, keys) {
17707
17784
  var _this = this;
17708
17785
  if (this.isSettingQuestionValue || (this.parentQuestion && this.parentQuestion.getValueName() === name))
17709
17786
  return;
17787
+ if (!keys) {
17788
+ keys = {};
17789
+ keys[name] = value;
17790
+ }
17710
17791
  this.triggersInfo.forEach(function (info) {
17711
- _this.runTriggerInfo(info, name, value);
17792
+ _this.runTriggerInfo(info, keys);
17712
17793
  });
17713
17794
  };
17714
17795
  Question.prototype.runConditions = function () {
@@ -17727,7 +17808,6 @@ var question_Question = /** @class */ (function (_super) {
17727
17808
  if (isLight !== true) {
17728
17809
  this.runConditions();
17729
17810
  }
17730
- this.calcRenderedCommentPlaceholder();
17731
17811
  if (!this.visible) {
17732
17812
  this.updateIsVisibleProp();
17733
17813
  }
@@ -17745,7 +17825,9 @@ var question_Question = /** @class */ (function (_super) {
17745
17825
  return;
17746
17826
  this.removeFromParent();
17747
17827
  this.setPropertyValue("parent", val);
17748
- this.updateQuestionCss();
17828
+ if (!!val) {
17829
+ this.updateQuestionCss();
17830
+ }
17749
17831
  this.onParentChanged();
17750
17832
  },
17751
17833
  enumerable: false,
@@ -18073,14 +18155,17 @@ var question_Question = /** @class */ (function (_super) {
18073
18155
  });
18074
18156
  Object.defineProperty(Question.prototype, "renderedCommentPlaceholder", {
18075
18157
  get: function () {
18076
- return this.getPropertyValue("renderedCommentPlaceholder");
18158
+ var _this = this;
18159
+ var func = function () {
18160
+ return !_this.isReadOnly ? _this.commentPlaceHolder : undefined;
18161
+ };
18162
+ return this.getPropertyValue("renderedCommentPlaceholder", undefined, func);
18077
18163
  },
18078
18164
  enumerable: false,
18079
18165
  configurable: true
18080
18166
  });
18081
- Question.prototype.calcRenderedCommentPlaceholder = function () {
18082
- var res = !this.isReadOnly ? this.commentPlaceHolder : undefined;
18083
- this.setPropertyValue("renderedCommentPlaceholder", res);
18167
+ Question.prototype.resetRenderedCommentPlaceholder = function () {
18168
+ this.resetPropertyValue("renderedCommentPlaceholder");
18084
18169
  };
18085
18170
  Question.prototype.getAllErrors = function () {
18086
18171
  return this.errors.slice();
@@ -18108,7 +18193,7 @@ var question_Question = /** @class */ (function (_super) {
18108
18193
  };
18109
18194
  Question.prototype.localeChanged = function () {
18110
18195
  _super.prototype.localeChanged.call(this);
18111
- this.calcRenderedCommentPlaceholder();
18196
+ this.resetRenderedCommentPlaceholder();
18112
18197
  if (!!this.localeChangedCallback) {
18113
18198
  this.localeChangedCallback();
18114
18199
  }
@@ -18350,8 +18435,8 @@ var question_Question = /** @class */ (function (_super) {
18350
18435
  };
18351
18436
  Question.prototype.getCssDescription = function (cssClasses) {
18352
18437
  return new CssClassBuilder()
18353
- .append(cssClasses.description, this.hasDescriptionUnderTitle)
18354
- .append(cssClasses.descriptionUnderInput, this.hasDescriptionUnderInput)
18438
+ .append(cssClasses.description)
18439
+ .append(cssClasses.descriptionUnderInput, this.getDescriptionLocation() == "underInput")
18355
18440
  .toString();
18356
18441
  };
18357
18442
  Question.prototype.showErrorOnCore = function (location) {
@@ -18437,7 +18522,7 @@ var question_Question = /** @class */ (function (_super) {
18437
18522
  if (reNew) {
18438
18523
  this.updateQuestionCss(true);
18439
18524
  }
18440
- this.onIndentChanged();
18525
+ this.resetIndents();
18441
18526
  };
18442
18527
  Question.prototype.updateQuestionCss = function (reNew) {
18443
18528
  if (this.isLoadingFromJson ||
@@ -18491,9 +18576,11 @@ var question_Question = /** @class */ (function (_super) {
18491
18576
  enumerable: false,
18492
18577
  configurable: true
18493
18578
  });
18494
- Question.prototype.onIndentChanged = function () {
18495
- this.paddingLeft = this.getIndentSize(this.indent);
18496
- this.paddingRight = this.getIndentSize(this.rightIndent);
18579
+ Question.prototype.calcPaddingLeft = function () {
18580
+ return this.getIndentSize(this.indent);
18581
+ };
18582
+ Question.prototype.calcPaddingRight = function () {
18583
+ return this.getIndentSize(this.rightIndent);
18497
18584
  };
18498
18585
  Question.prototype.getIndentSize = function (indent) {
18499
18586
  if (indent < 1 || !this.getSurvey() || !this.cssClasses || !this.cssClasses.indent)
@@ -18798,7 +18885,7 @@ var question_Question = /** @class */ (function (_super) {
18798
18885
  this.clearErrors();
18799
18886
  }
18800
18887
  this.updateQuestionCss();
18801
- this.calcRenderedCommentPlaceholder();
18888
+ this.resetRenderedCommentPlaceholder();
18802
18889
  };
18803
18890
  Object.defineProperty(Question.prototype, "enableIf", {
18804
18891
  /**
@@ -18889,15 +18976,10 @@ var question_Question = /** @class */ (function (_super) {
18889
18976
  if (this.isEmpty()) {
18890
18977
  this.initDataFromSurvey();
18891
18978
  }
18892
- this.calcRenderedCommentPlaceholder();
18893
- this.onIndentChanged();
18894
18979
  };
18895
18980
  Question.prototype.onSetData = function () {
18896
18981
  _super.prototype.onSetData.call(this);
18897
- if (!this.survey)
18898
- return;
18899
- this.onIndentChanged();
18900
- if (!this.isDesignMode) {
18982
+ if (!this.isDesignMode && !!this.survey && !this.isLoadingFromJson) {
18901
18983
  this.initDataFromSurvey();
18902
18984
  this.onSurveyValueChanged(this.value);
18903
18985
  this.updateValueWithDefaults();
@@ -19117,7 +19199,6 @@ var question_Question = /** @class */ (function (_super) {
19117
19199
  Question.prototype.clearValueIfInvisibleCore = function (reason) {
19118
19200
  if (this.canClearValueAsInvisible(reason)) {
19119
19201
  this.clearValue();
19120
- this.setValueChangedDirectly(undefined);
19121
19202
  }
19122
19203
  };
19123
19204
  Object.defineProperty(Question.prototype, "clearIfInvisible", {
@@ -20409,7 +20490,7 @@ var question_Question = /** @class */ (function (_super) {
20409
20490
  jsonobject_property()
20410
20491
  ], Question.prototype, "ariaExpanded", void 0);
20411
20492
  question_decorate([
20412
- jsonobject_property({ localizable: true, onSet: function (val, target) { return target.calcRenderedCommentPlaceholder(); } })
20493
+ jsonobject_property({ localizable: true, onSet: function (val, target) { return target.resetRenderedCommentPlaceholder(); } })
20413
20494
  ], Question.prototype, "commentPlaceholder", void 0);
20414
20495
  question_decorate([
20415
20496
  jsonobject_property()
@@ -23109,12 +23190,12 @@ var question_custom_QuestionCustomModelBase = /** @class */ (function (_super) {
23109
23190
  this.customQuestion.onItemValuePropertyChanged(this, item, item.ownerPropertyName, name, newValue);
23110
23191
  }
23111
23192
  };
23112
- QuestionCustomModelBase.prototype.onFirstRendering = function () {
23193
+ QuestionCustomModelBase.prototype.onFirstRenderingCore = function () {
23194
+ _super.prototype.onFirstRenderingCore.call(this);
23113
23195
  var el = this.getElement();
23114
23196
  if (!!el) {
23115
23197
  el.onFirstRendering();
23116
23198
  }
23117
- _super.prototype.onFirstRendering.call(this);
23118
23199
  };
23119
23200
  QuestionCustomModelBase.prototype.onHidingContent = function () {
23120
23201
  _super.prototype.onHidingContent.call(this);
@@ -24595,6 +24676,9 @@ Serializer.addClass("expression", [
24595
24676
  { name: "isRequired", visible: false },
24596
24677
  { name: "readOnly", visible: false },
24597
24678
  { name: "requiredErrorText", visible: false },
24679
+ { name: "resetValueIf", visible: false },
24680
+ { name: "setValueIf", visible: false },
24681
+ { name: "setValueExpression", visible: false },
24598
24682
  { name: "defaultValueExpression", visible: false },
24599
24683
  { name: "defaultValue", visible: false },
24600
24684
  { name: "correctAnswer", visible: false },
@@ -26304,8 +26388,12 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable = /** @c
26304
26388
  var dataRowIndex = 0;
26305
26389
  for (var i = 0; i < this.rows.length; i++) {
26306
26390
  if (dataRowIndex === index) {
26307
- if (this.rows[i].isErrorsRow || this.rows[i].isDetailRow)
26391
+ if (this.rows[i].isErrorsRow || this.rows[i].isDetailRow) {
26308
26392
  res++;
26393
+ if (i + 1 < this.rows.length && this.rows[i + 1].isDetailRow) {
26394
+ res++;
26395
+ }
26396
+ }
26309
26397
  break;
26310
26398
  }
26311
26399
  res++;
@@ -26404,7 +26492,7 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable = /** @c
26404
26492
  return;
26405
26493
  this.headerRowValue = this.createRenderedRow(this.cssClasses);
26406
26494
  if (this.isRowsDragAndDrop) {
26407
- this.headerRow.cells.push(this.createHeaderCell(null, "action"));
26495
+ this.headerRow.cells.push(this.createHeaderCell(null, "action", this.cssClasses.actionsCellDrag));
26408
26496
  }
26409
26497
  if (this.hasActionCellInRows("start")) {
26410
26498
  this.headerRow.cells.push(this.createHeaderCell(null, "action"));
@@ -26952,22 +27040,23 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable = /** @c
26952
27040
  return null;
26953
27041
  return choices;
26954
27042
  };
26955
- QuestionMatrixDropdownRenderedTable.prototype.setHeaderCellCssClasses = function (cell, cellType) {
27043
+ QuestionMatrixDropdownRenderedTable.prototype.setHeaderCellCssClasses = function (cell, cellType, classMod) {
26956
27044
  cell.className = new CssClassBuilder()
26957
27045
  .append(this.cssClasses.headerCell)
26958
27046
  .append(this.cssClasses.columnTitleCell, this.matrix.isColumnLayoutHorizontal)
26959
27047
  .append(this.cssClasses.emptyCell, !!cell.isEmpty)
26960
27048
  .append(this.cssClasses.cell + "--" + cellType, !!cellType)
27049
+ .append(classMod, !!classMod)
26961
27050
  .toString();
26962
27051
  };
26963
- QuestionMatrixDropdownRenderedTable.prototype.createHeaderCell = function (column, cellType) {
27052
+ QuestionMatrixDropdownRenderedTable.prototype.createHeaderCell = function (column, cellType, classMod) {
26964
27053
  if (cellType === void 0) { cellType = null; }
26965
27054
  var cell = !!column ? this.createTextCell(column.locTitle) : this.createEmptyCell();
26966
27055
  cell.column = column;
26967
27056
  this.setHeaderCell(column, cell);
26968
27057
  if (!cellType)
26969
27058
  cellType = (!!column && column.cellType !== "default") ? column.cellType : this.matrix.cellType;
26970
- this.setHeaderCellCssClasses(cell, cellType);
27059
+ this.setHeaderCellCssClasses(cell, cellType, classMod);
26971
27060
  return cell;
26972
27061
  };
26973
27062
  QuestionMatrixDropdownRenderedTable.prototype.setHeaderCell = function (column, cell) {
@@ -28591,6 +28680,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
28591
28680
  }
28592
28681
  };
28593
28682
  QuestionMatrixDropdownModelBase.prototype.runCondition = function (values, properties) {
28683
+ var oldRowVariables = values[question_matrixdropdownbase_MatrixDropdownRowModelBase.RowVariableName];
28594
28684
  _super.prototype.runCondition.call(this, values, properties);
28595
28685
  var counter = 0;
28596
28686
  var prevTotalValue;
@@ -28602,10 +28692,11 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
28602
28692
  } while (!helpers_Helpers.isTwoValueEquals(prevTotalValue, this.totalValue) &&
28603
28693
  counter < 3);
28604
28694
  this.updateVisibilityBasedOnRows();
28695
+ values[question_matrixdropdownbase_MatrixDropdownRowModelBase.RowVariableName] = oldRowVariables;
28605
28696
  };
28606
- QuestionMatrixDropdownModelBase.prototype.runTriggers = function (name, value) {
28607
- _super.prototype.runTriggers.call(this, name, value);
28608
- this.runFuncForCellQuestions(function (q) { q.runTriggers(name, value); });
28697
+ QuestionMatrixDropdownModelBase.prototype.runTriggers = function (name, value, keys) {
28698
+ _super.prototype.runTriggers.call(this, name, value, keys);
28699
+ this.runFuncForCellQuestions(function (q) { q.runTriggers(name, value, keys); });
28609
28700
  };
28610
28701
  QuestionMatrixDropdownModelBase.prototype.updateElementVisibility = function () {
28611
28702
  _super.prototype.updateElementVisibility.call(this);
@@ -28840,7 +28931,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
28840
28931
  /**
28841
28932
  * An error message displayed when users enter a duplicate value into a column that accepts only unique values (`isUnique` is set to `true` or `keyName` is specified).
28842
28933
  *
28843
- * A default value for this property is taken from a [localization dictionary](https://github.com/surveyjs/survey-library/tree/master/src/localization). Refer to the following help topic for more information: [Localization & Globalization](https://surveyjs.io/form-library/documentation/localization).
28934
+ * A default value for this property is taken from a [localization dictionary](https://github.com/surveyjs/survey-library/tree/01bd8abd0c574719956d4d579d48c8010cd389d4/packages/survey-core/src/localization). Refer to the following help topic for more information: [Localization & Globalization](https://surveyjs.io/form-library/documentation/localization).
28844
28935
  * @see isUniqueCaseSensitive
28845
28936
  */
28846
28937
  get: function () {
@@ -31103,7 +31194,7 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
31103
31194
  return true;
31104
31195
  };
31105
31196
  QuestionMatrixDynamicModel.prototype.onPointerDown = function (pointerDownEvent, row) {
31106
- if (!row || !this.isRowsDragAndDrop)
31197
+ if (!row || !this.isRowsDragAndDrop || this.isDesignMode)
31107
31198
  return;
31108
31199
  if (this.isBanStartDrag(pointerDownEvent))
31109
31200
  return;
@@ -32418,7 +32509,7 @@ var defaultV2Css = {
32418
32509
  requiredText: "sd-question__required-text",
32419
32510
  number: "sd-element__num",
32420
32511
  description: "sd-description sd-question__description",
32421
- descriptionUnderInput: "sd-description sd-question__description sd-question__description--under-input",
32512
+ descriptionUnderInput: "sd-question__description--under-input",
32422
32513
  comment: "sd-input sd-comment",
32423
32514
  other: "sd-input sd-comment",
32424
32515
  required: "sd-question--required",
@@ -34701,7 +34792,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
34701
34792
  _this.updateVisibleIndexes();
34702
34793
  });
34703
34794
  _this.registerPropertyChangedHandlers(["title"], function () {
34704
- _this.calcHasTextInTitle();
34795
+ _this.resetHasTextInTitle();
34705
34796
  });
34706
34797
  _this.dragDropPanelHelper = new drag_drop_panel_helper_v1_DragDropPanelHelperV1(_this);
34707
34798
  return _this;
@@ -34758,6 +34849,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
34758
34849
  return "panelbase";
34759
34850
  };
34760
34851
  PanelModelBase.prototype.setSurveyImpl = function (value, isLight) {
34852
+ //if(this.surveyImpl === value) return; TODO refactor
34761
34853
  this.blockAnimations();
34762
34854
  _super.prototype.setSurveyImpl.call(this, value, isLight);
34763
34855
  if (this.isDesignMode)
@@ -34777,8 +34869,16 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
34777
34869
  col.onPropertyValueChangedCallback = _this.onColumnPropertyValueChangedCallback;
34778
34870
  });
34779
34871
  };
34780
- PanelModelBase.prototype.calcHasTextInTitle = function () {
34781
- this.hasTextInTitle = !!this.title;
34872
+ Object.defineProperty(PanelModelBase.prototype, "hasTextInTitle", {
34873
+ get: function () {
34874
+ var _this = this;
34875
+ return this.getPropertyValue("hasTextInTitle", undefined, function () { return !!_this.title; });
34876
+ },
34877
+ enumerable: false,
34878
+ configurable: true
34879
+ });
34880
+ PanelModelBase.prototype.resetHasTextInTitle = function () {
34881
+ this.resetPropertyValue("hasTextInTitle");
34782
34882
  };
34783
34883
  Object.defineProperty(PanelModelBase.prototype, "hasTitle", {
34784
34884
  get: function () {
@@ -35791,14 +35891,11 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
35791
35891
  }
35792
35892
  this.onElementVisibilityChanged(this);
35793
35893
  this.releaseAnimations();
35794
- this.calcHasTextInTitle();
35795
35894
  };
35796
- PanelModelBase.prototype.onFirstRendering = function () {
35797
- _super.prototype.onFirstRendering.call(this);
35798
- for (var i = 0; i < this.elements.length; i++) {
35799
- this.elements[i].onFirstRendering();
35800
- }
35895
+ PanelModelBase.prototype.onFirstRenderingCore = function () {
35896
+ _super.prototype.onFirstRenderingCore.call(this);
35801
35897
  this.onRowsChanged();
35898
+ this.elements.forEach(function (el) { return el.onFirstRendering(); });
35802
35899
  };
35803
35900
  PanelModelBase.prototype.updateRows = function () {
35804
35901
  if (this.isLoadingFromJson)
@@ -36242,9 +36339,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
36242
36339
  PanelModelBase.prototype.getPanelStartIndex = function (index) {
36243
36340
  return index;
36244
36341
  };
36245
- PanelModelBase.prototype.isContinueNumbering = function () {
36246
- return true;
36247
- };
36342
+ PanelModelBase.prototype.isContinueNumbering = function () { return true; };
36248
36343
  Object.defineProperty(PanelModelBase.prototype, "isReadOnly", {
36249
36344
  get: function () {
36250
36345
  var isParentReadOnly = !!this.parent && this.parent.isReadOnly;
@@ -36585,9 +36680,6 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
36585
36680
  panel_decorate([
36586
36681
  jsonobject_property({ defaultValue: true })
36587
36682
  ], PanelModelBase.prototype, "showTitle", void 0);
36588
- panel_decorate([
36589
- jsonobject_property({ defaultValue: false })
36590
- ], PanelModelBase.prototype, "hasTextInTitle", void 0);
36591
36683
  panel_decorate([
36592
36684
  jsonobject_property({ defaultValue: true })
36593
36685
  ], PanelModelBase.prototype, "showDescription", void 0);
@@ -36616,7 +36708,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
36616
36708
  _this.parent.elementWidthChanged(_this);
36617
36709
  }
36618
36710
  });
36619
- _this.registerPropertyChangedHandlers(["indent", "innerIndent", "rightIndent"], function () { _this.onIndentChanged(); });
36711
+ _this.registerPropertyChangedHandlers(["indent", "innerIndent", "rightIndent"], function () { _this.resetIndents(); });
36620
36712
  _this.registerPropertyChangedHandlers(["colSpan"], function () { var _a; (_a = _this.parent) === null || _a === void 0 ? void 0 : _a.updateColumns(); });
36621
36713
  return _this;
36622
36714
  }
@@ -36637,15 +36729,6 @@ var panel_PanelModel = /** @class */ (function (_super) {
36637
36729
  }
36638
36730
  return _super.prototype.getSurvey.call(this, live);
36639
36731
  };
36640
- PanelModel.prototype.onSurveyLoad = function () {
36641
- _super.prototype.onSurveyLoad.call(this);
36642
- this.onIndentChanged();
36643
- };
36644
- PanelModel.prototype.onSetData = function () {
36645
- _super.prototype.onSetData.call(this);
36646
- this.onIndentChanged();
36647
- this.calcHasTextInTitle();
36648
- };
36649
36732
  Object.defineProperty(PanelModel.prototype, "isPanel", {
36650
36733
  get: function () {
36651
36734
  return true;
@@ -36869,7 +36952,11 @@ var panel_PanelModel = /** @class */ (function (_super) {
36869
36952
  });
36870
36953
  Object.defineProperty(PanelModel.prototype, "innerPaddingLeft", {
36871
36954
  get: function () {
36872
- return this.getPropertyValue("innerPaddingLeft", "");
36955
+ var _this = this;
36956
+ var func = function () {
36957
+ return _this.getIndentSize(_this.innerIndent);
36958
+ };
36959
+ return this.getPropertyValue("innerPaddingLeft", undefined, func);
36873
36960
  },
36874
36961
  set: function (val) {
36875
36962
  this.setPropertyValue("innerPaddingLeft", val);
@@ -36877,18 +36964,23 @@ var panel_PanelModel = /** @class */ (function (_super) {
36877
36964
  enumerable: false,
36878
36965
  configurable: true
36879
36966
  });
36880
- PanelModel.prototype.onIndentChanged = function () {
36881
- if (!this.getSurvey())
36882
- return;
36883
- this.innerPaddingLeft = this.getIndentSize(this.innerIndent);
36884
- this.paddingLeft = this.getIndentSize(this.indent);
36885
- this.paddingRight = this.getIndentSize(this.rightIndent);
36967
+ PanelModel.prototype.calcPaddingLeft = function () {
36968
+ return this.getIndentSize(this.indent);
36969
+ };
36970
+ PanelModel.prototype.calcPaddingRight = function () {
36971
+ return this.getIndentSize(this.rightIndent);
36972
+ };
36973
+ PanelModel.prototype.resetIndents = function () {
36974
+ this.resetPropertyValue("innerPaddingLeft");
36975
+ _super.prototype.resetIndents.call(this);
36886
36976
  };
36887
36977
  PanelModel.prototype.getIndentSize = function (indent) {
36978
+ if (!this.survey)
36979
+ return undefined;
36888
36980
  if (indent < 1)
36889
36981
  return "";
36890
36982
  var css = this.survey["css"];
36891
- if (!css || !css.question.indent)
36983
+ if (!css || !css.question || !css.question.indent)
36892
36984
  return "";
36893
36985
  return indent * css.question.indent + "px";
36894
36986
  };
@@ -37528,11 +37620,6 @@ var page_PageModel = /** @class */ (function (_super) {
37528
37620
  this.removeSelfFromList(this.survey.pages);
37529
37621
  }
37530
37622
  };
37531
- PageModel.prototype.onFirstRendering = function () {
37532
- if (this.wasShown)
37533
- return;
37534
- _super.prototype.onFirstRendering.call(this);
37535
- };
37536
37623
  Object.defineProperty(PageModel.prototype, "visibleIndex", {
37537
37624
  /**
37538
37625
  * The visible index of the page. It has values from 0 to visible page count - 1.
@@ -43765,6 +43852,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
43765
43852
  width: width,
43766
43853
  };
43767
43854
  this.onResize.fire(this, options);
43855
+ this.setResponsiveStartWidth(width);
43768
43856
  return isMobileChanged;
43769
43857
  };
43770
43858
  SurveyModel.prototype.triggerResponsiveness = function (hard) {
@@ -44134,7 +44222,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44134
44222
  }, elementsToRenderBefore);
44135
44223
  }
44136
44224
  else {
44137
- if (!elementPage_1 && !this.isSinglePage && !this.isDesignMode && this.rootElement) {
44225
+ if (element.isPage && !this.isSinglePage && !this.isDesignMode && this.rootElement) {
44138
44226
  var elementToScroll = this.rootElement.querySelector(classesToSelector(this.css.rootWrapper));
44139
44227
  survey_element_SurveyElement.ScrollElementToViewCore(elementToScroll, false, scrollIfVisible, scrollIntoViewOptions, onScolledCallback);
44140
44228
  }
@@ -44659,12 +44747,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44659
44747
  var question = questions[i];
44660
44748
  this.checkQuestionErrorOnValueChanged(question);
44661
44749
  question.onSurveyValueChanged(newValue);
44662
- this.fireOnValueChanged(valueName, newValue, question);
44663
44750
  }
44664
44751
  }
44665
- else {
44666
- this.fireOnValueChanged(valueName, newValue, null);
44667
- }
44752
+ this.fireOnValueChanged(valueName, newValue, !!questionName ? this.getQuestionByName(questionName) : undefined);
44668
44753
  if (this.isDisposed)
44669
44754
  return;
44670
44755
  this.checkElementsBindings(valueName, newValue);
@@ -44838,11 +44923,17 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44838
44923
  SurveyModel.prototype.runConditionOnValueChanged = function (name, value) {
44839
44924
  if (this.isRunningConditions) {
44840
44925
  this.conditionValues[name] = value;
44926
+ if (this.questionTriggersKeys) {
44927
+ this.questionTriggersKeys[name] = value;
44928
+ }
44841
44929
  this.isValueChangedOnRunningCondition = true;
44842
44930
  }
44843
44931
  else {
44932
+ this.questionTriggersKeys = {};
44933
+ this.questionTriggersKeys[name] = value;
44844
44934
  this.runConditions();
44845
44935
  this.runQuestionsTriggers(name, value);
44936
+ this.questionTriggersKeys = undefined;
44846
44937
  }
44847
44938
  };
44848
44939
  SurveyModel.prototype.runConditionsCore = function (properties) {
@@ -44859,10 +44950,13 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44859
44950
  }
44860
44951
  };
44861
44952
  SurveyModel.prototype.runQuestionsTriggers = function (name, value) {
44953
+ var _this = this;
44862
44954
  if (this.isDisplayMode || this.isDesignMode)
44863
44955
  return;
44864
44956
  var questions = this.getAllQuestions();
44865
- questions.forEach(function (q) { return q.runTriggers(name, value); });
44957
+ questions.forEach(function (q) {
44958
+ q.runTriggers(name, value, _this.questionTriggersKeys);
44959
+ });
44866
44960
  };
44867
44961
  SurveyModel.prototype.checkIfNewPagesBecomeVisible = function (oldCurrentPageIndex) {
44868
44962
  var newCurrentPageIndex = this.pages.indexOf(this.currentPage);
@@ -46072,10 +46166,29 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46072
46166
  });
46073
46167
  Object.defineProperty(SurveyModel.prototype, "renderedWidth", {
46074
46168
  get: function () {
46169
+ var isStaticWidth = this.getPropertyValue("calculatedWidthMode") == "static";
46075
46170
  var width = this.getPropertyValue("width");
46171
+ if (this.isScaled && this.responsiveStartWidth > 1) {
46172
+ var initialWidth = this.responsiveStartWidth;
46173
+ try {
46174
+ initialWidth = !isNaN(width) ? width : parseFloat(width.toString().replace("px", ""));
46175
+ }
46176
+ catch (e) { }
46177
+ return (isStaticWidth ? initialWidth : this.responsiveStartWidth) * this.widthScale / 100 + "px";
46178
+ }
46076
46179
  if (width && !isNaN(width))
46077
46180
  width = width + "px";
46078
- return this.getPropertyValue("calculatedWidthMode") == "static" && width || undefined;
46181
+ return isStaticWidth && width || undefined;
46182
+ },
46183
+ enumerable: false,
46184
+ configurable: true
46185
+ });
46186
+ SurveyModel.prototype.setResponsiveStartWidth = function (width) {
46187
+ this.responsiveStartWidth = width;
46188
+ };
46189
+ Object.defineProperty(SurveyModel.prototype, "isScaled", {
46190
+ get: function () {
46191
+ return Math.abs(this.widthScale - 100) > 0.001;
46079
46192
  },
46080
46193
  enumerable: false,
46081
46194
  configurable: true
@@ -46905,6 +47018,12 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46905
47018
  survey_decorate([
46906
47019
  jsonobject_property()
46907
47020
  ], SurveyModel.prototype, "calculatedWidthMode", void 0);
47021
+ survey_decorate([
47022
+ jsonobject_property({ defaultValue: 100 })
47023
+ ], SurveyModel.prototype, "widthScale", void 0);
47024
+ survey_decorate([
47025
+ jsonobject_property()
47026
+ ], SurveyModel.prototype, "responsiveStartWidth", void 0);
46908
47027
  survey_decorate([
46909
47028
  propertyArray()
46910
47029
  ], SurveyModel.prototype, "layoutElements", void 0);
@@ -47280,7 +47399,6 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
47280
47399
  _this.registerPropertyChangedHandlers(["hideIfChoicesEmpty"], function () {
47281
47400
  _this.onVisibleChanged();
47282
47401
  });
47283
- _this.otherTextAreaModel = new text_area_TextAreaModel(_this.getOtherTextAreaOptions());
47284
47402
  _this.createNewArray("visibleChoices", function () { return _this.updateRenderedChoices(); }, function () { return _this.updateRenderedChoices(); });
47285
47403
  _this.setNewRestfulProperty();
47286
47404
  var locOtherText = _this.createLocalizableString("otherText", _this.otherItemValue, true, "otherItemText");
@@ -47311,6 +47429,26 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
47311
47429
  enumerable: false,
47312
47430
  configurable: true
47313
47431
  });
47432
+ QuestionSelectBase.prototype.getType = function () {
47433
+ return "selectbase";
47434
+ };
47435
+ QuestionSelectBase.prototype.dispose = function () {
47436
+ _super.prototype.dispose.call(this);
47437
+ var q = this.getQuestionWithChoices();
47438
+ if (!!q) {
47439
+ q.removeDependedQuestion(this);
47440
+ }
47441
+ };
47442
+ Object.defineProperty(QuestionSelectBase.prototype, "otherTextAreaModel", {
47443
+ get: function () {
47444
+ if (!this.otherTextAreaModelValue) {
47445
+ this.otherTextAreaModelValue = new text_area_TextAreaModel(this.getOtherTextAreaOptions());
47446
+ }
47447
+ return this.otherTextAreaModelValue;
47448
+ },
47449
+ enumerable: false,
47450
+ configurable: true
47451
+ });
47314
47452
  QuestionSelectBase.prototype.getOtherTextAreaOptions = function () {
47315
47453
  var _this = this;
47316
47454
  var options = {
@@ -47331,16 +47469,6 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
47331
47469
  };
47332
47470
  return options;
47333
47471
  };
47334
- QuestionSelectBase.prototype.getType = function () {
47335
- return "selectbase";
47336
- };
47337
- QuestionSelectBase.prototype.dispose = function () {
47338
- _super.prototype.dispose.call(this);
47339
- var q = this.getQuestionWithChoices();
47340
- if (!!q) {
47341
- q.removeDependedQuestion(this);
47342
- }
47343
- };
47344
47472
  QuestionSelectBase.prototype.resetDependedQuestion = function () {
47345
47473
  this.choicesFromQuestion = "";
47346
47474
  };
@@ -49507,22 +49635,6 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
49507
49635
  enumerable: false,
49508
49636
  configurable: true
49509
49637
  });
49510
- QuestionSelectBase.prototype.updateCssClasses = function (res, css) {
49511
- _super.prototype.updateCssClasses.call(this, res, css);
49512
- if (!!this.dropdownListModel) {
49513
- var listCssClasses = {};
49514
- mergeValues(css.list, listCssClasses);
49515
- mergeValues(res.list, listCssClasses);
49516
- res["list"] = listCssClasses;
49517
- }
49518
- };
49519
- QuestionSelectBase.prototype.calcCssClasses = function (css) {
49520
- var classes = _super.prototype.calcCssClasses.call(this, css);
49521
- if (this.dropdownListModel) {
49522
- this.dropdownListModel.updateCssClasses(classes.popup, classes.list);
49523
- }
49524
- return classes;
49525
- };
49526
49638
  question_baseselect_decorate([
49527
49639
  jsonobject_property({
49528
49640
  onSet: function (newVal, target) {
@@ -50696,7 +50808,6 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
50696
50808
  _this.selectedItemSelector = ".sv-list__item--selected";
50697
50809
  _this.itemSelector = ".sv-list__item";
50698
50810
  _this.itemsSettings = { skip: 0, take: 0, totalCount: 0, items: [] };
50699
- _this.popupCssClasses = "sv-single-select-list";
50700
50811
  _this.listModelFilterStringChanged = function (newValue) {
50701
50812
  if (_this.filterString !== newValue) {
50702
50813
  _this.filterString = newValue;
@@ -50706,7 +50817,6 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
50706
50817
  _this.onPropertyChangedHandler(sender, options);
50707
50818
  };
50708
50819
  _this.htmlCleanerElement = DomDocumentHelper.createElement("div");
50709
- _this.question.ariaExpanded = "false";
50710
50820
  question.onPropertyChanged.add(_this.questionPropertyChangedHandler);
50711
50821
  _this.showInputFieldComponent = _this.question.showInputFieldComponent;
50712
50822
  _this.listModel = _this.createListModel();
@@ -50716,6 +50826,8 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
50716
50826
  _this.setTextWrapEnabled(_this.question.textWrapEnabled);
50717
50827
  _this.createPopup();
50718
50828
  _this.resetItemsSettings();
50829
+ var classes = question.cssClasses;
50830
+ _this.updateCssClasses(classes.popup, classes.list);
50719
50831
  return _this;
50720
50832
  }
50721
50833
  Object.defineProperty(DropdownListModel.prototype, "focusFirstInputSelector", {
@@ -50766,11 +50878,8 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
50766
50878
  var _this = this;
50767
50879
  var isUpdate = (this.itemsSettings.skip + 1) < this.itemsSettings.totalCount;
50768
50880
  if (!this.itemsSettings.skip || isUpdate) {
50881
+ this.resetTimer();
50769
50882
  if (!!this.filterString && settings.dropdownSearchDelay > 0) {
50770
- if (!!this.timer) {
50771
- clearTimeout(this.timer);
50772
- this.timer = undefined;
50773
- }
50774
50883
  this.timer = setTimeout(function () {
50775
50884
  _this.loadQuestionChoices(callbackAfterItemsLoaded);
50776
50885
  }, settings.dropdownSearchDelay);
@@ -50780,6 +50889,12 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
50780
50889
  }
50781
50890
  }
50782
50891
  };
50892
+ DropdownListModel.prototype.resetTimer = function () {
50893
+ if (!!this.timer) {
50894
+ clearTimeout(this.timer);
50895
+ this.timer = undefined;
50896
+ }
50897
+ };
50783
50898
  DropdownListModel.prototype.updatePopupFocusFirstInputSelector = function () {
50784
50899
  this._popupModel.focusFirstInputSelector = this.focusFirstInputSelector;
50785
50900
  };
@@ -50815,7 +50930,6 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
50815
50930
  this.listModel.registerPropertyChangedHandlers(["showFilter"], function () {
50816
50931
  _this.updatePopupFocusFirstInputSelector();
50817
50932
  });
50818
- this._popupModel.cssClass = this.popupCssClasses;
50819
50933
  this._popupModel.onVisibilityChanged.add(function (_, option) {
50820
50934
  if (option.isVisible) {
50821
50935
  _this.listModel.renderElements = true;
@@ -50929,8 +51043,9 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
50929
51043
  model.isAllDataLoaded = !this.question.choicesLazyLoadEnabled;
50930
51044
  model.actions.forEach(function (a) { return a.disableTabStop = true; });
50931
51045
  };
51046
+ DropdownListModel.prototype.getPopupCssClasses = function () { return "sv-single-select-list"; };
50932
51047
  DropdownListModel.prototype.updateCssClasses = function (popupCssClass, listCssClasses) {
50933
- this.popupModel.cssClass = new CssClassBuilder().append(popupCssClass).append(this.popupCssClasses).toString();
51048
+ this.popupModel.cssClass = new CssClassBuilder().append(popupCssClass).append(this.getPopupCssClasses()).toString();
50934
51049
  this.listModel.cssClasses = listCssClasses;
50935
51050
  };
50936
51051
  DropdownListModel.prototype.resetFilterString = function () {
@@ -51408,6 +51523,7 @@ var question_dropdown_decorate = (undefined && undefined.__decorate) || function
51408
51523
 
51409
51524
 
51410
51525
 
51526
+
51411
51527
  /**
51412
51528
  * A class that describes the Dropdown question type.
51413
51529
  *
@@ -51420,6 +51536,7 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
51420
51536
  _this.lastSelectedItemValue = null;
51421
51537
  _this.minMaxChoices = [];
51422
51538
  _this.onOpened = _this.addEvent();
51539
+ _this.ariaExpanded = "false";
51423
51540
  _this.createLocalizableString("placeholder", _this, false, true);
51424
51541
  _this.createLocalizableString("clearCaption", _this, false, true);
51425
51542
  _this.registerPropertyChangedHandlers(["choicesMin", "choicesMax", "choicesStep"], function () {
@@ -51644,6 +51761,19 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
51644
51761
  .append(this.cssClasses.controlInputFieldComponent, !!this.inputFieldComponentName)
51645
51762
  .toString();
51646
51763
  };
51764
+ QuestionDropdownModel.prototype.updateCssClasses = function (res, css) {
51765
+ _super.prototype.updateCssClasses.call(this, res, css);
51766
+ if (this.useDropdownList) {
51767
+ updateListCssValues(res, css);
51768
+ }
51769
+ };
51770
+ QuestionDropdownModel.prototype.calcCssClasses = function (css) {
51771
+ var classes = _super.prototype.calcCssClasses.call(this, css);
51772
+ if (this.dropdownListModelValue) {
51773
+ this.dropdownListModel.updateCssClasses(classes.popup, classes.list);
51774
+ }
51775
+ return classes;
51776
+ };
51647
51777
  Object.defineProperty(QuestionDropdownModel.prototype, "selectedItemLocText", {
51648
51778
  get: function () {
51649
51779
  var item = this.suggestedItem || this.selectedItem;
@@ -51681,9 +51811,14 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
51681
51811
  enumerable: false,
51682
51812
  configurable: true
51683
51813
  });
51814
+ Object.defineProperty(QuestionDropdownModel.prototype, "useDropdownList", {
51815
+ get: function () { return this.renderAs !== "select"; },
51816
+ enumerable: false,
51817
+ configurable: true
51818
+ });
51684
51819
  Object.defineProperty(QuestionDropdownModel.prototype, "dropdownListModel", {
51685
51820
  get: function () {
51686
- if (this.renderAs !== "select" && !this.dropdownListModelValue) {
51821
+ if (this.useDropdownList && !this.dropdownListModelValue) {
51687
51822
  this.dropdownListModelValue = new dropdownListModel_DropdownListModel(this);
51688
51823
  }
51689
51824
  return this.dropdownListModelValue;
@@ -51696,8 +51831,7 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
51696
51831
  });
51697
51832
  Object.defineProperty(QuestionDropdownModel.prototype, "popupModel", {
51698
51833
  get: function () {
51699
- var _a;
51700
- return (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.popupModel;
51834
+ return this.dropdownListModel.popupModel;
51701
51835
  },
51702
51836
  enumerable: false,
51703
51837
  configurable: true
@@ -51707,7 +51841,7 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
51707
51841
  };
51708
51842
  QuestionDropdownModel.prototype.onSelectedItemValuesChangedHandler = function (newValue) {
51709
51843
  var _a;
51710
- (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.setInputStringFromSelectedItem(newValue);
51844
+ (_a = this.dropdownListModelValue) === null || _a === void 0 ? void 0 : _a.setInputStringFromSelectedItem(newValue);
51711
51845
  _super.prototype.onSelectedItemValuesChangedHandler.call(this, newValue);
51712
51846
  };
51713
51847
  QuestionDropdownModel.prototype.hasUnknownValue = function (val, includeOther, isFilteredChoices, checkEmptyValue) {
@@ -51733,7 +51867,7 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
51733
51867
  };
51734
51868
  QuestionDropdownModel.prototype.onVisibleChoicesChanged = function () {
51735
51869
  _super.prototype.onVisibleChoicesChanged.call(this);
51736
- if (!this.isLoadingFromJson && this.popupModel) {
51870
+ if (!!this.dropdownListModelValue) {
51737
51871
  this.dropdownListModel.updateItems();
51738
51872
  }
51739
51873
  };
@@ -51747,7 +51881,7 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
51747
51881
  var _a;
51748
51882
  _super.prototype.clearValue.call(this, keepComment);
51749
51883
  this.lastSelectedItemValue = null;
51750
- (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.clear();
51884
+ (_a = this.dropdownListModelValue) === null || _a === void 0 ? void 0 : _a.clear();
51751
51885
  };
51752
51886
  QuestionDropdownModel.prototype.afterRenderCore = function (el) {
51753
51887
  _super.prototype.afterRenderCore.call(this, el);
@@ -51768,19 +51902,18 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
51768
51902
  };
51769
51903
  QuestionDropdownModel.prototype.supportEmptyValidation = function () { return true; };
51770
51904
  QuestionDropdownModel.prototype.onBlurCore = function (event) {
51771
- var _a;
51772
- (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onBlur(event);
51905
+ this.dropdownListModel.onBlur(event);
51773
51906
  _super.prototype.onBlurCore.call(this, event);
51774
51907
  };
51775
51908
  QuestionDropdownModel.prototype.onFocusCore = function (event) {
51776
- var _a;
51777
- (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onFocus(event);
51909
+ this.dropdownListModel.onFocus(event);
51778
51910
  _super.prototype.onFocusCore.call(this, event);
51779
51911
  };
51780
51912
  QuestionDropdownModel.prototype.dispose = function () {
51781
51913
  _super.prototype.dispose.call(this);
51782
51914
  if (!!this.dropdownListModelValue) {
51783
51915
  this.dropdownListModelValue.dispose();
51916
+ this.dropdownListModelValue = undefined;
51784
51917
  }
51785
51918
  };
51786
51919
  question_dropdown_decorate([
@@ -51789,7 +51922,7 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
51789
51922
  question_dropdown_decorate([
51790
51923
  jsonobject_property({
51791
51924
  onSet: function (newValue, target) {
51792
- if (!!target.dropdownListModel) {
51925
+ if (!!target.dropdownListModelValue) {
51793
51926
  target.dropdownListModel.setSearchEnabled(newValue);
51794
51927
  }
51795
51928
  }
@@ -51810,7 +51943,7 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
51810
51943
  question_dropdown_decorate([
51811
51944
  jsonobject_property({
51812
51945
  onSet: function (newValue, target) {
51813
- if (!!target.dropdownListModel) {
51946
+ if (!!target.dropdownListModelValue) {
51814
51947
  target.dropdownListModel.setChoicesLazyLoadEnabled(newValue);
51815
51948
  }
51816
51949
  }
@@ -52904,37 +53037,26 @@ var question_textbase_QuestionTextBase = /** @class */ (function (_super) {
52904
53037
  };
52905
53038
  Object.defineProperty(QuestionTextBase.prototype, "renderedPlaceholder", {
52906
53039
  get: function () {
52907
- return this.getPropertyValue("renderedPlaceholder");
53040
+ var _this = this;
53041
+ var func = function () {
53042
+ return _this.hasPlaceholder() ? _this.placeHolder : undefined;
53043
+ };
53044
+ return this.getPropertyValue("renderedPlaceholder", undefined, func);
52908
53045
  },
52909
53046
  enumerable: false,
52910
53047
  configurable: true
52911
53048
  });
52912
- QuestionTextBase.prototype.setRenderedPlaceholder = function (val) {
52913
- this.setPropertyValue("renderedPlaceholder", val);
52914
- };
52915
53049
  QuestionTextBase.prototype.onReadOnlyChanged = function () {
52916
53050
  _super.prototype.onReadOnlyChanged.call(this);
52917
- this.calcRenderedPlaceholder();
52918
- };
52919
- QuestionTextBase.prototype.onSurveyLoad = function () {
52920
- this.calcRenderedPlaceholder();
52921
- _super.prototype.onSurveyLoad.call(this);
53051
+ this.resetRenderedPlaceholder();
52922
53052
  };
52923
53053
  QuestionTextBase.prototype.localeChanged = function () {
52924
53054
  _super.prototype.localeChanged.call(this);
52925
- this.calcRenderedPlaceholder();
52926
- };
52927
- QuestionTextBase.prototype.setSurveyImpl = function (value, isLight) {
52928
- _super.prototype.setSurveyImpl.call(this, value, isLight);
52929
- this.calcRenderedPlaceholder();
53055
+ this.resetRenderedPlaceholder();
52930
53056
  };
52931
53057
  QuestionTextBase.prototype.supportEmptyValidation = function () { return true; };
52932
- QuestionTextBase.prototype.calcRenderedPlaceholder = function () {
52933
- var res = this.placeHolder;
52934
- if (!!res && !this.hasPlaceholder()) {
52935
- res = undefined;
52936
- }
52937
- this.setRenderedPlaceholder(res);
53058
+ QuestionTextBase.prototype.resetRenderedPlaceholder = function () {
53059
+ this.resetPropertyValue("renderedPlaceholder");
52938
53060
  };
52939
53061
  QuestionTextBase.prototype.hasPlaceholder = function () {
52940
53062
  return !this.isReadOnly;
@@ -52974,7 +53096,7 @@ var question_textbase_QuestionTextBase = /** @class */ (function (_super) {
52974
53096
  configurable: true
52975
53097
  });
52976
53098
  question_textbase_decorate([
52977
- jsonobject_property({ localizable: true, onSet: function (val, target) { return target.calcRenderedPlaceholder(); } })
53099
+ jsonobject_property({ localizable: true, onSet: function (val, target) { return target.resetRenderedPlaceholder(); } })
52978
53100
  ], QuestionTextBase.prototype, "placeholder", void 0);
52979
53101
  return QuestionTextBase;
52980
53102
  }(question_Question));
@@ -53181,7 +53303,7 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
53181
53303
  });
53182
53304
  _this.registerPropertyChangedHandlers(["inputType", "size"], function () {
53183
53305
  _this.updateInputSize();
53184
- _this.calcRenderedPlaceholder();
53306
+ _this.resetRenderedPlaceholder();
53185
53307
  });
53186
53308
  return _this;
53187
53309
  }
@@ -56594,7 +56716,6 @@ var dropdownMultiSelectListModel_DropdownMultiSelectListModel = /** @class */ (f
56594
56716
  dropdownMultiSelectListModel_extends(DropdownMultiSelectListModel, _super);
56595
56717
  function DropdownMultiSelectListModel(question, onSelectionChanged) {
56596
56718
  var _this = _super.call(this, question, onSelectionChanged) || this;
56597
- _this.popupCssClasses = "sv-multi-select-list";
56598
56719
  _this.setHideSelectedItems(question.hideSelectedItems);
56599
56720
  _this.syncFilterStringPlaceholder();
56600
56721
  _this.closeOnSelect = question.closeOnSelect;
@@ -56628,6 +56749,7 @@ var dropdownMultiSelectListModel_DropdownMultiSelectListModel = /** @class */ (f
56628
56749
  return _super.prototype.getFocusFirstInputSelector.call(this);
56629
56750
  }
56630
56751
  };
56752
+ DropdownMultiSelectListModel.prototype.getPopupCssClasses = function () { return "sv-multi-select-list"; };
56631
56753
  DropdownMultiSelectListModel.prototype.createListModel = function () {
56632
56754
  var _this = this;
56633
56755
  var visibleItems = this.getAvailableItems();
@@ -56661,7 +56783,6 @@ var dropdownMultiSelectListModel_DropdownMultiSelectListModel = /** @class */ (f
56661
56783
  elementId: this.listElementId
56662
56784
  };
56663
56785
  var res = new multiSelectListModel_MultiSelectListModel(listOptions);
56664
- res.actions.forEach(function (a) { return a.disableTabStop = true; });
56665
56786
  this.setOnTextSearchCallbackForListModel(res);
56666
56787
  res.forceShowFilter = true;
56667
56788
  return res;
@@ -56826,6 +56947,7 @@ var question_tagbox_decorate = (undefined && undefined.__decorate) || function (
56826
56947
 
56827
56948
 
56828
56949
 
56950
+
56829
56951
  /**
56830
56952
  * A class that describes the Multi-Select Dropdown (Tag Box) question type.
56831
56953
  *
@@ -56837,6 +56959,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
56837
56959
  var _this = _super.call(this, name) || this;
56838
56960
  _this.itemDisplayNameMap = {};
56839
56961
  _this.onOpened = _this.addEvent();
56962
+ _this.ariaExpanded = "false";
56840
56963
  _this.createLocalizableString("placeholder", _this, false, true);
56841
56964
  _this.createLocalizableString("clearCaption", _this, false, true);
56842
56965
  _this.createLocalizableString("readOnlyText", _this, true);
@@ -56851,7 +56974,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
56851
56974
  var _a;
56852
56975
  _super.prototype.locStrsChanged.call(this);
56853
56976
  this.updateReadOnlyText();
56854
- (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.locStrsChanged();
56977
+ (_a = this.dropdownListModelValue) === null || _a === void 0 ? void 0 : _a.locStrsChanged();
56855
56978
  };
56856
56979
  QuestionTagboxModel.prototype.updateReadOnlyText = function () {
56857
56980
  this.readOnlyText = this.displayValue || this.placeholder;
@@ -56859,19 +56982,19 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
56859
56982
  QuestionTagboxModel.prototype.getDefaultItemComponent = function () {
56860
56983
  return "";
56861
56984
  };
56862
- QuestionTagboxModel.prototype.onSurveyLoad = function () {
56863
- _super.prototype.onSurveyLoad.call(this);
56864
- this.createDropdownListModel();
56865
- };
56866
- QuestionTagboxModel.prototype.onSetData = function () {
56867
- _super.prototype.onSetData.call(this);
56868
- this.createDropdownListModel();
56869
- };
56870
- QuestionTagboxModel.prototype.createDropdownListModel = function () {
56871
- if (!this.dropdownListModel && !this.isLoadingFromJson) {
56872
- this.dropdownListModel = new dropdownMultiSelectListModel_DropdownMultiSelectListModel(this);
56873
- }
56874
- };
56985
+ Object.defineProperty(QuestionTagboxModel.prototype, "dropdownListModel", {
56986
+ get: function () {
56987
+ if (!this.dropdownListModelValue) {
56988
+ this.dropdownListModelValue = new dropdownMultiSelectListModel_DropdownMultiSelectListModel(this);
56989
+ }
56990
+ return this.dropdownListModelValue;
56991
+ },
56992
+ set: function (val) {
56993
+ this.dropdownListModelValue = val;
56994
+ },
56995
+ enumerable: false,
56996
+ configurable: true
56997
+ });
56875
56998
  Object.defineProperty(QuestionTagboxModel.prototype, "placeholder", {
56876
56999
  /**
56877
57000
  * A text displayed in the input field when it doesn't have a value.
@@ -56938,8 +57061,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
56938
57061
  });
56939
57062
  Object.defineProperty(QuestionTagboxModel.prototype, "popupModel", {
56940
57063
  get: function () {
56941
- var _a;
56942
- return (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.popupModel;
57064
+ return this.dropdownListModel.popupModel;
56943
57065
  },
56944
57066
  enumerable: false,
56945
57067
  configurable: true
@@ -56955,6 +57077,17 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
56955
57077
  .append(this.cssClasses.controlPreview, this.isPreviewStyle)
56956
57078
  .toString();
56957
57079
  };
57080
+ QuestionTagboxModel.prototype.updateCssClasses = function (res, css) {
57081
+ _super.prototype.updateCssClasses.call(this, res, css);
57082
+ updateListCssValues(res, css);
57083
+ };
57084
+ QuestionTagboxModel.prototype.calcCssClasses = function (css) {
57085
+ var classes = _super.prototype.calcCssClasses.call(this, css);
57086
+ if (this.dropdownListModelValue) {
57087
+ this.dropdownListModel.updateCssClasses(classes.popup, classes.list);
57088
+ }
57089
+ return classes;
57090
+ };
56958
57091
  QuestionTagboxModel.prototype.onOpenedCallBack = function () {
56959
57092
  this.onOpened.fire(this, { question: this, choices: this.choices });
56960
57093
  };
@@ -56975,7 +57108,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
56975
57108
  };
56976
57109
  QuestionTagboxModel.prototype.onVisibleChoicesChanged = function () {
56977
57110
  _super.prototype.onVisibleChoicesChanged.call(this);
56978
- if (this.popupModel) {
57111
+ if (!!this.dropdownListModelValue) {
56979
57112
  this.dropdownListModel.updateItems();
56980
57113
  }
56981
57114
  };
@@ -57023,13 +57156,11 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
57023
57156
  };
57024
57157
  QuestionTagboxModel.prototype.supportEmptyValidation = function () { return true; };
57025
57158
  QuestionTagboxModel.prototype.onBlurCore = function (event) {
57026
- var _a;
57027
- (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onBlur(event);
57159
+ this.dropdownListModel.onBlur(event);
57028
57160
  _super.prototype.onBlurCore.call(this, event);
57029
57161
  };
57030
57162
  QuestionTagboxModel.prototype.onFocusCore = function (event) {
57031
- var _a;
57032
- (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onFocus(event);
57163
+ this.dropdownListModel.onFocus(event);
57033
57164
  _super.prototype.onFocusCore.call(this, event);
57034
57165
  };
57035
57166
  QuestionTagboxModel.prototype.allElementsSelected = function () {
@@ -57042,14 +57173,15 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
57042
57173
  };
57043
57174
  QuestionTagboxModel.prototype.dispose = function () {
57044
57175
  _super.prototype.dispose.call(this);
57045
- if (!!this.dropdownListModel) {
57046
- this.dropdownListModel.dispose();
57176
+ if (!!this.dropdownListModelValue) {
57177
+ this.dropdownListModelValue.dispose();
57178
+ this.dropdownListModelValue = undefined;
57047
57179
  }
57048
57180
  };
57049
57181
  QuestionTagboxModel.prototype.clearValue = function (keepComment) {
57050
57182
  var _a;
57051
57183
  _super.prototype.clearValue.call(this, keepComment);
57052
- (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.clear();
57184
+ (_a = this.dropdownListModelValue) === null || _a === void 0 ? void 0 : _a.clear();
57053
57185
  };
57054
57186
  Object.defineProperty(QuestionTagboxModel.prototype, "showClearButton", {
57055
57187
  get: function () {
@@ -57075,7 +57207,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
57075
57207
  question_tagbox_decorate([
57076
57208
  jsonobject_property({
57077
57209
  onSet: function (newValue, target) {
57078
- if (!!target.dropdownListModel) {
57210
+ if (!!target.dropdownListModelValue) {
57079
57211
  target.dropdownListModel.setSearchEnabled(newValue);
57080
57212
  }
57081
57213
  }
@@ -57084,7 +57216,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
57084
57216
  question_tagbox_decorate([
57085
57217
  jsonobject_property({
57086
57218
  onSet: function (newValue, target) {
57087
- if (!!target.dropdownListModel) {
57219
+ if (!!target.dropdownListModelValue) {
57088
57220
  target.dropdownListModel.setHideSelectedItems(newValue);
57089
57221
  }
57090
57222
  }
@@ -57093,7 +57225,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
57093
57225
  question_tagbox_decorate([
57094
57226
  jsonobject_property({
57095
57227
  onSet: function (newValue, target) {
57096
- if (!!target.dropdownListModel) {
57228
+ if (!!target.dropdownListModelValue) {
57097
57229
  target.dropdownListModel.setChoicesLazyLoadEnabled(newValue);
57098
57230
  }
57099
57231
  }
@@ -58463,10 +58595,18 @@ var question_comment_extends = (undefined && undefined.__extends) || (function (
58463
58595
  var question_comment_QuestionCommentModel = /** @class */ (function (_super) {
58464
58596
  question_comment_extends(QuestionCommentModel, _super);
58465
58597
  function QuestionCommentModel(name) {
58466
- var _this_1 = _super.call(this, name) || this;
58467
- _this_1.textAreaModel = new text_area_TextAreaModel(_this_1.getTextAreaOptions());
58468
- return _this_1;
58598
+ return _super.call(this, name) || this;
58469
58599
  }
58600
+ Object.defineProperty(QuestionCommentModel.prototype, "textAreaModel", {
58601
+ get: function () {
58602
+ if (!this.textAreaModelValue) {
58603
+ this.textAreaModelValue = new text_area_TextAreaModel(this.getTextAreaOptions());
58604
+ }
58605
+ return this.textAreaModelValue;
58606
+ },
58607
+ enumerable: false,
58608
+ configurable: true
58609
+ });
58470
58610
  QuestionCommentModel.prototype.getTextAreaOptions = function () {
58471
58611
  var _this_1 = this;
58472
58612
  var _this = this;
@@ -58636,6 +58776,12 @@ var question_comment_QuestionCommentModel = /** @class */ (function (_super) {
58636
58776
  _super.prototype.setNewValue.call(this, newValue);
58637
58777
  };
58638
58778
  QuestionCommentModel.prototype.getValueSeparator = function () { return "\n"; };
58779
+ QuestionCommentModel.prototype.notifyStateChanged = function (prevState) {
58780
+ _super.prototype.notifyStateChanged.call(this, prevState);
58781
+ if (!this.isCollapsed) {
58782
+ this.textAreaModel.updateElement();
58783
+ }
58784
+ };
58639
58785
  Object.defineProperty(QuestionCommentModel.prototype, "className", {
58640
58786
  get: function () {
58641
58787
  return (this.cssClasses ? this.getControlClass() : "panel-comment-root") || undefined;
@@ -59673,7 +59819,7 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
59673
59819
  };
59674
59820
  QuestionFileModel.prototype.updateCurrentMode = function () {
59675
59821
  var _this = this;
59676
- if (!this.isDesignMode) {
59822
+ if (!this.isDesignMode && this.survey) {
59677
59823
  if (this.sourceType !== "file") {
59678
59824
  this.camera.hasCamera(function (res) {
59679
59825
  _this.setPropertyValue("currentMode", res && _this.isDefaultV2Theme ? _this.sourceType : "file");
@@ -59888,9 +60034,12 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
59888
60034
  };
59889
60035
  QuestionFileModel.prototype.loadPreview = function (newValue) {
59890
60036
  var _this = this;
60037
+ if (this.showPreview && this.prevLoadedPreviewValue === newValue)
60038
+ return;
59891
60039
  this.previewValue.splice(0, this.previewValue.length);
59892
60040
  if (!this.showPreview || !newValue)
59893
60041
  return;
60042
+ this.prevLoadedPreviewValue = newValue;
59894
60043
  var newValues = Array.isArray(newValue)
59895
60044
  ? newValue
59896
60045
  : !!newValue
@@ -60554,7 +60703,7 @@ var question_radiogroup_QuestionRadiogroupModel = /** @class */ (function (_supe
60554
60703
  var actions = [];
60555
60704
  if (this.isDefaultV2Theme && !this.isDesignMode) {
60556
60705
  var clearAction = new action_Action({
60557
- title: this.clearButtonCaption,
60706
+ locTitleName: "clearCaption",
60558
60707
  id: "sv-clr-btn-" + this.id,
60559
60708
  action: function () { _this.clearValue(true); },
60560
60709
  innerCss: this.cssClasses.clearButton,
@@ -61516,7 +61665,8 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
61516
61665
  };
61517
61666
  QuestionRatingModel.prototype.onBeforeSetCompactRenderer = function () {
61518
61667
  if (!this.dropdownListModelValue) {
61519
- this.dropdownListModel = new dropdownListModel_DropdownListModel(this);
61668
+ this.dropdownListModelValue = new dropdownListModel_DropdownListModel(this);
61669
+ this.ariaExpanded = "false";
61520
61670
  }
61521
61671
  };
61522
61672
  QuestionRatingModel.prototype.getCompactRenderAs = function () {
@@ -61534,6 +61684,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
61534
61684
  },
61535
61685
  set: function (val) {
61536
61686
  this.dropdownListModelValue = val;
61687
+ this.ariaExpanded = !!val ? "false" : undefined;
61537
61688
  this.updateElementCss();
61538
61689
  },
61539
61690
  enumerable: false,
@@ -61546,17 +61697,12 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
61546
61697
  };
61547
61698
  QuestionRatingModel.prototype.updateCssClasses = function (res, css) {
61548
61699
  _super.prototype.updateCssClasses.call(this, res, css);
61549
- if (!!this.dropdownListModel) {
61550
- var listCssClasses = {};
61551
- mergeValues(css.list, listCssClasses);
61552
- mergeValues(res.list, listCssClasses);
61553
- res["list"] = listCssClasses;
61554
- }
61700
+ updateListCssValues(res, css);
61555
61701
  };
61556
61702
  QuestionRatingModel.prototype.calcCssClasses = function (css) {
61557
61703
  var classes = _super.prototype.calcCssClasses.call(this, css);
61558
- if (this.dropdownListModel) {
61559
- this.dropdownListModel.updateCssClasses(classes.popup, classes.list);
61704
+ if (this.dropdownListModelValue) {
61705
+ this.dropdownListModelValue.updateCssClasses(classes.popup, classes.list);
61560
61706
  }
61561
61707
  return classes;
61562
61708
  };
@@ -61576,6 +61722,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
61576
61722
  _super.prototype.dispose.call(this);
61577
61723
  if (!!this.dropdownListModelValue) {
61578
61724
  this.dropdownListModelValue.dispose();
61725
+ this.dropdownListModelValue = undefined;
61579
61726
  }
61580
61727
  };
61581
61728
  QuestionRatingModel.colorsCalculated = false;
@@ -64801,7 +64948,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
64801
64948
  /**
64802
64949
  * A placeholder for tab titles that applies when the [`templateTabTitle`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#templateTabTitle) expression doesn't produce a meaningful value.
64803
64950
  *
64804
- * Default value: `"New Panel"` (taken from a [localization dictionary](https://github.com/surveyjs/survey-library/tree/master/src/localization))
64951
+ * Default value: `"New Panel"` (taken from a [localization dictionary](https://github.com/surveyjs/survey-library/tree/01bd8abd0c574719956d4d579d48c8010cd389d4/packages/survey-core/src/localization))
64805
64952
  */
64806
64953
  get: function () {
64807
64954
  return this.locTabTitlePlaceholder.text;
@@ -65229,7 +65376,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
65229
65376
  /**
65230
65377
  * An error message displayed when users enter a duplicate value into a question that accepts only unique values (`isUnique` is set to `true` or `keyName` is specified).
65231
65378
  *
65232
- * A default value for this property is taken from a [localization dictionary](https://github.com/surveyjs/survey-library/tree/master/src/localization). Refer to the following help topic for more information: [Localization & Globalization](https://surveyjs.io/form-library/documentation/localization).
65379
+ * A default value for this property is taken from a [localization dictionary](https://github.com/surveyjs/survey-library/tree/01bd8abd0c574719956d4d579d48c8010cd389d4/packages/survey-core/src/localization). Refer to the following help topic for more information: [Localization & Globalization](https://surveyjs.io/form-library/documentation/localization).
65233
65380
  * @see keyName
65234
65381
  */
65235
65382
  get: function () {
@@ -66434,8 +66581,8 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
66434
66581
  enumerable: false,
66435
66582
  configurable: true
66436
66583
  });
66437
- QuestionPanelDynamicModel.prototype.onFirstRendering = function () {
66438
- _super.prototype.onFirstRendering.call(this);
66584
+ QuestionPanelDynamicModel.prototype.onFirstRenderingCore = function () {
66585
+ _super.prototype.onFirstRenderingCore.call(this);
66439
66586
  this.buildPanelsFirstTime();
66440
66587
  this.template.onFirstRendering();
66441
66588
  for (var i = 0; i < this.panelsCore.length; i++) {
@@ -66452,10 +66599,10 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
66452
66599
  _super.prototype.runCondition.call(this, values, properties);
66453
66600
  this.runPanelsCondition(this.panelsCore, values, properties);
66454
66601
  };
66455
- QuestionPanelDynamicModel.prototype.runTriggers = function (name, value) {
66456
- _super.prototype.runTriggers.call(this, name, value);
66602
+ QuestionPanelDynamicModel.prototype.runTriggers = function (name, value, keys) {
66603
+ _super.prototype.runTriggers.call(this, name, value, keys);
66457
66604
  this.visiblePanelsCore.forEach(function (p) {
66458
- p.questions.forEach(function (q) { return q.runTriggers(name, value); });
66605
+ p.questions.forEach(function (q) { return q.runTriggers(name, value, keys); });
66459
66606
  });
66460
66607
  };
66461
66608
  QuestionPanelDynamicModel.prototype.reRunCondition = function () {
@@ -66722,12 +66869,14 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
66722
66869
  if (!this.isDesignMode && !this.isReadOnly && !this.isValueEmpty(panel.getValue())) {
66723
66870
  this.runPanelsCondition([panel], this.getDataFilteredValues(), this.getDataFilteredProperties());
66724
66871
  }
66725
- panel.onFirstRendering();
66726
66872
  var questions = panel.questions;
66727
66873
  for (var i = 0; i < questions.length; i++) {
66728
66874
  questions[i].setParentQuestion(this);
66729
66875
  }
66730
- panel.locStrsChanged();
66876
+ if (this.wasRendered) {
66877
+ panel.onFirstRendering();
66878
+ panel.locStrsChanged();
66879
+ }
66731
66880
  panel.onGetFooterActionsCallback = function () {
66732
66881
  return _this.getPanelActions(panel);
66733
66882
  };
@@ -66823,7 +66972,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
66823
66972
  };
66824
66973
  QuestionPanelDynamicModel.prototype.onSetData = function () {
66825
66974
  _super.prototype.onSetData.call(this);
66826
- if (this.useTemplatePanel) {
66975
+ if (!this.isLoadingFromJson && this.useTemplatePanel) {
66827
66976
  this.setTemplatePanelSurveyImpl();
66828
66977
  this.rebuildPanels();
66829
66978
  }
@@ -68901,7 +69050,7 @@ var mask_base_InputMaskBase = /** @class */ (function (_super) {
68901
69050
  var properties = Serializer.getProperties(this.getType());
68902
69051
  properties.forEach(function (property) {
68903
69052
  var currentValue = json[property.name];
68904
- _this[property.name] = currentValue !== undefined ? currentValue : property.defaultValue;
69053
+ _this[property.name] = currentValue !== undefined ? currentValue : property.getDefaultValue(_this);
68905
69054
  });
68906
69055
  };
68907
69056
  InputMaskBase.prototype.getData = function () {
@@ -70282,8 +70431,8 @@ Serializer.addClass("currencymask", [
70282
70431
 
70283
70432
  var Version;
70284
70433
  var ReleaseDate;
70285
- Version = "" + "1.12.12";
70286
- ReleaseDate = "" + "2024-11-26";
70434
+ Version = "" + "1.12.14";
70435
+ ReleaseDate = "" + "2024-12-09";
70287
70436
  function checkLibraryVersion(ver, libraryName) {
70288
70437
  if (Version != ver) {
70289
70438
  var str = "survey-core has version '" + Version + "' and " + libraryName