survey-core 1.9.122 → 1.9.123

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 (364) hide show
  1. package/README.md +1 -1
  2. package/defaultV2.css +71 -26
  3. package/defaultV2.css.map +1 -1
  4. package/defaultV2.fontless.css +71 -26
  5. package/defaultV2.fontless.css.map +1 -1
  6. package/defaultV2.fontless.min.css +2 -2
  7. package/defaultV2.min.css +2 -2
  8. package/i18n/arabic.js +1 -1
  9. package/i18n/arabic.min.js +1 -1
  10. package/i18n/basque.js +1 -1
  11. package/i18n/basque.min.js +1 -1
  12. package/i18n/bulgarian.js +1 -1
  13. package/i18n/bulgarian.min.js +1 -1
  14. package/i18n/catalan.js +1 -1
  15. package/i18n/catalan.min.js +1 -1
  16. package/i18n/croatian.js +1 -1
  17. package/i18n/croatian.min.js +1 -1
  18. package/i18n/czech.js +1 -1
  19. package/i18n/czech.min.js +1 -1
  20. package/i18n/danish.js +1 -1
  21. package/i18n/danish.min.js +1 -1
  22. package/i18n/dutch.js +1 -1
  23. package/i18n/dutch.min.js +1 -1
  24. package/i18n/english.js +1 -1
  25. package/i18n/english.min.js +1 -1
  26. package/i18n/estonian.js +1 -1
  27. package/i18n/estonian.min.js +1 -1
  28. package/i18n/finnish.js +1 -1
  29. package/i18n/finnish.min.js +1 -1
  30. package/i18n/french.js +1 -1
  31. package/i18n/french.min.js +1 -1
  32. package/i18n/georgian.js +1 -1
  33. package/i18n/georgian.min.js +1 -1
  34. package/i18n/german.js +1 -1
  35. package/i18n/german.min.js +1 -1
  36. package/i18n/greek.js +1 -1
  37. package/i18n/greek.min.js +1 -1
  38. package/i18n/hebrew.js +1 -1
  39. package/i18n/hebrew.min.js +1 -1
  40. package/i18n/hindi.js +1 -1
  41. package/i18n/hindi.min.js +1 -1
  42. package/i18n/hungarian.js +1 -1
  43. package/i18n/hungarian.min.js +1 -1
  44. package/i18n/icelandic.js +1 -1
  45. package/i18n/icelandic.min.js +1 -1
  46. package/i18n/index.js +1 -1
  47. package/i18n/index.min.js +1 -1
  48. package/i18n/indonesian.js +1 -1
  49. package/i18n/indonesian.min.js +1 -1
  50. package/i18n/italian.js +1 -1
  51. package/i18n/italian.min.js +1 -1
  52. package/i18n/japanese.js +1 -1
  53. package/i18n/japanese.min.js +1 -1
  54. package/i18n/kazakh.js +1 -1
  55. package/i18n/kazakh.min.js +1 -1
  56. package/i18n/korean.js +1 -1
  57. package/i18n/korean.min.js +1 -1
  58. package/i18n/latvian.js +1 -1
  59. package/i18n/latvian.min.js +1 -1
  60. package/i18n/lithuanian.js +1 -1
  61. package/i18n/lithuanian.min.js +1 -1
  62. package/i18n/macedonian.js +1 -1
  63. package/i18n/macedonian.min.js +1 -1
  64. package/i18n/malay.js +1 -1
  65. package/i18n/malay.min.js +1 -1
  66. package/i18n/nl-BE.js +1 -1
  67. package/i18n/nl-BE.min.js +1 -1
  68. package/i18n/norwegian.js +1 -1
  69. package/i18n/norwegian.min.js +1 -1
  70. package/i18n/persian.js +1 -1
  71. package/i18n/persian.min.js +1 -1
  72. package/i18n/polish.js +1 -1
  73. package/i18n/polish.min.js +1 -1
  74. package/i18n/portuguese-br.js +1 -1
  75. package/i18n/portuguese-br.min.js +1 -1
  76. package/i18n/portuguese.js +1 -1
  77. package/i18n/portuguese.min.js +1 -1
  78. package/i18n/romanian.js +1 -1
  79. package/i18n/romanian.min.js +1 -1
  80. package/i18n/russian.js +1 -1
  81. package/i18n/russian.min.js +1 -1
  82. package/i18n/serbian.js +1 -1
  83. package/i18n/serbian.min.js +1 -1
  84. package/i18n/simplified-chinese.js +1 -1
  85. package/i18n/simplified-chinese.min.js +1 -1
  86. package/i18n/slovak.js +1 -1
  87. package/i18n/slovak.min.js +1 -1
  88. package/i18n/spanish.js +1 -1
  89. package/i18n/spanish.min.js +1 -1
  90. package/i18n/swahili.js +1 -1
  91. package/i18n/swahili.min.js +1 -1
  92. package/i18n/swedish.js +1 -1
  93. package/i18n/swedish.min.js +1 -1
  94. package/i18n/tajik.js +1 -1
  95. package/i18n/tajik.min.js +1 -1
  96. package/i18n/telugu.js +1 -1
  97. package/i18n/telugu.min.js +1 -1
  98. package/i18n/thai.js +1 -1
  99. package/i18n/thai.min.js +1 -1
  100. package/i18n/traditional-chinese.js +1 -1
  101. package/i18n/traditional-chinese.min.js +1 -1
  102. package/i18n/turkish.js +1 -1
  103. package/i18n/turkish.min.js +1 -1
  104. package/i18n/ukrainian.js +1 -1
  105. package/i18n/ukrainian.min.js +1 -1
  106. package/i18n/urdu.js +1 -1
  107. package/i18n/urdu.min.js +1 -1
  108. package/i18n/vietnamese.js +1 -1
  109. package/i18n/vietnamese.min.js +1 -1
  110. package/i18n/welsh.js +1 -1
  111. package/i18n/welsh.min.js +1 -1
  112. package/modern.css +1 -8
  113. package/modern.css.map +1 -1
  114. package/modern.fontless.css +1 -8
  115. package/modern.fontless.css.map +1 -1
  116. package/modern.fontless.min.css +2 -2
  117. package/modern.min.css +2 -2
  118. package/package.json +1 -1
  119. package/plugins/bootstrap-integration.js +1 -1
  120. package/plugins/bootstrap-integration.min.js +1 -1
  121. package/plugins/bootstrap-material-integration.js +1 -1
  122. package/plugins/bootstrap-material-integration.min.js +1 -1
  123. package/survey.core.js +216 -162
  124. package/survey.core.js.map +1 -1
  125. package/survey.core.min.js +3 -3
  126. package/survey.css +1 -1
  127. package/survey.css.map +1 -1
  128. package/survey.i18n.js +1 -1
  129. package/survey.i18n.min.js +1 -1
  130. package/survey.min.css +1 -1
  131. package/themes/borderless-dark-panelless.js +2 -1
  132. package/themes/borderless-dark-panelless.js.map +1 -1
  133. package/themes/borderless-dark-panelless.min.js +2 -2
  134. package/themes/borderless-dark.js +2 -1
  135. package/themes/borderless-dark.js.map +1 -1
  136. package/themes/borderless-dark.min.js +2 -2
  137. package/themes/borderless-light-panelless..js +2 -1
  138. package/themes/borderless-light-panelless..js.map +1 -1
  139. package/themes/borderless-light-panelless..min.js +2 -2
  140. package/themes/borderless-light.js +2 -1
  141. package/themes/borderless-light.js.map +1 -1
  142. package/themes/borderless-light.min.js +2 -2
  143. package/themes/contrast-dark-panelless.js +2 -1
  144. package/themes/contrast-dark-panelless.js.map +1 -1
  145. package/themes/contrast-dark-panelless.min.js +2 -2
  146. package/themes/contrast-dark.js +2 -1
  147. package/themes/contrast-dark.js.map +1 -1
  148. package/themes/contrast-dark.min.js +2 -2
  149. package/themes/contrast-light-panelless.js +2 -1
  150. package/themes/contrast-light-panelless.js.map +1 -1
  151. package/themes/contrast-light-panelless.min.js +2 -2
  152. package/themes/contrast-light.js +2 -1
  153. package/themes/contrast-light.js.map +1 -1
  154. package/themes/contrast-light.min.js +2 -2
  155. package/themes/default-dark-panelless.js +2 -1
  156. package/themes/default-dark-panelless.js.map +1 -1
  157. package/themes/default-dark-panelless.min.js +2 -2
  158. package/themes/default-dark.js +2 -1
  159. package/themes/default-dark.js.map +1 -1
  160. package/themes/default-dark.min.js +2 -2
  161. package/themes/default-light-panelless.js +2 -1
  162. package/themes/default-light-panelless.js.map +1 -1
  163. package/themes/default-light-panelless.min.js +2 -2
  164. package/themes/default-light.js +2 -1
  165. package/themes/default-light.js.map +1 -1
  166. package/themes/default-light.min.js +2 -2
  167. package/themes/doubleborder-dark-panelless.js +2 -1
  168. package/themes/doubleborder-dark-panelless.js.map +1 -1
  169. package/themes/doubleborder-dark-panelless.min.js +2 -2
  170. package/themes/doubleborder-dark.js +2 -1
  171. package/themes/doubleborder-dark.js.map +1 -1
  172. package/themes/doubleborder-dark.min.js +2 -2
  173. package/themes/doubleborder-light-panelles.js +2 -1
  174. package/themes/doubleborder-light-panelles.js.map +1 -1
  175. package/themes/doubleborder-light-panelles.min.js +2 -2
  176. package/themes/doubleborder-light.js +2 -1
  177. package/themes/doubleborder-light.js.map +1 -1
  178. package/themes/doubleborder-light.min.js +2 -2
  179. package/themes/flat-dark-panelless.js +2 -1
  180. package/themes/flat-dark-panelless.js.map +1 -1
  181. package/themes/flat-dark-panelless.min.js +2 -2
  182. package/themes/flat-dark.js +2 -1
  183. package/themes/flat-dark.js.map +1 -1
  184. package/themes/flat-dark.min.js +2 -2
  185. package/themes/flat-light-panelless.js +2 -1
  186. package/themes/flat-light-panelless.js.map +1 -1
  187. package/themes/flat-light-panelless.min.js +2 -2
  188. package/themes/flat-light.js +2 -1
  189. package/themes/flat-light.js.map +1 -1
  190. package/themes/flat-light.min.js +2 -2
  191. package/themes/index.js +41 -1
  192. package/themes/index.js.map +1 -1
  193. package/themes/index.min.js +2 -2
  194. package/themes/layered-dark-panelless.js +2 -1
  195. package/themes/layered-dark-panelless.js.map +1 -1
  196. package/themes/layered-dark-panelless.min.js +2 -2
  197. package/themes/layered-dark.js +2 -1
  198. package/themes/layered-dark.js.map +1 -1
  199. package/themes/layered-dark.min.js +2 -2
  200. package/themes/layered-light-panelless.js +2 -1
  201. package/themes/layered-light-panelless.js.map +1 -1
  202. package/themes/layered-light-panelless.min.js +2 -2
  203. package/themes/layered-light.js +2 -1
  204. package/themes/layered-light.js.map +1 -1
  205. package/themes/layered-light.min.js +2 -2
  206. package/themes/plain-dark-panelless.js +2 -1
  207. package/themes/plain-dark-panelless.js.map +1 -1
  208. package/themes/plain-dark-panelless.min.js +2 -2
  209. package/themes/plain-dark.js +2 -1
  210. package/themes/plain-dark.js.map +1 -1
  211. package/themes/plain-dark.min.js +2 -2
  212. package/themes/plain-light-panelless.js +2 -1
  213. package/themes/plain-light-panelless.js.map +1 -1
  214. package/themes/plain-light-panelless.min.js +2 -2
  215. package/themes/plain-light.js +2 -1
  216. package/themes/plain-light.js.map +1 -1
  217. package/themes/plain-light.min.js +2 -2
  218. package/themes/sharp-dark-panelless.js +2 -1
  219. package/themes/sharp-dark-panelless.js.map +1 -1
  220. package/themes/sharp-dark-panelless.min.js +2 -2
  221. package/themes/sharp-dark.js +2 -1
  222. package/themes/sharp-dark.js.map +1 -1
  223. package/themes/sharp-dark.min.js +2 -2
  224. package/themes/sharp-light-panelless.js +2 -1
  225. package/themes/sharp-light-panelless.js.map +1 -1
  226. package/themes/sharp-light-panelless.min.js +2 -2
  227. package/themes/sharp-light.js +2 -1
  228. package/themes/sharp-light.js.map +1 -1
  229. package/themes/sharp-light.min.js +2 -2
  230. package/themes/solid-dark-panelless.js +2 -1
  231. package/themes/solid-dark-panelless.js.map +1 -1
  232. package/themes/solid-dark-panelless.min.js +2 -2
  233. package/themes/solid-dark.js +2 -1
  234. package/themes/solid-dark.js.map +1 -1
  235. package/themes/solid-dark.min.js +2 -2
  236. package/themes/solid-light-panelless.js +2 -1
  237. package/themes/solid-light-panelless.js.map +1 -1
  238. package/themes/solid-light-panelless.min.js +2 -2
  239. package/themes/solid-light.js +2 -1
  240. package/themes/solid-light.js.map +1 -1
  241. package/themes/solid-light.min.js +2 -2
  242. package/themes/three-dimensional-dark-panelless.js +2 -1
  243. package/themes/three-dimensional-dark-panelless.js.map +1 -1
  244. package/themes/three-dimensional-dark-panelless.min.js +2 -2
  245. package/themes/three-dimensional-dark.js +2 -1
  246. package/themes/three-dimensional-dark.js.map +1 -1
  247. package/themes/three-dimensional-dark.min.js +2 -2
  248. package/themes/three-dimensional-light-panelless.js +2 -1
  249. package/themes/three-dimensional-light-panelless.js.map +1 -1
  250. package/themes/three-dimensional-light-panelless.min.js +2 -2
  251. package/themes/three-dimensional-light.js +2 -1
  252. package/themes/three-dimensional-light.js.map +1 -1
  253. package/themes/three-dimensional-light.min.js +2 -2
  254. package/themes/typings/borderless-dark-panelless.d.ts +2 -0
  255. package/themes/typings/borderless-dark.d.ts +2 -0
  256. package/themes/typings/borderless-light-panelless.d.ts +2 -0
  257. package/themes/typings/borderless-light.d.ts +2 -0
  258. package/themes/typings/contrast-dark-panelless.d.ts +2 -0
  259. package/themes/typings/contrast-dark.d.ts +2 -0
  260. package/themes/typings/contrast-light-panelless.d.ts +2 -0
  261. package/themes/typings/contrast-light.d.ts +2 -0
  262. package/themes/typings/default-dark-panelless.d.ts +2 -0
  263. package/themes/typings/default-dark.d.ts +2 -0
  264. package/themes/typings/default-light-panelless.d.ts +2 -0
  265. package/themes/typings/default-light.d.ts +2 -0
  266. package/themes/typings/doubleborder-dark-panelless.d.ts +2 -0
  267. package/themes/typings/doubleborder-dark.d.ts +2 -0
  268. package/themes/typings/doubleborder-light-panelless.d.ts +2 -0
  269. package/themes/typings/doubleborder-light.d.ts +2 -0
  270. package/themes/typings/flat-dark-panelless.d.ts +2 -0
  271. package/themes/typings/flat-dark.d.ts +2 -0
  272. package/themes/typings/flat-light-panelless.d.ts +2 -0
  273. package/themes/typings/flat-light.d.ts +2 -0
  274. package/themes/typings/index.d.ts +40 -0
  275. package/themes/typings/layered-dark-panelless.d.ts +2 -0
  276. package/themes/typings/layered-dark.d.ts +2 -0
  277. package/themes/typings/layered-light-panelless.d.ts +2 -0
  278. package/themes/typings/layered-light.d.ts +2 -0
  279. package/themes/typings/plain-dark-panelless.d.ts +2 -0
  280. package/themes/typings/plain-dark.d.ts +2 -0
  281. package/themes/typings/plain-light-panelless.d.ts +2 -0
  282. package/themes/typings/plain-light.d.ts +2 -0
  283. package/themes/typings/sharp-dark-panelless.d.ts +2 -0
  284. package/themes/typings/sharp-dark.d.ts +2 -0
  285. package/themes/typings/sharp-light-panelless.d.ts +2 -0
  286. package/themes/typings/sharp-light.d.ts +2 -0
  287. package/themes/typings/solid-dark-panelless.d.ts +2 -0
  288. package/themes/typings/solid-dark.d.ts +2 -0
  289. package/themes/typings/solid-light-panelless.d.ts +2 -0
  290. package/themes/typings/solid-light.d.ts +2 -0
  291. package/themes/typings/threedimensional-dark-panelless.d.ts +2 -0
  292. package/themes/typings/threedimensional-dark.d.ts +2 -0
  293. package/themes/typings/threedimensional-light-panelless.d.ts +2 -0
  294. package/themes/typings/threedimensional-light.d.ts +2 -0
  295. package/ts3.4/themes/typings/borderless-dark-panelless.d.ts +2 -0
  296. package/ts3.4/themes/typings/borderless-dark.d.ts +2 -0
  297. package/ts3.4/themes/typings/borderless-light-panelless.d.ts +2 -0
  298. package/ts3.4/themes/typings/borderless-light.d.ts +2 -0
  299. package/ts3.4/themes/typings/contrast-dark-panelless.d.ts +2 -0
  300. package/ts3.4/themes/typings/contrast-dark.d.ts +2 -0
  301. package/ts3.4/themes/typings/contrast-light-panelless.d.ts +2 -0
  302. package/ts3.4/themes/typings/contrast-light.d.ts +2 -0
  303. package/ts3.4/themes/typings/default-dark-panelless.d.ts +2 -0
  304. package/ts3.4/themes/typings/default-dark.d.ts +2 -0
  305. package/ts3.4/themes/typings/default-light-panelless.d.ts +2 -0
  306. package/ts3.4/themes/typings/default-light.d.ts +2 -0
  307. package/ts3.4/themes/typings/doubleborder-dark-panelless.d.ts +2 -0
  308. package/ts3.4/themes/typings/doubleborder-dark.d.ts +2 -0
  309. package/ts3.4/themes/typings/doubleborder-light-panelless.d.ts +2 -0
  310. package/ts3.4/themes/typings/doubleborder-light.d.ts +2 -0
  311. package/ts3.4/themes/typings/flat-dark-panelless.d.ts +2 -0
  312. package/ts3.4/themes/typings/flat-dark.d.ts +2 -0
  313. package/ts3.4/themes/typings/flat-light-panelless.d.ts +2 -0
  314. package/ts3.4/themes/typings/flat-light.d.ts +2 -0
  315. package/ts3.4/themes/typings/index.d.ts +40 -0
  316. package/ts3.4/themes/typings/layered-dark-panelless.d.ts +2 -0
  317. package/ts3.4/themes/typings/layered-dark.d.ts +2 -0
  318. package/ts3.4/themes/typings/layered-light-panelless.d.ts +2 -0
  319. package/ts3.4/themes/typings/layered-light.d.ts +2 -0
  320. package/ts3.4/themes/typings/plain-dark-panelless.d.ts +2 -0
  321. package/ts3.4/themes/typings/plain-dark.d.ts +2 -0
  322. package/ts3.4/themes/typings/plain-light-panelless.d.ts +2 -0
  323. package/ts3.4/themes/typings/plain-light.d.ts +2 -0
  324. package/ts3.4/themes/typings/sharp-dark-panelless.d.ts +2 -0
  325. package/ts3.4/themes/typings/sharp-dark.d.ts +2 -0
  326. package/ts3.4/themes/typings/sharp-light-panelless.d.ts +2 -0
  327. package/ts3.4/themes/typings/sharp-light.d.ts +2 -0
  328. package/ts3.4/themes/typings/solid-dark-panelless.d.ts +2 -0
  329. package/ts3.4/themes/typings/solid-dark.d.ts +2 -0
  330. package/ts3.4/themes/typings/solid-light-panelless.d.ts +2 -0
  331. package/ts3.4/themes/typings/solid-light.d.ts +2 -0
  332. package/ts3.4/themes/typings/threedimensional-dark-panelless.d.ts +2 -0
  333. package/ts3.4/themes/typings/threedimensional-dark.d.ts +2 -0
  334. package/ts3.4/themes/typings/threedimensional-light-panelless.d.ts +2 -0
  335. package/ts3.4/themes/typings/threedimensional-light.d.ts +2 -0
  336. package/ts3.4/typings/base-interfaces.d.ts +3 -0
  337. package/ts3.4/typings/base.d.ts +4 -2
  338. package/ts3.4/typings/choicesRestful.d.ts +6 -1
  339. package/ts3.4/typings/entries/chunks/model.d.ts +1 -1
  340. package/ts3.4/typings/itemvalue.d.ts +2 -2
  341. package/ts3.4/typings/jsonobject.d.ts +11 -3
  342. package/ts3.4/typings/localizablestring.d.ts +1 -0
  343. package/ts3.4/typings/question.d.ts +1 -0
  344. package/ts3.4/typings/question_baseselect.d.ts +5 -3
  345. package/ts3.4/typings/question_matrixdropdownbase.d.ts +1 -1
  346. package/ts3.4/typings/question_paneldynamic.d.ts +16 -0
  347. package/ts3.4/typings/question_tagbox.d.ts +2 -1
  348. package/ts3.4/typings/settings.d.ts +15 -85
  349. package/ts3.4/typings/survey.d.ts +2 -2
  350. package/typings/base-interfaces.d.ts +3 -0
  351. package/typings/base.d.ts +4 -2
  352. package/typings/choicesRestful.d.ts +10 -2
  353. package/typings/entries/chunks/model.d.ts +1 -1
  354. package/typings/itemvalue.d.ts +2 -2
  355. package/typings/jsonobject.d.ts +11 -3
  356. package/typings/localizablestring.d.ts +1 -0
  357. package/typings/question.d.ts +1 -0
  358. package/typings/question_baseselect.d.ts +5 -3
  359. package/typings/question_matrixdropdownbase.d.ts +1 -1
  360. package/typings/question_paneldynamic.d.ts +17 -0
  361. package/typings/question_tagbox.d.ts +3 -1
  362. package/typings/settings.d.ts +15 -85
  363. package/typings/survey-element.d.ts +2 -1
  364. package/typings/survey.d.ts +2 -2
package/survey.core.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.122
2
+ * surveyjs - Survey JavaScript library v1.9.123
3
3
  * Copyright (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -2029,10 +2029,12 @@ var Base = /** @class */ (function () {
2029
2029
  * The JSON object should contain only serializable properties of this SurveyJS object. Event handlers and properties that do not belong to the SurveyJS object are ignored.
2030
2030
  *
2031
2031
  * @param json A JSON object with properties that you want to apply to the current SurveyJS object.
2032
+ * @param options An object with configuration options.
2033
+ * @param {boolean} options.validatePropertyValues Pass `true` if you want to validate property values. Use the [`jsonErrors`](#jsonErrors) array to access validation errors.
2032
2034
  * @see toJSON
2033
2035
  */
2034
- Base.prototype.fromJSON = function (json) {
2035
- new _jsonobject__WEBPACK_IMPORTED_MODULE_2__["JsonObject"]().toObject(json, this);
2036
+ Base.prototype.fromJSON = function (json, options) {
2037
+ new _jsonobject__WEBPACK_IMPORTED_MODULE_2__["JsonObject"]().toObject(json, this, options);
2036
2038
  this.onSurveyLoad();
2037
2039
  };
2038
2040
  Base.prototype.onSurveyLoad = function () { };
@@ -3135,7 +3137,7 @@ var XmlParser = /** @class */ (function () {
3135
3137
  * }
3136
3138
  * ```
3137
3139
  *
3138
- * Typically, you should assign this object to a question's [`choicesByUrl`](https://surveyjs.io/Documentation/Library?id=QuestionSelectBase#choicesByUrl) property.
3140
+ * Typically, you should assign this object to a question's [`choicesByUrl`](https://surveyjs.io/Documentation/Library?id=QuestionSelectBase#choicesByUrl) property. You can also specify additional application-wide settings using the [`settings.web`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) object.
3139
3141
  */
3140
3142
  var ChoicesRestful = /** @class */ (function (_super) {
3141
3143
  __extends(ChoicesRestful, _super);
@@ -3193,6 +3195,16 @@ var ChoicesRestful = /** @class */ (function (_super) {
3193
3195
  }
3194
3196
  }
3195
3197
  };
3198
+ Object.defineProperty(ChoicesRestful, "onBeforeSendRequest", {
3199
+ get: function () {
3200
+ return _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].web.onBeforeRequestChoices;
3201
+ },
3202
+ set: function (val) {
3203
+ _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].web.onBeforeRequestChoices = val;
3204
+ },
3205
+ enumerable: false,
3206
+ configurable: true
3207
+ });
3196
3208
  ChoicesRestful.getCachedItemsResult = function (obj) {
3197
3209
  var hash = obj.objHash;
3198
3210
  var res = ChoicesRestful.itemsResult[hash];
@@ -3329,8 +3341,8 @@ var ChoicesRestful = /** @class */ (function (_super) {
3329
3341
  }
3330
3342
  };
3331
3343
  var options = { request: xhr };
3332
- if (!!ChoicesRestful.onBeforeSendRequest) {
3333
- ChoicesRestful.onBeforeSendRequest(this, options);
3344
+ if (!!_settings__WEBPACK_IMPORTED_MODULE_4__["settings"].web.onBeforeRequestChoices) {
3345
+ _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].web.onBeforeRequestChoices(this, options);
3334
3346
  }
3335
3347
  this.beforeSendRequest();
3336
3348
  options.request.send();
@@ -3533,6 +3545,11 @@ var ChoicesRestful = /** @class */ (function (_super) {
3533
3545
  configurable: true
3534
3546
  });
3535
3547
  Object.defineProperty(ChoicesRestful.prototype, "allowEmptyResponse", {
3548
+ /**
3549
+ * Specifies whether the service is allowed to return an empty response or an empty array in a response.
3550
+ *
3551
+ * Default value: `false`
3552
+ */
3536
3553
  get: function () {
3537
3554
  return this.getPropertyValue("allowEmptyResponse");
3538
3555
  },
@@ -3767,10 +3784,10 @@ var ChoicesRestfull = /** @class */ (function (_super) {
3767
3784
  };
3768
3785
  Object.defineProperty(ChoicesRestfull, "onBeforeSendRequest", {
3769
3786
  get: function () {
3770
- return ChoicesRestful.onBeforeSendRequest;
3787
+ return _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].web.onBeforeRequestChoices;
3771
3788
  },
3772
3789
  set: function (val) {
3773
- ChoicesRestful.onBeforeSendRequest = val;
3790
+ _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].web.onBeforeRequestChoices = val;
3774
3791
  },
3775
3792
  enumerable: false,
3776
3793
  configurable: true
@@ -9315,8 +9332,8 @@ __webpack_require__.r(__webpack_exports__);
9315
9332
  //import "../../modern.scss";
9316
9333
  var Version;
9317
9334
  var ReleaseDate;
9318
- Version = "" + "1.9.122";
9319
- ReleaseDate = "" + "2023-12-19";
9335
+ Version = "" + "1.9.123";
9336
+ ReleaseDate = "" + "2023-12-26";
9320
9337
  function checkLibraryVersion(ver, libraryName) {
9321
9338
  if (Version != ver) {
9322
9339
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -15756,7 +15773,7 @@ var Helpers = /** @class */ (function () {
15756
15773
  if (x["equals"])
15757
15774
  return x.equals(y);
15758
15775
  if (!!x.toJSON && !!y.toJSON && !!x.getType && !!y.getType) {
15759
- if (x.isDiposed || y.isDiposed)
15776
+ if (x.isDisposed || y.isDisposed)
15760
15777
  return false;
15761
15778
  if (x.getType() !== y.getType())
15762
15779
  return false;
@@ -17164,7 +17181,7 @@ var ItemValue = /** @class */ (function (_super) {
17164
17181
  };
17165
17182
  Object.defineProperty(ItemValue.prototype, "visibleIf", {
17166
17183
  get: function () {
17167
- return this.getPropertyValue("visibleIf", "");
17184
+ return this.getPropertyValueWithoutDefault("visibleIf") || "";
17168
17185
  },
17169
17186
  set: function (val) {
17170
17187
  this.setPropertyValue("visibleIf", val);
@@ -17174,7 +17191,7 @@ var ItemValue = /** @class */ (function (_super) {
17174
17191
  });
17175
17192
  Object.defineProperty(ItemValue.prototype, "enableIf", {
17176
17193
  get: function () {
17177
- return this.getPropertyValue("enableIf", "");
17194
+ return this.getPropertyValueWithoutDefault("enableIf") || "";
17178
17195
  },
17179
17196
  set: function (val) {
17180
17197
  this.setPropertyValue("enableIf", val);
@@ -17184,7 +17201,8 @@ var ItemValue = /** @class */ (function (_super) {
17184
17201
  });
17185
17202
  Object.defineProperty(ItemValue.prototype, "isVisible", {
17186
17203
  get: function () {
17187
- return this.getPropertyValue("isVisible", true);
17204
+ var res = this.getPropertyValueWithoutDefault("isVisible");
17205
+ return res !== undefined ? res : true;
17188
17206
  },
17189
17207
  enumerable: false,
17190
17208
  configurable: true
@@ -17194,7 +17212,8 @@ var ItemValue = /** @class */ (function (_super) {
17194
17212
  };
17195
17213
  Object.defineProperty(ItemValue.prototype, "isEnabled", {
17196
17214
  get: function () {
17197
- return this.getPropertyValue("isEnabled", true);
17215
+ var res = this.getPropertyValueWithoutDefault("isEnabled");
17216
+ return res !== undefined ? res : true;
17198
17217
  },
17199
17218
  enumerable: false,
17200
17219
  configurable: true
@@ -17339,7 +17358,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("itemvalue", [
17339
17358
  /*!***************************!*\
17340
17359
  !*** ./src/jsonobject.ts ***!
17341
17360
  \***************************/
17342
- /*! exports provided: property, propertyArray, JsonObjectProperty, CustomPropertiesCollection, JsonMetadataClass, JsonMetadata, JsonError, JsonUnknownPropertyError, JsonMissingTypeErrorBase, JsonMissingTypeError, JsonIncorrectTypeError, JsonRequiredPropertyError, JsonRequiredArrayPropertyError, JsonObject, Serializer */
17361
+ /*! exports provided: property, propertyArray, JsonObjectProperty, CustomPropertiesCollection, JsonMetadataClass, JsonMetadata, JsonError, JsonUnknownPropertyError, JsonMissingTypeErrorBase, JsonMissingTypeError, JsonIncorrectTypeError, JsonRequiredPropertyError, JsonRequiredArrayPropertyError, JsonIncorrectPropertyValueError, JsonObject, Serializer */
17343
17362
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
17344
17363
 
17345
17364
  "use strict";
@@ -17357,6 +17376,7 @@ __webpack_require__.r(__webpack_exports__);
17357
17376
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonIncorrectTypeError", function() { return JsonIncorrectTypeError; });
17358
17377
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonRequiredPropertyError", function() { return JsonRequiredPropertyError; });
17359
17378
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonRequiredArrayPropertyError", function() { return JsonRequiredArrayPropertyError; });
17379
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonIncorrectPropertyValueError", function() { return JsonIncorrectPropertyValueError; });
17360
17380
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonObject", function() { return JsonObject; });
17361
17381
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Serializer", function() { return Serializer; });
17362
17382
  /* harmony import */ var _surveyStrings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./surveyStrings */ "./src/surveyStrings.ts");
@@ -17693,6 +17713,12 @@ var JsonObjectProperty = /** @class */ (function () {
17693
17713
  }
17694
17714
  }
17695
17715
  };
17716
+ JsonObjectProperty.prototype.validateValue = function (value) {
17717
+ var choices = this.choices;
17718
+ if (!Array.isArray(choices) || choices.length === 0)
17719
+ return true;
17720
+ return choices.indexOf(value) > -1;
17721
+ };
17696
17722
  JsonObjectProperty.prototype.getObjType = function (objType) {
17697
17723
  if (!this.classNamePart)
17698
17724
  return objType;
@@ -18770,8 +18796,8 @@ var JsonMetadata = /** @class */ (function () {
18770
18796
  };
18771
18797
  JsonMetadata.prototype.getChemeRefName = function (className, isRoot) {
18772
18798
  //Fix for #6486, according to https://niem.github.io/json/reference/json-schema/references/#:~:text=In%20a%20JSON%20schema%2C%20a,%2C%20an%20in%2Dschema%20reference
18773
- return "#/definitions/" + className;
18774
- //return isRoot ? "#/definitions/" + className : className + "#";
18799
+ //Checked by https://www.jsonschemavalidator.net/
18800
+ return isRoot ? "#/definitions/" + className : className;
18775
18801
  };
18776
18802
  JsonMetadata.prototype.generateChemaClass = function (className, schemaDef, isRoot) {
18777
18803
  if (!!schemaDef[className])
@@ -18926,6 +18952,17 @@ var JsonRequiredArrayPropertyError = /** @class */ (function (_super) {
18926
18952
  return JsonRequiredArrayPropertyError;
18927
18953
  }(JsonError));
18928
18954
 
18955
+ var JsonIncorrectPropertyValueError = /** @class */ (function (_super) {
18956
+ __extends(JsonIncorrectPropertyValueError, _super);
18957
+ function JsonIncorrectPropertyValueError(property, value) {
18958
+ var _this = _super.call(this, "incorrectvalue", "The property value: '" + value + "' is incorrect for property '" + property.name + "'.") || this;
18959
+ _this.property = property;
18960
+ _this.value = value;
18961
+ return _this;
18962
+ }
18963
+ return JsonIncorrectPropertyValueError;
18964
+ }(JsonError));
18965
+
18929
18966
  var JsonObject = /** @class */ (function () {
18930
18967
  function JsonObject() {
18931
18968
  this.errors = new Array();
@@ -18942,14 +18979,14 @@ var JsonObject = /** @class */ (function () {
18942
18979
  if (storeDefaults === void 0) { storeDefaults = false; }
18943
18980
  return this.toJsonObjectCore(obj, null, storeDefaults);
18944
18981
  };
18945
- JsonObject.prototype.toObject = function (jsonObj, obj) {
18946
- this.toObjectCore(jsonObj, obj);
18982
+ JsonObject.prototype.toObject = function (jsonObj, obj, options) {
18983
+ this.toObjectCore(jsonObj, obj, options);
18947
18984
  var error = this.getRequiredError(obj, jsonObj);
18948
18985
  if (!!error) {
18949
18986
  this.addNewError(error, jsonObj, obj);
18950
18987
  }
18951
18988
  };
18952
- JsonObject.prototype.toObjectCore = function (jsonObj, obj) {
18989
+ JsonObject.prototype.toObjectCore = function (jsonObj, obj, options) {
18953
18990
  if (!jsonObj)
18954
18991
  return;
18955
18992
  var properties = null;
@@ -18967,6 +19004,7 @@ var JsonObject = /** @class */ (function () {
18967
19004
  obj.startLoadingFromJson(jsonObj);
18968
19005
  }
18969
19006
  properties = this.addDynamicProperties(obj, jsonObj, properties);
19007
+ this.options = options;
18970
19008
  for (var key in jsonObj) {
18971
19009
  if (key === JsonObject.typePropertyName)
18972
19010
  continue;
@@ -18981,8 +19019,9 @@ var JsonObject = /** @class */ (function () {
18981
19019
  }
18982
19020
  continue;
18983
19021
  }
18984
- this.valueToObj(jsonObj[key], obj, property, jsonObj);
19022
+ this.valueToObj(jsonObj[key], obj, property, jsonObj, options);
18985
19023
  }
19024
+ this.options = undefined;
18986
19025
  if (obj.endLoadingFromJson) {
18987
19026
  obj.endLoadingFromJson();
18988
19027
  }
@@ -19055,7 +19094,7 @@ var JsonObject = /** @class */ (function () {
19055
19094
  }
19056
19095
  }
19057
19096
  };
19058
- JsonObject.prototype.valueToObj = function (value, obj, property, jsonObj) {
19097
+ JsonObject.prototype.valueToObj = function (value, obj, property, jsonObj, options) {
19059
19098
  if (value === null || value === undefined)
19060
19099
  return;
19061
19100
  this.removePos(property, value);
@@ -19069,17 +19108,22 @@ var JsonObject = /** @class */ (function () {
19069
19108
  this.addNewError(new JsonRequiredArrayPropertyError(propName, obj.getType()), !!jsonObj ? jsonObj : value, obj);
19070
19109
  }
19071
19110
  if (this.isValueArray(value)) {
19072
- this.valueToArray(value, obj, property.name, property);
19111
+ this.valueToArray(value, obj, property.name, property, options);
19073
19112
  return;
19074
19113
  }
19075
19114
  var newObj = this.createNewObj(value, property);
19076
19115
  if (newObj.newObj) {
19077
- this.toObjectCore(value, newObj.newObj);
19116
+ this.toObjectCore(value, newObj.newObj, options);
19078
19117
  value = newObj.newObj;
19079
19118
  }
19080
19119
  if (!newObj.error) {
19081
19120
  if (property != null) {
19082
19121
  property.setValue(obj, value, this);
19122
+ if (!!options && options.validatePropertyValues) {
19123
+ if (!property.validateValue(value)) {
19124
+ this.addNewError(new JsonIncorrectPropertyValueError(property, value), jsonObj, obj);
19125
+ }
19126
+ }
19083
19127
  }
19084
19128
  else {
19085
19129
  obj[property.name] = value;
@@ -19178,17 +19222,17 @@ var JsonObject = /** @class */ (function () {
19178
19222
  error.at = posObj.start;
19179
19223
  error.end = posObj.end;
19180
19224
  };
19181
- JsonObject.prototype.valueToArray = function (value, obj, key, property) {
19225
+ JsonObject.prototype.valueToArray = function (value, obj, key, property, options) {
19182
19226
  if (obj[key] && !this.isValueArray(obj[key]))
19183
19227
  return;
19184
19228
  if (obj[key] && value.length > 0)
19185
19229
  obj[key].splice(0, obj[key].length);
19186
19230
  var valueRes = obj[key] ? obj[key] : [];
19187
- this.addValuesIntoArray(value, valueRes, property);
19231
+ this.addValuesIntoArray(value, valueRes, property, options);
19188
19232
  if (!obj[key])
19189
19233
  obj[key] = valueRes;
19190
19234
  };
19191
- JsonObject.prototype.addValuesIntoArray = function (value, result, property) {
19235
+ JsonObject.prototype.addValuesIntoArray = function (value, result, property, options) {
19192
19236
  for (var i = 0; i < value.length; i++) {
19193
19237
  var newValue = this.createNewObj(value[i], property);
19194
19238
  if (newValue.newObj) {
@@ -19199,7 +19243,7 @@ var JsonObject = /** @class */ (function () {
19199
19243
  newValue.newObj.valueName = value[i].valueName.toString();
19200
19244
  }
19201
19245
  result.push(newValue.newObj);
19202
- this.toObjectCore(value[i], newValue.newObj);
19246
+ this.toObjectCore(value[i], newValue.newObj, options);
19203
19247
  }
19204
19248
  else {
19205
19249
  if (!newValue.error) {
@@ -20041,14 +20085,21 @@ var LocalizableString = /** @class */ (function () {
20041
20085
  if (this.htmlValues[loc] !== undefined)
20042
20086
  return !!this.htmlValues[loc];
20043
20087
  var renderedText = this.calculatedText;
20044
- if (!renderedText)
20088
+ if (!renderedText) {
20089
+ this.setHtmlValue(loc, "");
20045
20090
  return false;
20046
- if (!!this.getLocalizationName() && renderedText === this.getLocalizationStr())
20091
+ }
20092
+ if (!!this.getLocalizationName() && renderedText === this.getLocalizationStr()) {
20093
+ this.setHtmlValue(loc, "");
20047
20094
  return false;
20095
+ }
20048
20096
  var res = this.owner.getMarkdownHtml(renderedText, this.name);
20049
- this.htmlValues[loc] = res;
20097
+ this.setHtmlValue(loc, res);
20050
20098
  return !!res;
20051
20099
  };
20100
+ LocalizableString.prototype.setHtmlValue = function (loc, val) {
20101
+ this.htmlValues[loc] = val;
20102
+ };
20052
20103
  LocalizableString.prototype.getHtmlValue = function () {
20053
20104
  var loc = this.locale;
20054
20105
  if (!loc)
@@ -27663,6 +27714,9 @@ var Question = /** @class */ (function (_super) {
27663
27714
  if (this.questionComment === newValue)
27664
27715
  return;
27665
27716
  this.questionComment = newValue;
27717
+ this.setCommentIntoData(newValue);
27718
+ };
27719
+ Question.prototype.setCommentIntoData = function (newValue) {
27666
27720
  if (this.data != null) {
27667
27721
  this.data.setComment(this.getValueName(), newValue, this.isSurveyInputTextUpdate ? "text" : false);
27668
27722
  }
@@ -29046,7 +29100,16 @@ var QuestionSelectBase = /** @class */ (function (_super) {
29046
29100
  if (this.getStoreOthersAsComment() && !this.autoOtherMode) {
29047
29101
  this.prevOtherValue = this.otherValue;
29048
29102
  }
29049
- this.otherValue = "";
29103
+ this.makeCommentEmpty = true;
29104
+ this.otherValueCore = "";
29105
+ this.setPropertyValue("comment", "");
29106
+ }
29107
+ };
29108
+ QuestionSelectBase.prototype.setValueCore = function (newValue) {
29109
+ _super.prototype.setValueCore.call(this, newValue);
29110
+ if (this.makeCommentEmpty) {
29111
+ this.setCommentIntoData("");
29112
+ this.makeCommentEmpty = false;
29050
29113
  }
29051
29114
  };
29052
29115
  QuestionSelectBase.prototype.setNewValue = function (newValue) {
@@ -29169,9 +29232,9 @@ var QuestionSelectBase = /** @class */ (function (_super) {
29169
29232
  };
29170
29233
  Object.defineProperty(QuestionSelectBase.prototype, "choicesByUrl", {
29171
29234
  /**
29172
- * Configures access to a RESTful service that returns choice items. Refer to the [ChoicesRestful](https://surveyjs.io/form-library/documentation/choicesrestful) class description for more information.
29235
+ * Configures access to a RESTful service that returns choice items. Refer to the [`ChoicesRestful`](https://surveyjs.io/form-library/documentation/choicesrestful) class description for more information. You can also specify additional application-wide settings using the [`settings.web`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) object.
29173
29236
  *
29174
- * [View Demo](https://surveyjs.io/form-library/examples/questiontype-dropdownrestfull/ (linkStyle))
29237
+ * [View Demo](https://surveyjs.io/form-library/examples/dropdown-menu-load-data-from-restful-service/ (linkStyle))
29175
29238
  * @see choices
29176
29239
  * @see [settings.specialChoicesOrder](https://surveyjs.io/form-library/documentation/api-reference/settings#specialChoicesOrder)
29177
29240
  */
@@ -37021,13 +37084,15 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
37021
37084
  var isChecked = row.value == column.value;
37022
37085
  var isDisabled = this.isReadOnly;
37023
37086
  var allowHover = !isChecked && !isDisabled;
37087
+ var hasCellText = this.hasCellText;
37088
+ var css = this.cssClasses;
37024
37089
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_11__["CssClassBuilder"]()
37025
- .append(this.cssClasses.cell, this.hasCellText)
37026
- .append(this.hasCellText ? this.cssClasses.cellText : this.cssClasses.label)
37027
- .append(this.cssClasses.itemOnError, !this.hasCellText && this.hasCssError())
37028
- .append(this.hasCellText ? this.cssClasses.cellTextSelected : this.cssClasses.itemChecked, isChecked)
37029
- .append(this.hasCellText ? this.cssClasses.cellTextDisabled : this.cssClasses.itemDisabled, isDisabled)
37030
- .append(this.cssClasses.itemHover, allowHover && !this.hasCellText)
37090
+ .append(css.cell, hasCellText)
37091
+ .append(hasCellText ? css.cellText : css.label)
37092
+ .append(css.itemOnError, !hasCellText && this.hasCssError())
37093
+ .append(hasCellText ? css.cellTextSelected : css.itemChecked, isChecked)
37094
+ .append(hasCellText ? css.cellTextDisabled : css.itemDisabled, isDisabled)
37095
+ .append(css.itemHover, allowHover && !hasCellText)
37031
37096
  .toString();
37032
37097
  };
37033
37098
  Object.defineProperty(QuestionMatrixModel.prototype, "itemSvgIcon", {
@@ -38120,7 +38185,7 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
38120
38185
  if (this.data.isValidateOnValueChanging && this.hasQuestonError(changedQuestion))
38121
38186
  return;
38122
38187
  var isDeleting = newColumnValue == null && !changedQuestion ||
38123
- isComment && !newColumnValue && !!changedQuestion && changedQuestion.autoOtherMode;
38188
+ isComment && !newColumnValue && !!changedQuestion;
38124
38189
  this.data.onRowChanged(this, changedName, newValue, isDeleting);
38125
38190
  if (changedName) {
38126
38191
  this.runTriggers(MatrixDropdownTotalRowModel.RowVariableName + "." + changedName, newValue);
@@ -38821,6 +38886,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
38821
38886
  this.resetRenderedTable();
38822
38887
  this.fireCallback(this.columnsChangedCallback);
38823
38888
  };
38889
+ //For internal use
38824
38890
  QuestionMatrixDropdownModelBase.prototype.resetRenderedTable = function () {
38825
38891
  if (this.lockResetRenderedTable || this.isUpdateLocked)
38826
38892
  return;
@@ -40288,16 +40354,17 @@ function onUpdateSelectBaseCellQuestion(cellQuestion, column, question, data) {
40288
40354
  cellQuestion.choicesByUrl.run(data.getTextProcessor());
40289
40355
  }
40290
40356
  }
40357
+ function onUpdateSelectDropdownCellQuestion(cellQuestion, column, question, data) {
40358
+ onUpdateSelectBaseCellQuestion(cellQuestion, column, question, data);
40359
+ if (!!cellQuestion.locPlaceholder && cellQuestion.locPlaceholder.isEmpty && !question.locPlaceholder.isEmpty) {
40360
+ cellQuestion.optionsCaption = question.optionsCaption;
40361
+ }
40362
+ }
40291
40363
  var matrixDropdownColumnTypes = {
40292
40364
  dropdown: {
40293
40365
  onCellQuestionUpdate: function (cellQuestion, column, question, data) {
40294
- onUpdateSelectBaseCellQuestion(cellQuestion, column, question, data);
40295
- if (!!cellQuestion.locPlaceholder &&
40296
- cellQuestion.locPlaceholder.isEmpty &&
40297
- !question.locPlaceholder.isEmpty) {
40298
- cellQuestion.optionsCaption = question.optionsCaption;
40299
- }
40300
- },
40366
+ onUpdateSelectDropdownCellQuestion(cellQuestion, column, question, data);
40367
+ }
40301
40368
  },
40302
40369
  checkbox: {
40303
40370
  onCellQuestionUpdate: function (cellQuestion, column, question, data) {
@@ -40313,7 +40380,11 @@ var matrixDropdownColumnTypes = {
40313
40380
  column.colCount > -1 ? column.colCount : question.columnColCount;
40314
40381
  },
40315
40382
  },
40316
- tagbox: {},
40383
+ tagbox: {
40384
+ onCellQuestionUpdate: function (cellQuestion, column, question, data) {
40385
+ onUpdateSelectBaseCellQuestion(cellQuestion, column, question, data);
40386
+ }
40387
+ },
40317
40388
  text: {},
40318
40389
  comment: {},
40319
40390
  boolean: {
@@ -41371,6 +41442,8 @@ var QuestionMatrixDropdownRenderedCell = /** @class */ (function () {
41371
41442
  return "";
41372
41443
  return this.cell.column.locCellHint.renderedHtml;
41373
41444
  }
41445
+ if (this.hasQuestion && this.question.isVisible && this.question.title)
41446
+ return this.question.title;
41374
41447
  return this.cell.column.title;
41375
41448
  }
41376
41449
  if (this.hasQuestion && this.question.isVisible) {
@@ -44916,7 +44989,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
44916
44989
  _this.registerPropertyChangedHandlers(["panelsState"], function () {
44917
44990
  _this.setPanelsState();
44918
44991
  });
44919
- _this.registerPropertyChangedHandlers(["isMobile"], function () {
44992
+ _this.registerPropertyChangedHandlers(["isMobile", "newPanelPosition", "showRangeInProgress", "renderMode"], function () {
44920
44993
  _this.updateFooterActions();
44921
44994
  });
44922
44995
  _this.registerPropertyChangedHandlers(["allowAddPanel"], function () { _this.updateNoEntriesTextDefaultLoc(); });
@@ -45745,6 +45818,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
45745
45818
  * Specifies whether users are allowed to add new panels.
45746
45819
  *
45747
45820
  * Default value: `true`
45821
+ *
45822
+ * By default, users add new panels to the end. If you want to let users insert a new panel after the current panel, set the [`newPanelPosition`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#newPanelPosition) property to `"next"`.
45748
45823
  * @see canAddPanel
45749
45824
  * @see allowRemovePanel
45750
45825
  */
@@ -45757,6 +45832,26 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
45757
45832
  enumerable: false,
45758
45833
  configurable: true
45759
45834
  });
45835
+ Object.defineProperty(QuestionPanelDynamicModel.prototype, "newPanelPosition", {
45836
+ /**
45837
+ * Specifies the position of newly added panels.
45838
+ *
45839
+ * Possible values:
45840
+ *
45841
+ * - `"last"` (default) - New panels are added to the end.
45842
+ * - `"next"` - New panels are inserted after the current panel.
45843
+ * @see allowAddPanel
45844
+ * @see addPanel
45845
+ */
45846
+ get: function () {
45847
+ return this.getPropertyValue("newPanelPosition");
45848
+ },
45849
+ set: function (val) {
45850
+ this.setPropertyValue("newPanelPosition", val);
45851
+ },
45852
+ enumerable: false,
45853
+ configurable: true
45854
+ });
45760
45855
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "allowRemovePanel", {
45761
45856
  /**
45762
45857
  * Specifies whether users are allowed to delete panels.
@@ -45860,7 +45955,6 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
45860
45955
  },
45861
45956
  set: function (val) {
45862
45957
  this.setPropertyValue("showRangeInProgress", val);
45863
- this.updateFooterActions();
45864
45958
  this.fireCallback(this.currentIndexChangedCallback);
45865
45959
  },
45866
45960
  enumerable: false,
@@ -45883,7 +45977,6 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
45883
45977
  },
45884
45978
  set: function (val) {
45885
45979
  this.setPropertyValue("renderMode", val);
45886
- this.updateFooterActions();
45887
45980
  this.fireCallback(this.renderModeChangedCallback);
45888
45981
  },
45889
45982
  enumerable: false,
@@ -45966,7 +46059,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
45966
46059
  get: function () {
45967
46060
  if (this.isDesignMode)
45968
46061
  return false;
45969
- if (this.isDefaultV2Theme && !this.legacyNavigation && !this.isRenderModeList && this.currentIndex < this.visiblePanelCount - 1) {
46062
+ if (this.isDefaultV2Theme && !this.legacyNavigation && !this.isRenderModeList &&
46063
+ (this.currentIndex < this.visiblePanelCount - 1 && this.newPanelPosition !== "next")) {
45970
46064
  return false;
45971
46065
  }
45972
46066
  return (this.allowAddPanel &&
@@ -46123,6 +46217,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
46123
46217
  * @param index *(Optional)* An index at which to insert the new panel. `undefined` adds the panel to the end or inserts it after the current panel if [`renderMode`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#renderMode) is `"tab"`. A negative index (for instance, -1) adds the panel to the end in all cases, regardless of the `renderMode` value.
46124
46218
  * @see panelCount
46125
46219
  * @see panels
46220
+ * @see allowAddPanel
46221
+ * @see newPanelPosition
46126
46222
  */
46127
46223
  QuestionPanelDynamicModel.prototype.addPanel = function (index) {
46128
46224
  var curIndex = this.currentIndex;
@@ -46187,13 +46283,23 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
46187
46283
  var _this = this;
46188
46284
  if (!this.canRemovePanel)
46189
46285
  return;
46190
- if (this.confirmDelete) {
46286
+ if (this.isRequireConfirmOnDelete(value)) {
46191
46287
  Object(_utils_utils__WEBPACK_IMPORTED_MODULE_9__["confirmActionAsync"])(this.confirmDeleteText, function () { _this.removePanel(value); });
46192
46288
  }
46193
46289
  else {
46194
46290
  this.removePanel(value);
46195
46291
  }
46196
46292
  };
46293
+ QuestionPanelDynamicModel.prototype.isRequireConfirmOnDelete = function (val) {
46294
+ if (!this.confirmDelete)
46295
+ return false;
46296
+ var index = this.getVisualPanelIndex(val);
46297
+ if (index < 0 || index >= this.visiblePanelCount)
46298
+ return false;
46299
+ var panelValue = this.visiblePanels[index].getValue();
46300
+ return !this.isValueEmpty(panelValue) &&
46301
+ (this.isValueEmpty(this.defaultPanelValue) || !this.isTwoValueEquals(panelValue, this.defaultPanelValue));
46302
+ };
46197
46303
  /**
46198
46304
  * Switches Dynamic Panel to the next panel. Returns `true` in case of success, or `false` if `renderMode` is `"list"` or the current panel contains validation errors.
46199
46305
  * @see renderMode
@@ -46423,6 +46529,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
46423
46529
  if (this.isReadOnly || !this.allowAddPanel) {
46424
46530
  this.updateNoEntriesTextDefaultLoc();
46425
46531
  }
46532
+ this.updateFooterActions();
46426
46533
  _super.prototype.onSurveyLoad.call(this);
46427
46534
  };
46428
46535
  QuestionPanelDynamicModel.prototype.onFirstRendering = function () {
@@ -47247,6 +47354,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_5__["Serializer"].addClass("paneldynamic",
47247
47354
  { name: "noEntriesText:text", serializationProperty: "locNoEntriesText" },
47248
47355
  { name: "allowAddPanel:boolean", default: true },
47249
47356
  { name: "allowRemovePanel:boolean", default: true },
47357
+ { name: "newPanelPosition", choices: ["next", "last"], default: "last", category: "layout" },
47250
47358
  {
47251
47359
  name: "panelCount:number",
47252
47360
  isBindable: true,
@@ -49872,6 +49980,7 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
49872
49980
  _this.onOpened = _this.addEvent();
49873
49981
  _this.createLocalizableString("placeholder", _this, false, true);
49874
49982
  _this.createLocalizableString("clearCaption", _this, false, true);
49983
+ _this.createLocalizableString("readOnlyText", _this, true);
49875
49984
  _this.registerPropertyChangedHandlers(["value", "renderAs", "showOtherItem", "otherText", "placeholder", "choices", "visibleChoices"], function () {
49876
49985
  _this.updateReadOnlyText();
49877
49986
  });
@@ -49933,6 +50042,23 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
49933
50042
  enumerable: false,
49934
50043
  configurable: true
49935
50044
  });
50045
+ Object.defineProperty(QuestionTagboxModel.prototype, "readOnlyText", {
50046
+ get: function () {
50047
+ return this.getLocalizableStringText("readOnlyText");
50048
+ },
50049
+ set: function (val) {
50050
+ this.setLocalizableStringText("readOnlyText", val);
50051
+ },
50052
+ enumerable: false,
50053
+ configurable: true
50054
+ });
50055
+ Object.defineProperty(QuestionTagboxModel.prototype, "locReadOnlyText", {
50056
+ get: function () {
50057
+ return this.getLocalizableString("readOnlyText");
50058
+ },
50059
+ enumerable: false,
50060
+ configurable: true
50061
+ });
49936
50062
  QuestionTagboxModel.prototype.getType = function () {
49937
50063
  return "tagbox";
49938
50064
  };
@@ -50058,9 +50184,6 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
50058
50184
  enumerable: false,
50059
50185
  configurable: true
50060
50186
  });
50061
- __decorate([
50062
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: "" })
50063
- ], QuestionTagboxModel.prototype, "readOnlyText", void 0);
50064
50187
  __decorate([
50065
50188
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
50066
50189
  ], QuestionTagboxModel.prototype, "allowClear", void 0);
@@ -51465,14 +51588,8 @@ var settings = {
51465
51588
  showEmptyTitles: true
51466
51589
  },
51467
51590
  //#region designMode section, Obsolete properties
51468
- /**
51469
- * This property is obsolete. Use the [`settings.designMode.showEmptyDescriptions`](https://surveyjs.io/form-library/documentation/api-reference/settings#designMode) property instead.
51470
- */
51471
51591
  get allowShowEmptyDescriptionInDesignMode() { return this.designMode.showEmptyDescriptions; },
51472
51592
  set allowShowEmptyDescriptionInDesignMode(val) { this.designMode.showEmptyDescriptions = val; },
51473
- /**
51474
- * This property is obsolete. Use the [`settings.designMode.showEmptyTitles`](https://surveyjs.io/form-library/documentation/api-reference/settings#designMode) property instead.
51475
- */
51476
51593
  get allowShowEmptyTitleInDesignMode() { return this.designMode.showEmptyTitles; },
51477
51594
  set allowShowEmptyTitleInDesignMode(val) { this.designMode.showEmptyTitles = val; },
51478
51595
  //#endregion
@@ -51496,19 +51613,10 @@ var settings = {
51496
51613
  defaultLocaleName: "default"
51497
51614
  },
51498
51615
  //#region localization section, obsolete properties
51499
- /**
51500
- * This property is obsolete. Use the [`settings.localization.useLocalTimeZone`](https://surveyjs.io/form-library/documentation/api-reference/settings#localization) property instead.
51501
- */
51502
51616
  get useLocalTimeZone() { return this.localization.useLocalTimeZone; },
51503
51617
  set useLocalTimeZone(val) { this.localization.useLocalTimeZone = val; },
51504
- /**
51505
- * This property is obsolete. Use the [`settings.localization.storeDuplicatedTranslations`](https://surveyjs.io/form-library/documentation/api-reference/settings#localization) property instead.
51506
- */
51507
51618
  get storeDuplicatedTranslations() { return this.localization.storeDuplicatedTranslations; },
51508
51619
  set storeDuplicatedTranslations(val) { this.localization.storeDuplicatedTranslations = val; },
51509
- /**
51510
- * This property is obsolete. Use the [`settings.localization.defaultLocaleName`](https://surveyjs.io/form-library/documentation/api-reference/settings#localization) property instead.
51511
- */
51512
51620
  get defaultLocaleName() { return this.localization.defaultLocaleName; },
51513
51621
  set defaultLocaleName(val) { this.localization.defaultLocaleName = val; },
51514
51622
  //#endregion
@@ -51521,41 +51629,41 @@ var settings = {
51521
51629
  * Specifies whether to encode URL parameters when you access a web service. Default value: `true`.
51522
51630
  *
51523
51631
  * - `cacheLoadedChoices`: `boolean`\
51524
- * Specifies whether to cache [choices](https://surveyjs.io/form-library/documentation/api-reference/checkbox-question-model#choicesByUrl) loaded from a web service. Default value: `true`.
51632
+ * Specifies whether to cache [choices loaded from a web service](https://surveyjs.io/form-library/documentation/api-reference/questionselectbase#choicesByUrl). Default value: `true`.
51525
51633
  *
51526
51634
  * - `disableQuestionWhileLoadingChoices`: `boolean`\
51527
51635
  * Disables a question while its choices are being loaded from a web service. Default value: `false`.
51528
51636
  *
51529
51637
  * - `surveyServiceUrl`: `string`\
51530
51638
  * The URL of the SurveyJS Service API endpoint.
51639
+ *
51640
+ * - `onBeforeRequestChoices`: `(sender: ChoicesRestful, options: { request: XMLHttpRequest })`\
51641
+ * An event that is raised before a request for choices is send. Applies to questions with a specified [`choiceByUrl`](https://surveyjs.io/form-library/documentation/api-reference/questionselectbase#choicesByUrl) property. Use the `options.request` parameter to access and modify the `XMLHttpRequest` object. For instance, you can add authentication headers to it:
51642
+ *
51643
+ * ```js
51644
+ * import { settings } from "survey-core";
51645
+ *
51646
+ * settings.web.onBeforeSendRequest = (sender, options) => {
51647
+ * options.request.setRequestHeader('RequestVerificationToken', requestVerificationToken);
51648
+ * };
51649
+ * ```
51531
51650
  */
51532
51651
  web: {
51652
+ onBeforeRequestChoices: function (sender, options) { },
51533
51653
  encodeUrlParams: true,
51534
51654
  cacheLoadedChoices: true,
51535
51655
  disableQuestionWhileLoadingChoices: false,
51536
51656
  surveyServiceUrl: "https://api.surveyjs.io/public/v1/Survey"
51537
51657
  },
51538
51658
  //#region web section, obsolete properties
51539
- /**
51540
- * This property is obsolete. Use the [`settings.web.encodeUrlParams`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
51541
- */
51542
51659
  get webserviceEncodeParameters() { return this.web.encodeUrlParams; },
51543
51660
  set webserviceEncodeParameters(val) { this.web.encodeUrlParams = val; },
51544
- /**
51545
- * This property is obsolete. Use the [`settings.web.cacheLoadedChoices`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
51546
- */
51547
51661
  get useCachingForChoicesRestful() { return this.web.cacheLoadedChoices; },
51548
51662
  set useCachingForChoicesRestful(val) { this.web.cacheLoadedChoices = val; },
51549
51663
  get useCachingForChoicesRestfull() { return this.web.cacheLoadedChoices; },
51550
51664
  set useCachingForChoicesRestfull(val) { this.web.cacheLoadedChoices = val; },
51551
- /**
51552
- * This property is obsolete. Use the [`settings.web.disableQuestionWhileLoadingChoices`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
51553
- */
51554
51665
  get disableOnGettingChoicesFromWeb() { return this.web.disableQuestionWhileLoadingChoices; },
51555
51666
  set disableOnGettingChoicesFromWeb(val) { this.web.disableQuestionWhileLoadingChoices = val; },
51556
- /**
51557
- * This property is obsolete. Use the [`settings.web.surveyServiceUrl`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
51558
- */
51559
51667
  get surveyServiceUrl() { return this.web.surveyServiceUrl; },
51560
51668
  set surveyServiceUrl(val) { this.web.surveyServiceUrl = val; },
51561
51669
  //#endregion
@@ -51581,19 +51689,10 @@ var settings = {
51581
51689
  executeSkipOnValueChanged: true
51582
51690
  },
51583
51691
  //#region triggers section, Obsolete properties
51584
- /**
51585
- * This property is obsolete. Use the [`settings.triggers.executeCompleteOnValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/settings#triggers) property instead.
51586
- */
51587
51692
  get executeCompleteTriggerOnValueChanged() { return this.triggers.executeCompleteOnValueChanged; },
51588
51693
  set executeCompleteTriggerOnValueChanged(val) { this.triggers.executeCompleteOnValueChanged = val; },
51589
- /**
51590
- * This property is obsolete. Use the [`settings.triggers.changeNavigationButtonsOnComplete`](https://surveyjs.io/form-library/documentation/api-reference/settings#triggers) property instead.
51591
- */
51592
51694
  get changeNavigationButtonsOnCompleteTrigger() { return this.triggers.changeNavigationButtonsOnComplete; },
51593
51695
  set changeNavigationButtonsOnCompleteTrigger(val) { this.triggers.changeNavigationButtonsOnComplete = val; },
51594
- /**
51595
- * This property is obsolete. Use the [`settings.triggers.executeSkipOnValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/settings#triggers) property instead.
51596
- */
51597
51696
  get executeSkipTriggerOnValueChanged() { return this.triggers.executeSkipOnValueChanged; },
51598
51697
  set executeSkipTriggerOnValueChanged(val) { this.triggers.executeSkipOnValueChanged = val; },
51599
51698
  //#endregion
@@ -51631,19 +51730,10 @@ var settings = {
51631
51730
  localizableStringSerializeAsObject: false
51632
51731
  },
51633
51732
  //#region serialization section, Obsolete properties
51634
- /**
51635
- * This property is obsolete. Use the [`settings.serialization.itemValueSerializeAsObject`](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization) property instead.
51636
- */
51637
51733
  get itemValueAlwaysSerializeAsObject() { return this.serialization.itemValueSerializeAsObject; },
51638
51734
  set itemValueAlwaysSerializeAsObject(val) { this.serialization.itemValueSerializeAsObject = val; },
51639
- /**
51640
- * This property is obsolete. Use the [`settings.serialization.itemValueSerializeDisplayText`](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization) property instead.
51641
- */
51642
51735
  get itemValueAlwaysSerializeText() { return this.serialization.itemValueSerializeDisplayText; },
51643
51736
  set itemValueAlwaysSerializeText(val) { this.serialization.itemValueSerializeDisplayText = val; },
51644
- /**
51645
- * This property is obsolete. Use the [`settings.serialization.localizableStringSerializeAsObject`](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization) property instead.
51646
- */
51647
51737
  get serializeLocalizableStringAsObject() { return this.serialization.localizableStringSerializeAsObject; },
51648
51738
  set serializeLocalizableStringAsObject(val) { this.serialization.localizableStringSerializeAsObject = val; },
51649
51739
  //#endregion
@@ -51662,9 +51752,6 @@ var settings = {
51662
51752
  firstBatchSize: 3
51663
51753
  },
51664
51754
  //#region lazyRender section, Obsolete properties
51665
- /**
51666
- * This property is obsolete. Use the [`settings.lazyRender.enabled`](https://surveyjs.io/form-library/documentation/api-reference/settings#lazyRender) property instead.
51667
- */
51668
51755
  get lazyRowsRendering() { return this.lazyRender.enabled; },
51669
51756
  set lazyRowsRendering(val) { this.lazyRender.enabled = val; },
51670
51757
  get lazyRowsRenderingStartRow() { return this.lazyRender.firstBatchSize; },
@@ -51714,34 +51801,16 @@ var settings = {
51714
51801
  rateSize: "small",
51715
51802
  },
51716
51803
  //#region matrix section, Obsolete properties
51717
- /**
51718
- * This property is obsolete. Use the [`settings.matrix.defaultRowName`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
51719
- */
51720
51804
  get matrixDefaultRowName() { return this.matrix.defaultRowName; },
51721
51805
  set matrixDefaultRowName(val) { this.matrix.defaultRowName = val; },
51722
- /**
51723
- * This property is obsolete. Use the [`settings.matrix.defaultCellType`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
51724
- */
51725
51806
  get matrixDefaultCellType() { return this.matrix.defaultCellType; },
51726
51807
  set matrixDefaultCellType(val) { this.matrix.defaultCellType = val; },
51727
- /**
51728
- * This property is obsolete. Use the [`settings.matrix.totalsSuffix`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
51729
- */
51730
51808
  get matrixTotalValuePostFix() { return this.matrix.totalsSuffix; },
51731
51809
  set matrixTotalValuePostFix(val) { this.matrix.totalsSuffix = val; },
51732
- /**
51733
- * This property is obsolete. Use the [`settings.matrix.maxRowCount`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
51734
- */
51735
51810
  get matrixMaximumRowCount() { return this.matrix.maxRowCount; },
51736
51811
  set matrixMaximumRowCount(val) { this.matrix.maxRowCount = val; },
51737
- /**
51738
- * This property is obsolete. Use the [`settings.matrix.maxRowCountInCondition`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
51739
- */
51740
51812
  get matrixMaxRowCountInCondition() { return this.matrix.maxRowCountInCondition; },
51741
51813
  set matrixMaxRowCountInCondition(val) { this.matrix.maxRowCountInCondition = val; },
51742
- /**
51743
- * This property is obsolete. Use the [`settings.matrix.renderRemoveAsIcon`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
51744
- */
51745
51814
  get matrixRenderRemoveAsIcon() { return this.matrix.renderRemoveAsIcon; },
51746
51815
  set matrixRenderRemoveAsIcon(val) { this.matrix.renderRemoveAsIcon = val; },
51747
51816
  //#endregion
@@ -51763,14 +51832,8 @@ var settings = {
51763
51832
  maxPanelCountInCondition: 1
51764
51833
  },
51765
51834
  //#region panel section, Obsolete properties
51766
- /**
51767
- * This property is obsolete. Use the [`settings.panel.maxPanelCountInCondition`](https://surveyjs.io/form-library/documentation/api-reference/settings#panel) property instead.
51768
- */
51769
51835
  get panelDynamicMaxPanelCountInCondition() { return this.panel.maxPanelCountInCondition; },
51770
51836
  set panelDynamicMaxPanelCountInCondition(val) { this.panel.maxPanelCountInCondition = val; },
51771
- /**
51772
- * This property is obsolete. Use the [`settings.panel.maxPanelCount`](https://surveyjs.io/form-library/documentation/api-reference/settings#panel) property instead.
51773
- */
51774
51837
  get panelMaximumPanelCount() { return this.panel.maxPanelCount; },
51775
51838
  set panelMaximumPanelCount(val) { this.panel.maxPanelCount = val; },
51776
51839
  //#endregion
@@ -51791,14 +51854,8 @@ var settings = {
51791
51854
  textRenderMode: "input"
51792
51855
  },
51793
51856
  //#region readOnly section, Obsolete properties
51794
- /**
51795
- * This property is obsolete. Use the [`settings.readOnly.commentRenderMode`](https://surveyjs.io/form-library/documentation/api-reference/settings#readOnly) property instead.
51796
- */
51797
51857
  get readOnlyCommentRenderMode() { return this.readOnly.commentRenderMode; },
51798
51858
  set readOnlyCommentRenderMode(val) { this.readOnly.commentRenderMode = val; },
51799
- /**
51800
- * This property is obsolete. Use the [`settings.readOnly.textRenderMode`](https://surveyjs.io/form-library/documentation/api-reference/settings#readOnly) property instead.
51801
- */
51802
51859
  get readOnlyTextRenderMode() { return this.readOnly.textRenderMode; },
51803
51860
  set readOnlyTextRenderMode(val) { this.readOnly.textRenderMode = val; },
51804
51861
  //#endregion
@@ -51818,14 +51875,8 @@ var settings = {
51818
51875
  includeQuestionsWithHiddenTitle: false
51819
51876
  },
51820
51877
  //#region numbering section, Obsolete properties
51821
- /**
51822
- * This property is obsolete. Use the [`settings.numbering.includeQuestionsWithHiddenTitle`](https://surveyjs.io/form-library/documentation/api-reference/settings#numbering) property instead.
51823
- */
51824
51878
  get setQuestionVisibleIndexForHiddenTitle() { return this.numbering.includeQuestionsWithHiddenTitle; },
51825
51879
  set setQuestionVisibleIndexForHiddenTitle(val) { this.numbering.includeQuestionsWithHiddenTitle = val; },
51826
- /**
51827
- * This property is obsolete. Use the [`settings.numbering.includeQuestionsWithHiddenNumber`](https://surveyjs.io/form-library/documentation/api-reference/settings#numbering) property instead.
51828
- */
51829
51880
  get setQuestionVisibleIndexForHiddenNumber() { return this.numbering.includeQuestionsWithHiddenNumber; },
51830
51881
  set setQuestionVisibleIndexForHiddenNumber(val) { this.numbering.includeQuestionsWithHiddenNumber = val; },
51831
51882
  //#endregion
@@ -53223,6 +53274,16 @@ var SurveyElement = /** @class */ (function (_super) {
53223
53274
  enumerable: false,
53224
53275
  configurable: true
53225
53276
  });
53277
+ Object.defineProperty(SurveyElement.prototype, "cssClassesValue", {
53278
+ get: function () {
53279
+ return this.getPropertyValueWithoutDefault("cssClassesValue");
53280
+ },
53281
+ set: function (val) {
53282
+ this.setPropertyValue("cssClassesValue", val);
53283
+ },
53284
+ enumerable: false,
53285
+ configurable: true
53286
+ });
53226
53287
  SurveyElement.prototype.ensureCssClassesValue = function () {
53227
53288
  if (!this.cssClassesValue) {
53228
53289
  this.cssClassesValue = this.calcCssClasses(this.css);
@@ -53276,7 +53337,7 @@ var SurveyElement = /** @class */ (function (_super) {
53276
53337
  SurveyElement.prototype.getIsLoadingFromJson = function () {
53277
53338
  if (_super.prototype.getIsLoadingFromJson.call(this))
53278
53339
  return true;
53279
- return this.survey ? this.survey.isLoadingFromJson : false;
53340
+ return this.surveyValue ? this.surveyValue.isLoadingFromJson : false;
53280
53341
  };
53281
53342
  Object.defineProperty(SurveyElement.prototype, "name", {
53282
53343
  /**
@@ -53801,9 +53862,6 @@ var SurveyElement = /** @class */ (function (_super) {
53801
53862
  __decorate([
53802
53863
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
53803
53864
  ], SurveyElement.prototype, "isDragMe", void 0);
53804
- __decorate([
53805
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
53806
- ], SurveyElement.prototype, "cssClassesValue", void 0);
53807
53865
  __decorate([
53808
53866
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
53809
53867
  ], SurveyElement.prototype, "hasVisibleErrors", void 0);
@@ -55826,7 +55884,7 @@ var SurveyModel = /** @class */ (function (_super) {
55826
55884
  * [Survey Localization demo](https://surveyjs.io/form-library/examples/survey-localization/ (linkStyle))
55827
55885
  */
55828
55886
  get: function () {
55829
- return this.getPropertyValue("locale", _surveyStrings__WEBPACK_IMPORTED_MODULE_8__["surveyLocalization"].currentLocale);
55887
+ return this.getPropertyValueWithoutDefault("locale") || _surveyStrings__WEBPACK_IMPORTED_MODULE_8__["surveyLocalization"].currentLocale;
55830
55888
  },
55831
55889
  set: function (value) {
55832
55890
  if (value === _surveyStrings__WEBPACK_IMPORTED_MODULE_8__["surveyLocalization"].defaultLocale && !_surveyStrings__WEBPACK_IMPORTED_MODULE_8__["surveyLocalization"].currentLocale) {
@@ -56227,6 +56285,7 @@ var SurveyModel = /** @class */ (function (_super) {
56227
56285
  if (newVal !== this._isCompact) {
56228
56286
  this._isCompact = newVal;
56229
56287
  this.updateElementCss();
56288
+ this.triggerResponsiveness(true);
56230
56289
  }
56231
56290
  },
56232
56291
  enumerable: false,
@@ -58178,21 +58237,16 @@ var SurveyModel = /** @class */ (function (_super) {
58178
58237
  var visPages = this.visiblePages;
58179
58238
  var firstErrorPage = null;
58180
58239
  var res = true;
58240
+ var rec = { fireCallback: fireCallback, focuseOnFirstError: focusOnFirstError, firstErrorQuestion: null, result: false };
58181
58241
  for (var i = 0; i < visPages.length; i++) {
58182
- if (!visPages[i].validate(fireCallback, false)) {
58242
+ if (!visPages[i].validate(fireCallback, focusOnFirstError, rec)) {
58183
58243
  if (!firstErrorPage)
58184
58244
  firstErrorPage = visPages[i];
58185
58245
  res = false;
58186
58246
  }
58187
58247
  }
58188
- if (focusOnFirstError && !!firstErrorPage) {
58189
- var questions = firstErrorPage.getQuestions(true);
58190
- for (var i_2 = 0; i_2 < questions.length; i_2++) {
58191
- if (questions[i_2].errors.length > 0) {
58192
- questions[i_2].focus(true);
58193
- break;
58194
- }
58195
- }
58248
+ if (focusOnFirstError && !!firstErrorPage && !!rec.firstErrorQuestion) {
58249
+ rec.firstErrorQuestion.focus(true);
58196
58250
  }
58197
58251
  if (!res || !onAsyncValidation)
58198
58252
  return res;
@@ -60232,8 +60286,8 @@ var SurveyModel = /** @class */ (function (_super) {
60232
60286
  this.calculatedValues[i].doCalculation(this.calculatedValues, this.conditionValues, properties);
60233
60287
  }
60234
60288
  _super.prototype.runConditionCore.call(this, this.conditionValues, properties);
60235
- for (var i_3 = 0; i_3 < pages.length; i_3++) {
60236
- pages[i_3].runCondition(this.conditionValues, properties);
60289
+ for (var i_2 = 0; i_2 < pages.length; i_2++) {
60290
+ pages[i_2].runCondition(this.conditionValues, properties);
60237
60291
  }
60238
60292
  };
60239
60293
  SurveyModel.prototype.runQuestionsTriggers = function (name, value) {
@@ -60405,13 +60459,13 @@ var SurveyModel = /** @class */ (function (_super) {
60405
60459
  page.num = isPageVisible ? page.visibleIndex + 1 : -1;
60406
60460
  }
60407
60461
  };
60408
- SurveyModel.prototype.fromJSON = function (json) {
60462
+ SurveyModel.prototype.fromJSON = function (json, options) {
60409
60463
  if (!json)
60410
60464
  return;
60411
60465
  this.questionHashesClear();
60412
60466
  this.jsonErrors = null;
60413
60467
  var jsonConverter = new _jsonobject__WEBPACK_IMPORTED_MODULE_1__["JsonObject"]();
60414
- jsonConverter.toObject(json, this);
60468
+ jsonConverter.toObject(json, this, options);
60415
60469
  if (jsonConverter.errors.length > 0) {
60416
60470
  this.jsonErrors = jsonConverter.errors;
60417
60471
  }
@@ -62137,7 +62191,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
62137
62191
  onSetValue: function (obj, value, jsonConverter) {
62138
62192
  obj.pages.splice(0, obj.pages.length);
62139
62193
  var page = obj.addNewPage("");
62140
- jsonConverter.toObject({ questions: value }, page);
62194
+ jsonConverter.toObject({ questions: value }, page, jsonConverter === null || jsonConverter === void 0 ? void 0 : jsonConverter.options);
62141
62195
  },
62142
62196
  },
62143
62197
  {