survey-core 1.9.121 → 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.
- package/README.md +4 -0
- package/defaultV2.css +126 -26
- package/defaultV2.css.map +1 -1
- package/defaultV2.fontless.css +126 -26
- package/defaultV2.fontless.css.map +1 -1
- package/defaultV2.fontless.min.css +2 -2
- package/defaultV2.min.css +2 -2
- package/i18n/arabic.js +1 -1
- package/i18n/arabic.min.js +1 -1
- package/i18n/basque.js +1 -1
- package/i18n/basque.min.js +1 -1
- package/i18n/bulgarian.js +1 -1
- package/i18n/bulgarian.min.js +1 -1
- package/i18n/catalan.js +1 -1
- package/i18n/catalan.min.js +1 -1
- package/i18n/croatian.js +1 -1
- package/i18n/croatian.min.js +1 -1
- package/i18n/czech.js +1 -1
- package/i18n/czech.min.js +1 -1
- package/i18n/danish.js +1 -1
- package/i18n/danish.min.js +1 -1
- package/i18n/dutch.js +1 -1
- package/i18n/dutch.min.js +1 -1
- package/i18n/english.js +1 -1
- package/i18n/english.min.js +1 -1
- package/i18n/estonian.js +1 -1
- package/i18n/estonian.min.js +1 -1
- package/i18n/finnish.js +1 -1
- package/i18n/finnish.min.js +1 -1
- package/i18n/french.js +1 -1
- package/i18n/french.min.js +1 -1
- package/i18n/georgian.js +1 -1
- package/i18n/georgian.min.js +1 -1
- package/i18n/german.js +1 -1
- package/i18n/german.min.js +1 -1
- package/i18n/greek.js +1 -1
- package/i18n/greek.min.js +1 -1
- package/i18n/hebrew.js +1 -1
- package/i18n/hebrew.min.js +1 -1
- package/i18n/hindi.js +1 -1
- package/i18n/hindi.min.js +1 -1
- package/i18n/hungarian.js +1 -1
- package/i18n/hungarian.min.js +1 -1
- package/i18n/icelandic.js +1 -1
- package/i18n/icelandic.min.js +1 -1
- package/i18n/index.js +1 -1
- package/i18n/index.min.js +1 -1
- package/i18n/indonesian.js +1 -1
- package/i18n/indonesian.min.js +1 -1
- package/i18n/italian.js +1 -1
- package/i18n/italian.min.js +1 -1
- package/i18n/japanese.js +1 -1
- package/i18n/japanese.min.js +1 -1
- package/i18n/kazakh.js +1 -1
- package/i18n/kazakh.min.js +1 -1
- package/i18n/korean.js +1 -1
- package/i18n/korean.min.js +1 -1
- package/i18n/latvian.js +1 -1
- package/i18n/latvian.min.js +1 -1
- package/i18n/lithuanian.js +1 -1
- package/i18n/lithuanian.min.js +1 -1
- package/i18n/macedonian.js +1 -1
- package/i18n/macedonian.min.js +1 -1
- package/i18n/malay.js +1 -1
- package/i18n/malay.min.js +1 -1
- package/i18n/nl-BE.js +1 -1
- package/i18n/nl-BE.min.js +1 -1
- package/i18n/norwegian.js +1 -1
- package/i18n/norwegian.min.js +1 -1
- package/i18n/persian.js +1 -1
- package/i18n/persian.min.js +1 -1
- package/i18n/polish.js +1 -1
- package/i18n/polish.min.js +1 -1
- package/i18n/portuguese-br.js +1 -1
- package/i18n/portuguese-br.min.js +1 -1
- package/i18n/portuguese.js +1 -1
- package/i18n/portuguese.min.js +1 -1
- package/i18n/romanian.js +1 -1
- package/i18n/romanian.min.js +1 -1
- package/i18n/russian.js +1 -1
- package/i18n/russian.min.js +1 -1
- package/i18n/serbian.js +1 -1
- package/i18n/serbian.min.js +1 -1
- package/i18n/simplified-chinese.js +1 -1
- package/i18n/simplified-chinese.min.js +1 -1
- package/i18n/slovak.js +1 -1
- package/i18n/slovak.min.js +1 -1
- package/i18n/spanish.js +1 -1
- package/i18n/spanish.min.js +1 -1
- package/i18n/swahili.js +1 -1
- package/i18n/swahili.min.js +1 -1
- package/i18n/swedish.js +1 -1
- package/i18n/swedish.min.js +1 -1
- package/i18n/tajik.js +1 -1
- package/i18n/tajik.min.js +1 -1
- package/i18n/telugu.js +1 -1
- package/i18n/telugu.min.js +1 -1
- package/i18n/thai.js +1 -1
- package/i18n/thai.min.js +1 -1
- package/i18n/traditional-chinese.js +1 -1
- package/i18n/traditional-chinese.min.js +1 -1
- package/i18n/turkish.js +1 -1
- package/i18n/turkish.min.js +1 -1
- package/i18n/ukrainian.js +1 -1
- package/i18n/ukrainian.min.js +1 -1
- package/i18n/urdu.js +1 -1
- package/i18n/urdu.min.js +1 -1
- package/i18n/vietnamese.js +1 -1
- package/i18n/vietnamese.min.js +1 -1
- package/i18n/welsh.js +1 -1
- package/i18n/welsh.min.js +1 -1
- package/modern.css +1 -8
- package/modern.css.map +1 -1
- package/modern.fontless.css +1 -8
- package/modern.fontless.css.map +1 -1
- package/modern.fontless.min.css +2 -2
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/plugins/bootstrap-integration.js +1 -1
- package/plugins/bootstrap-integration.min.js +1 -1
- package/plugins/bootstrap-material-integration.js +1 -1
- package/plugins/bootstrap-material-integration.min.js +1 -1
- package/survey.core.js +382 -233
- package/survey.core.js.map +1 -1
- package/survey.core.min.js +3 -3
- package/survey.css +1 -1
- package/survey.css.map +1 -1
- package/survey.i18n.js +1 -1
- package/survey.i18n.min.js +1 -1
- package/survey.min.css +1 -1
- package/themes/borderless-dark-panelless.js +2 -1
- package/themes/borderless-dark-panelless.js.map +1 -1
- package/themes/borderless-dark-panelless.min.js +2 -2
- package/themes/borderless-dark.js +2 -1
- package/themes/borderless-dark.js.map +1 -1
- package/themes/borderless-dark.min.js +2 -2
- package/themes/borderless-light-panelless..js +2 -1
- package/themes/borderless-light-panelless..js.map +1 -1
- package/themes/borderless-light-panelless..min.js +2 -2
- package/themes/borderless-light.js +2 -1
- package/themes/borderless-light.js.map +1 -1
- package/themes/borderless-light.min.js +2 -2
- package/themes/contrast-dark-panelless.js +2 -1
- package/themes/contrast-dark-panelless.js.map +1 -1
- package/themes/contrast-dark-panelless.min.js +2 -2
- package/themes/contrast-dark.js +2 -1
- package/themes/contrast-dark.js.map +1 -1
- package/themes/contrast-dark.min.js +2 -2
- package/themes/contrast-light-panelless.js +2 -1
- package/themes/contrast-light-panelless.js.map +1 -1
- package/themes/contrast-light-panelless.min.js +2 -2
- package/themes/contrast-light.js +2 -1
- package/themes/contrast-light.js.map +1 -1
- package/themes/contrast-light.min.js +2 -2
- package/themes/default-dark-panelless.js +2 -1
- package/themes/default-dark-panelless.js.map +1 -1
- package/themes/default-dark-panelless.min.js +2 -2
- package/themes/default-dark.js +2 -1
- package/themes/default-dark.js.map +1 -1
- package/themes/default-dark.min.js +2 -2
- package/themes/default-light-panelless.js +2 -1
- package/themes/default-light-panelless.js.map +1 -1
- package/themes/default-light-panelless.min.js +2 -2
- package/themes/default-light.js +2 -1
- package/themes/default-light.js.map +1 -1
- package/themes/default-light.min.js +2 -2
- package/themes/doubleborder-dark-panelless.js +2 -1
- package/themes/doubleborder-dark-panelless.js.map +1 -1
- package/themes/doubleborder-dark-panelless.min.js +2 -2
- package/themes/doubleborder-dark.js +2 -1
- package/themes/doubleborder-dark.js.map +1 -1
- package/themes/doubleborder-dark.min.js +2 -2
- package/themes/doubleborder-light-panelles.js +2 -1
- package/themes/doubleborder-light-panelles.js.map +1 -1
- package/themes/doubleborder-light-panelles.min.js +2 -2
- package/themes/doubleborder-light.js +2 -1
- package/themes/doubleborder-light.js.map +1 -1
- package/themes/doubleborder-light.min.js +2 -2
- package/themes/flat-dark-panelless.js +2 -1
- package/themes/flat-dark-panelless.js.map +1 -1
- package/themes/flat-dark-panelless.min.js +2 -2
- package/themes/flat-dark.js +2 -1
- package/themes/flat-dark.js.map +1 -1
- package/themes/flat-dark.min.js +2 -2
- package/themes/flat-light-panelless.js +2 -1
- package/themes/flat-light-panelless.js.map +1 -1
- package/themes/flat-light-panelless.min.js +2 -2
- package/themes/flat-light.js +2 -1
- package/themes/flat-light.js.map +1 -1
- package/themes/flat-light.min.js +2 -2
- package/themes/index.js +41 -1
- package/themes/index.js.map +1 -1
- package/themes/index.min.js +2 -2
- package/themes/layered-dark-panelless.js +2 -1
- package/themes/layered-dark-panelless.js.map +1 -1
- package/themes/layered-dark-panelless.min.js +2 -2
- package/themes/layered-dark.js +2 -1
- package/themes/layered-dark.js.map +1 -1
- package/themes/layered-dark.min.js +2 -2
- package/themes/layered-light-panelless.js +2 -1
- package/themes/layered-light-panelless.js.map +1 -1
- package/themes/layered-light-panelless.min.js +2 -2
- package/themes/layered-light.js +2 -1
- package/themes/layered-light.js.map +1 -1
- package/themes/layered-light.min.js +2 -2
- package/themes/plain-dark-panelless.js +2 -1
- package/themes/plain-dark-panelless.js.map +1 -1
- package/themes/plain-dark-panelless.min.js +2 -2
- package/themes/plain-dark.js +2 -1
- package/themes/plain-dark.js.map +1 -1
- package/themes/plain-dark.min.js +2 -2
- package/themes/plain-light-panelless.js +2 -1
- package/themes/plain-light-panelless.js.map +1 -1
- package/themes/plain-light-panelless.min.js +2 -2
- package/themes/plain-light.js +2 -1
- package/themes/plain-light.js.map +1 -1
- package/themes/plain-light.min.js +2 -2
- package/themes/sharp-dark-panelless.js +2 -1
- package/themes/sharp-dark-panelless.js.map +1 -1
- package/themes/sharp-dark-panelless.min.js +2 -2
- package/themes/sharp-dark.js +2 -1
- package/themes/sharp-dark.js.map +1 -1
- package/themes/sharp-dark.min.js +2 -2
- package/themes/sharp-light-panelless.js +2 -1
- package/themes/sharp-light-panelless.js.map +1 -1
- package/themes/sharp-light-panelless.min.js +2 -2
- package/themes/sharp-light.js +2 -1
- package/themes/sharp-light.js.map +1 -1
- package/themes/sharp-light.min.js +2 -2
- package/themes/solid-dark-panelless.js +2 -1
- package/themes/solid-dark-panelless.js.map +1 -1
- package/themes/solid-dark-panelless.min.js +2 -2
- package/themes/solid-dark.js +2 -1
- package/themes/solid-dark.js.map +1 -1
- package/themes/solid-dark.min.js +2 -2
- package/themes/solid-light-panelless.js +2 -1
- package/themes/solid-light-panelless.js.map +1 -1
- package/themes/solid-light-panelless.min.js +2 -2
- package/themes/solid-light.js +2 -1
- package/themes/solid-light.js.map +1 -1
- package/themes/solid-light.min.js +2 -2
- package/themes/three-dimensional-dark-panelless.js +2 -1
- package/themes/three-dimensional-dark-panelless.js.map +1 -1
- package/themes/three-dimensional-dark-panelless.min.js +2 -2
- package/themes/three-dimensional-dark.js +2 -1
- package/themes/three-dimensional-dark.js.map +1 -1
- package/themes/three-dimensional-dark.min.js +2 -2
- package/themes/three-dimensional-light-panelless.js +2 -1
- package/themes/three-dimensional-light-panelless.js.map +1 -1
- package/themes/three-dimensional-light-panelless.min.js +2 -2
- package/themes/three-dimensional-light.js +2 -1
- package/themes/three-dimensional-light.js.map +1 -1
- package/themes/three-dimensional-light.min.js +2 -2
- package/themes/typings/borderless-dark-panelless.d.ts +2 -0
- package/themes/typings/borderless-dark.d.ts +2 -0
- package/themes/typings/borderless-light-panelless.d.ts +2 -0
- package/themes/typings/borderless-light.d.ts +2 -0
- package/themes/typings/contrast-dark-panelless.d.ts +2 -0
- package/themes/typings/contrast-dark.d.ts +2 -0
- package/themes/typings/contrast-light-panelless.d.ts +2 -0
- package/themes/typings/contrast-light.d.ts +2 -0
- package/themes/typings/default-dark-panelless.d.ts +2 -0
- package/themes/typings/default-dark.d.ts +2 -0
- package/themes/typings/default-light-panelless.d.ts +2 -0
- package/themes/typings/default-light.d.ts +2 -0
- package/themes/typings/doubleborder-dark-panelless.d.ts +2 -0
- package/themes/typings/doubleborder-dark.d.ts +2 -0
- package/themes/typings/doubleborder-light-panelless.d.ts +2 -0
- package/themes/typings/doubleborder-light.d.ts +2 -0
- package/themes/typings/flat-dark-panelless.d.ts +2 -0
- package/themes/typings/flat-dark.d.ts +2 -0
- package/themes/typings/flat-light-panelless.d.ts +2 -0
- package/themes/typings/flat-light.d.ts +2 -0
- package/themes/typings/index.d.ts +40 -0
- package/themes/typings/layered-dark-panelless.d.ts +2 -0
- package/themes/typings/layered-dark.d.ts +2 -0
- package/themes/typings/layered-light-panelless.d.ts +2 -0
- package/themes/typings/layered-light.d.ts +2 -0
- package/themes/typings/plain-dark-panelless.d.ts +2 -0
- package/themes/typings/plain-dark.d.ts +2 -0
- package/themes/typings/plain-light-panelless.d.ts +2 -0
- package/themes/typings/plain-light.d.ts +2 -0
- package/themes/typings/sharp-dark-panelless.d.ts +2 -0
- package/themes/typings/sharp-dark.d.ts +2 -0
- package/themes/typings/sharp-light-panelless.d.ts +2 -0
- package/themes/typings/sharp-light.d.ts +2 -0
- package/themes/typings/solid-dark-panelless.d.ts +2 -0
- package/themes/typings/solid-dark.d.ts +2 -0
- package/themes/typings/solid-light-panelless.d.ts +2 -0
- package/themes/typings/solid-light.d.ts +2 -0
- package/themes/typings/threedimensional-dark-panelless.d.ts +2 -0
- package/themes/typings/threedimensional-dark.d.ts +2 -0
- package/themes/typings/threedimensional-light-panelless.d.ts +2 -0
- package/themes/typings/threedimensional-light.d.ts +2 -0
- package/ts3.4/themes/typings/borderless-dark-panelless.d.ts +2 -0
- package/ts3.4/themes/typings/borderless-dark.d.ts +2 -0
- package/ts3.4/themes/typings/borderless-light-panelless.d.ts +2 -0
- package/ts3.4/themes/typings/borderless-light.d.ts +2 -0
- package/ts3.4/themes/typings/contrast-dark-panelless.d.ts +2 -0
- package/ts3.4/themes/typings/contrast-dark.d.ts +2 -0
- package/ts3.4/themes/typings/contrast-light-panelless.d.ts +2 -0
- package/ts3.4/themes/typings/contrast-light.d.ts +2 -0
- package/ts3.4/themes/typings/default-dark-panelless.d.ts +2 -0
- package/ts3.4/themes/typings/default-dark.d.ts +2 -0
- package/ts3.4/themes/typings/default-light-panelless.d.ts +2 -0
- package/ts3.4/themes/typings/default-light.d.ts +2 -0
- package/ts3.4/themes/typings/doubleborder-dark-panelless.d.ts +2 -0
- package/ts3.4/themes/typings/doubleborder-dark.d.ts +2 -0
- package/ts3.4/themes/typings/doubleborder-light-panelless.d.ts +2 -0
- package/ts3.4/themes/typings/doubleborder-light.d.ts +2 -0
- package/ts3.4/themes/typings/flat-dark-panelless.d.ts +2 -0
- package/ts3.4/themes/typings/flat-dark.d.ts +2 -0
- package/ts3.4/themes/typings/flat-light-panelless.d.ts +2 -0
- package/ts3.4/themes/typings/flat-light.d.ts +2 -0
- package/ts3.4/themes/typings/index.d.ts +40 -0
- package/ts3.4/themes/typings/layered-dark-panelless.d.ts +2 -0
- package/ts3.4/themes/typings/layered-dark.d.ts +2 -0
- package/ts3.4/themes/typings/layered-light-panelless.d.ts +2 -0
- package/ts3.4/themes/typings/layered-light.d.ts +2 -0
- package/ts3.4/themes/typings/plain-dark-panelless.d.ts +2 -0
- package/ts3.4/themes/typings/plain-dark.d.ts +2 -0
- package/ts3.4/themes/typings/plain-light-panelless.d.ts +2 -0
- package/ts3.4/themes/typings/plain-light.d.ts +2 -0
- package/ts3.4/themes/typings/sharp-dark-panelless.d.ts +2 -0
- package/ts3.4/themes/typings/sharp-dark.d.ts +2 -0
- package/ts3.4/themes/typings/sharp-light-panelless.d.ts +2 -0
- package/ts3.4/themes/typings/sharp-light.d.ts +2 -0
- package/ts3.4/themes/typings/solid-dark-panelless.d.ts +2 -0
- package/ts3.4/themes/typings/solid-dark.d.ts +2 -0
- package/ts3.4/themes/typings/solid-light-panelless.d.ts +2 -0
- package/ts3.4/themes/typings/solid-light.d.ts +2 -0
- package/ts3.4/themes/typings/threedimensional-dark-panelless.d.ts +2 -0
- package/ts3.4/themes/typings/threedimensional-dark.d.ts +2 -0
- package/ts3.4/themes/typings/threedimensional-light-panelless.d.ts +2 -0
- package/ts3.4/themes/typings/threedimensional-light.d.ts +2 -0
- package/ts3.4/typings/base-interfaces.d.ts +4 -0
- package/ts3.4/typings/base.d.ts +8 -6
- package/ts3.4/typings/choicesRestful.d.ts +6 -1
- package/ts3.4/typings/defaultCss/defaultV2Css.d.ts +3 -0
- package/ts3.4/typings/entries/chunks/model.d.ts +1 -1
- package/ts3.4/typings/header.d.ts +1 -0
- package/ts3.4/typings/itemvalue.d.ts +2 -2
- package/ts3.4/typings/jsonobject.d.ts +11 -3
- package/ts3.4/typings/localizablestring.d.ts +1 -0
- package/ts3.4/typings/question.d.ts +1 -0
- package/ts3.4/typings/question_baseselect.d.ts +5 -4
- package/ts3.4/typings/question_checkbox.d.ts +1 -0
- package/ts3.4/typings/question_custom.d.ts +2 -0
- package/ts3.4/typings/question_file.d.ts +3 -0
- package/ts3.4/typings/question_imagepicker.d.ts +1 -3
- package/ts3.4/typings/question_matrixdropdownbase.d.ts +1 -1
- package/ts3.4/typings/question_multipletext.d.ts +1 -1
- package/ts3.4/typings/question_paneldynamic.d.ts +20 -4
- package/ts3.4/typings/question_rating.d.ts +18 -5
- package/ts3.4/typings/question_tagbox.d.ts +2 -1
- package/ts3.4/typings/settings.d.ts +15 -85
- package/ts3.4/typings/survey-events-api.d.ts +4 -2
- package/ts3.4/typings/survey.d.ts +17 -16
- package/typings/base-interfaces.d.ts +4 -0
- package/typings/base.d.ts +8 -6
- package/typings/choicesRestful.d.ts +10 -2
- package/typings/defaultCss/defaultV2Css.d.ts +3 -0
- package/typings/entries/chunks/model.d.ts +1 -1
- package/typings/header.d.ts +1 -0
- package/typings/itemvalue.d.ts +2 -2
- package/typings/jsonobject.d.ts +11 -3
- package/typings/localizablestring.d.ts +1 -0
- package/typings/question.d.ts +1 -0
- package/typings/question_baseselect.d.ts +5 -4
- package/typings/question_checkbox.d.ts +1 -0
- package/typings/question_custom.d.ts +2 -0
- package/typings/question_file.d.ts +3 -0
- package/typings/question_imagepicker.d.ts +1 -3
- package/typings/question_matrixdropdownbase.d.ts +1 -1
- package/typings/question_multipletext.d.ts +1 -1
- package/typings/question_paneldynamic.d.ts +21 -4
- package/typings/question_rating.d.ts +18 -5
- package/typings/question_tagbox.d.ts +3 -1
- package/typings/settings.d.ts +15 -85
- package/typings/survey-element.d.ts +2 -1
- package/typings/survey-events-api.d.ts +4 -2
- package/typings/survey.d.ts +17 -16
package/survey.core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.9.
|
|
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
|
*/
|
|
@@ -1891,7 +1891,7 @@ var Base = /** @class */ (function () {
|
|
|
1891
1891
|
* Returns `true` if a passed `value` is an empty string, array, or object or if it equals to `undefined` or `null`.
|
|
1892
1892
|
*
|
|
1893
1893
|
* @param value A value to be checked.
|
|
1894
|
-
* @param trimString (Optional) When this parameter is `true`, the method ignores whitespace characters at the beginning and end of a string value. Pass `false` to disable this functionality.
|
|
1894
|
+
* @param trimString *(Optional)* When this parameter is `true`, the method ignores whitespace characters at the beginning and end of a string value. Pass `false` to disable this functionality.
|
|
1895
1895
|
*/
|
|
1896
1896
|
Base.prototype.isValueEmpty = function (value, trimString) {
|
|
1897
1897
|
if (trimString === void 0) { trimString = true; }
|
|
@@ -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 () { };
|
|
@@ -2098,7 +2100,7 @@ var Base = /** @class */ (function () {
|
|
|
2098
2100
|
* If the property is not found or does not have a value, this method returns either `undefined`, `defaultValue` specified in the property configuration, or a value passed as the `defaultValue` parameter.
|
|
2099
2101
|
*
|
|
2100
2102
|
* @param name A property name.
|
|
2101
|
-
* @param defaultValue (Optional) A value to return if the property is not found or does not have a value.
|
|
2103
|
+
* @param defaultValue *(Optional)* A value to return if the property is not found or does not have a value.
|
|
2102
2104
|
*/
|
|
2103
2105
|
Base.prototype.getPropertyValue = function (name, defaultValue) {
|
|
2104
2106
|
if (defaultValue === void 0) { defaultValue = null; }
|
|
@@ -2369,7 +2371,7 @@ var Base = /** @class */ (function () {
|
|
|
2369
2371
|
* Registers a function to call when a property value changes.
|
|
2370
2372
|
* @param propertyNames An array of one or multiple property names.
|
|
2371
2373
|
* @param handler A function to call when one of the listed properties change.
|
|
2372
|
-
* @param key (Optional) A key that identifies the current registration. If a function for one of the properties is already registered with the same key, the function will be overwritten. You can also use the key to subsequently unregister handlers.
|
|
2374
|
+
* @param key *(Optional)* A key that identifies the current registration. If a function for one of the properties is already registered with the same key, the function will be overwritten. You can also use the key to subsequently unregister handlers.
|
|
2373
2375
|
* @see unregisterPropertyChangedHandlers
|
|
2374
2376
|
*/
|
|
2375
2377
|
Base.prototype.registerPropertyChangedHandlers = function (propertyNames, handler, key) {
|
|
@@ -2381,7 +2383,7 @@ var Base = /** @class */ (function () {
|
|
|
2381
2383
|
/**
|
|
2382
2384
|
* Unregisters value change event handlers for the specified properties.
|
|
2383
2385
|
* @param propertyNames An array of one or multiple property names.
|
|
2384
|
-
* @param key (Optional) A key of the registration that you want to cancel.
|
|
2386
|
+
* @param key *(Optional)* A key of the registration that you want to cancel.
|
|
2385
2387
|
* @see registerPropertyChangedHandlers
|
|
2386
2388
|
*/
|
|
2387
2389
|
Base.prototype.unregisterPropertyChangedHandlers = function (propertyNames, key) {
|
|
@@ -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 (!!
|
|
3333
|
-
|
|
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
|
|
3787
|
+
return _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].web.onBeforeRequestChoices;
|
|
3771
3788
|
},
|
|
3772
3789
|
set: function (val) {
|
|
3773
|
-
|
|
3790
|
+
_settings__WEBPACK_IMPORTED_MODULE_4__["settings"].web.onBeforeRequestChoices = val;
|
|
3774
3791
|
},
|
|
3775
3792
|
enumerable: false,
|
|
3776
3793
|
configurable: true
|
|
@@ -5821,6 +5838,9 @@ var defaultV2Css = {
|
|
|
5821
5838
|
rootDropdown: "sd-scrollable-container sd-scrollable-container--compact sd-selectbase",
|
|
5822
5839
|
root: "sd-scrollable-container sd-rating",
|
|
5823
5840
|
rootWrappable: "sd-scrollable-container sd-rating sd-rating--wrappable",
|
|
5841
|
+
rootLabelsTop: "sd-rating--labels-top",
|
|
5842
|
+
rootLabelsBottom: "sd-rating--labels-bottom",
|
|
5843
|
+
rootLabelsDiagonal: "sd-rating--labels-diagonal",
|
|
5824
5844
|
item: "sd-rating__item",
|
|
5825
5845
|
itemOnError: "sd-rating__item--error",
|
|
5826
5846
|
itemHover: "sd-rating__item--allowhover",
|
|
@@ -8488,7 +8508,7 @@ var DropdownMultiSelectListModel = /** @class */ (function (_super) {
|
|
|
8488
8508
|
if (!_onSelectionChanged) {
|
|
8489
8509
|
_onSelectionChanged = function (item, status) {
|
|
8490
8510
|
_this.resetFilterString();
|
|
8491
|
-
if (item.
|
|
8511
|
+
if (item.id === "selectall") {
|
|
8492
8512
|
_this.selectAllItems();
|
|
8493
8513
|
}
|
|
8494
8514
|
else if (status === "added" && item.value === _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].noneItemValue) {
|
|
@@ -9312,8 +9332,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9312
9332
|
//import "../../modern.scss";
|
|
9313
9333
|
var Version;
|
|
9314
9334
|
var ReleaseDate;
|
|
9315
|
-
Version = "" + "1.9.
|
|
9316
|
-
ReleaseDate = "" + "2023-12-
|
|
9335
|
+
Version = "" + "1.9.123";
|
|
9336
|
+
ReleaseDate = "" + "2023-12-26";
|
|
9317
9337
|
function checkLibraryVersion(ver, libraryName) {
|
|
9318
9338
|
if (Version != ver) {
|
|
9319
9339
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
|
@@ -15370,7 +15390,7 @@ var Cover = /** @class */ (function (_super) {
|
|
|
15370
15390
|
Cover.prototype.updateHeaderClasses = function () {
|
|
15371
15391
|
this.headerClasses = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_2__["CssClassBuilder"]()
|
|
15372
15392
|
.append("sv-header")
|
|
15373
|
-
.append("sv-header__without-background", (this.backgroundColor === "
|
|
15393
|
+
.append("sv-header__without-background", (this.backgroundColor === "transparent") && !this.backgroundImage)
|
|
15374
15394
|
.append("sv-header__overlap", this.overlapEnabled)
|
|
15375
15395
|
.toString();
|
|
15376
15396
|
};
|
|
@@ -15489,6 +15509,13 @@ var Cover = /** @class */ (function (_super) {
|
|
|
15489
15509
|
this.actualHeight = this.calculateActualHeight(logoHeight, titleHeight, descriptionHeight);
|
|
15490
15510
|
}
|
|
15491
15511
|
};
|
|
15512
|
+
Object.defineProperty(Cover.prototype, "hasBackground", {
|
|
15513
|
+
get: function () {
|
|
15514
|
+
return !!this.backgroundImage || this.backgroundColor !== "transparent";
|
|
15515
|
+
},
|
|
15516
|
+
enumerable: false,
|
|
15517
|
+
configurable: true
|
|
15518
|
+
});
|
|
15492
15519
|
__decorate([
|
|
15493
15520
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: 0 })
|
|
15494
15521
|
], Cover.prototype, "actualHeight", void 0);
|
|
@@ -15746,7 +15773,7 @@ var Helpers = /** @class */ (function () {
|
|
|
15746
15773
|
if (x["equals"])
|
|
15747
15774
|
return x.equals(y);
|
|
15748
15775
|
if (!!x.toJSON && !!y.toJSON && !!x.getType && !!y.getType) {
|
|
15749
|
-
if (x.
|
|
15776
|
+
if (x.isDisposed || y.isDisposed)
|
|
15750
15777
|
return false;
|
|
15751
15778
|
if (x.getType() !== y.getType())
|
|
15752
15779
|
return false;
|
|
@@ -17154,7 +17181,7 @@ var ItemValue = /** @class */ (function (_super) {
|
|
|
17154
17181
|
};
|
|
17155
17182
|
Object.defineProperty(ItemValue.prototype, "visibleIf", {
|
|
17156
17183
|
get: function () {
|
|
17157
|
-
return this.
|
|
17184
|
+
return this.getPropertyValueWithoutDefault("visibleIf") || "";
|
|
17158
17185
|
},
|
|
17159
17186
|
set: function (val) {
|
|
17160
17187
|
this.setPropertyValue("visibleIf", val);
|
|
@@ -17164,7 +17191,7 @@ var ItemValue = /** @class */ (function (_super) {
|
|
|
17164
17191
|
});
|
|
17165
17192
|
Object.defineProperty(ItemValue.prototype, "enableIf", {
|
|
17166
17193
|
get: function () {
|
|
17167
|
-
return this.
|
|
17194
|
+
return this.getPropertyValueWithoutDefault("enableIf") || "";
|
|
17168
17195
|
},
|
|
17169
17196
|
set: function (val) {
|
|
17170
17197
|
this.setPropertyValue("enableIf", val);
|
|
@@ -17174,7 +17201,8 @@ var ItemValue = /** @class */ (function (_super) {
|
|
|
17174
17201
|
});
|
|
17175
17202
|
Object.defineProperty(ItemValue.prototype, "isVisible", {
|
|
17176
17203
|
get: function () {
|
|
17177
|
-
|
|
17204
|
+
var res = this.getPropertyValueWithoutDefault("isVisible");
|
|
17205
|
+
return res !== undefined ? res : true;
|
|
17178
17206
|
},
|
|
17179
17207
|
enumerable: false,
|
|
17180
17208
|
configurable: true
|
|
@@ -17184,7 +17212,8 @@ var ItemValue = /** @class */ (function (_super) {
|
|
|
17184
17212
|
};
|
|
17185
17213
|
Object.defineProperty(ItemValue.prototype, "isEnabled", {
|
|
17186
17214
|
get: function () {
|
|
17187
|
-
|
|
17215
|
+
var res = this.getPropertyValueWithoutDefault("isEnabled");
|
|
17216
|
+
return res !== undefined ? res : true;
|
|
17188
17217
|
},
|
|
17189
17218
|
enumerable: false,
|
|
17190
17219
|
configurable: true
|
|
@@ -17329,7 +17358,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("itemvalue", [
|
|
|
17329
17358
|
/*!***************************!*\
|
|
17330
17359
|
!*** ./src/jsonobject.ts ***!
|
|
17331
17360
|
\***************************/
|
|
17332
|
-
/*! 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 */
|
|
17333
17362
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
17334
17363
|
|
|
17335
17364
|
"use strict";
|
|
@@ -17347,6 +17376,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17347
17376
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonIncorrectTypeError", function() { return JsonIncorrectTypeError; });
|
|
17348
17377
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonRequiredPropertyError", function() { return JsonRequiredPropertyError; });
|
|
17349
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; });
|
|
17350
17380
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonObject", function() { return JsonObject; });
|
|
17351
17381
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Serializer", function() { return Serializer; });
|
|
17352
17382
|
/* harmony import */ var _surveyStrings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./surveyStrings */ "./src/surveyStrings.ts");
|
|
@@ -17683,6 +17713,12 @@ var JsonObjectProperty = /** @class */ (function () {
|
|
|
17683
17713
|
}
|
|
17684
17714
|
}
|
|
17685
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
|
+
};
|
|
17686
17722
|
JsonObjectProperty.prototype.getObjType = function (objType) {
|
|
17687
17723
|
if (!this.classNamePart)
|
|
17688
17724
|
return objType;
|
|
@@ -18760,8 +18796,8 @@ var JsonMetadata = /** @class */ (function () {
|
|
|
18760
18796
|
};
|
|
18761
18797
|
JsonMetadata.prototype.getChemeRefName = function (className, isRoot) {
|
|
18762
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
|
|
18763
|
-
|
|
18764
|
-
|
|
18799
|
+
//Checked by https://www.jsonschemavalidator.net/
|
|
18800
|
+
return isRoot ? "#/definitions/" + className : className;
|
|
18765
18801
|
};
|
|
18766
18802
|
JsonMetadata.prototype.generateChemaClass = function (className, schemaDef, isRoot) {
|
|
18767
18803
|
if (!!schemaDef[className])
|
|
@@ -18916,6 +18952,17 @@ var JsonRequiredArrayPropertyError = /** @class */ (function (_super) {
|
|
|
18916
18952
|
return JsonRequiredArrayPropertyError;
|
|
18917
18953
|
}(JsonError));
|
|
18918
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
|
+
|
|
18919
18966
|
var JsonObject = /** @class */ (function () {
|
|
18920
18967
|
function JsonObject() {
|
|
18921
18968
|
this.errors = new Array();
|
|
@@ -18932,14 +18979,14 @@ var JsonObject = /** @class */ (function () {
|
|
|
18932
18979
|
if (storeDefaults === void 0) { storeDefaults = false; }
|
|
18933
18980
|
return this.toJsonObjectCore(obj, null, storeDefaults);
|
|
18934
18981
|
};
|
|
18935
|
-
JsonObject.prototype.toObject = function (jsonObj, obj) {
|
|
18936
|
-
this.toObjectCore(jsonObj, obj);
|
|
18982
|
+
JsonObject.prototype.toObject = function (jsonObj, obj, options) {
|
|
18983
|
+
this.toObjectCore(jsonObj, obj, options);
|
|
18937
18984
|
var error = this.getRequiredError(obj, jsonObj);
|
|
18938
18985
|
if (!!error) {
|
|
18939
18986
|
this.addNewError(error, jsonObj, obj);
|
|
18940
18987
|
}
|
|
18941
18988
|
};
|
|
18942
|
-
JsonObject.prototype.toObjectCore = function (jsonObj, obj) {
|
|
18989
|
+
JsonObject.prototype.toObjectCore = function (jsonObj, obj, options) {
|
|
18943
18990
|
if (!jsonObj)
|
|
18944
18991
|
return;
|
|
18945
18992
|
var properties = null;
|
|
@@ -18957,6 +19004,7 @@ var JsonObject = /** @class */ (function () {
|
|
|
18957
19004
|
obj.startLoadingFromJson(jsonObj);
|
|
18958
19005
|
}
|
|
18959
19006
|
properties = this.addDynamicProperties(obj, jsonObj, properties);
|
|
19007
|
+
this.options = options;
|
|
18960
19008
|
for (var key in jsonObj) {
|
|
18961
19009
|
if (key === JsonObject.typePropertyName)
|
|
18962
19010
|
continue;
|
|
@@ -18971,8 +19019,9 @@ var JsonObject = /** @class */ (function () {
|
|
|
18971
19019
|
}
|
|
18972
19020
|
continue;
|
|
18973
19021
|
}
|
|
18974
|
-
this.valueToObj(jsonObj[key], obj, property, jsonObj);
|
|
19022
|
+
this.valueToObj(jsonObj[key], obj, property, jsonObj, options);
|
|
18975
19023
|
}
|
|
19024
|
+
this.options = undefined;
|
|
18976
19025
|
if (obj.endLoadingFromJson) {
|
|
18977
19026
|
obj.endLoadingFromJson();
|
|
18978
19027
|
}
|
|
@@ -19045,7 +19094,7 @@ var JsonObject = /** @class */ (function () {
|
|
|
19045
19094
|
}
|
|
19046
19095
|
}
|
|
19047
19096
|
};
|
|
19048
|
-
JsonObject.prototype.valueToObj = function (value, obj, property, jsonObj) {
|
|
19097
|
+
JsonObject.prototype.valueToObj = function (value, obj, property, jsonObj, options) {
|
|
19049
19098
|
if (value === null || value === undefined)
|
|
19050
19099
|
return;
|
|
19051
19100
|
this.removePos(property, value);
|
|
@@ -19059,17 +19108,22 @@ var JsonObject = /** @class */ (function () {
|
|
|
19059
19108
|
this.addNewError(new JsonRequiredArrayPropertyError(propName, obj.getType()), !!jsonObj ? jsonObj : value, obj);
|
|
19060
19109
|
}
|
|
19061
19110
|
if (this.isValueArray(value)) {
|
|
19062
|
-
this.valueToArray(value, obj, property.name, property);
|
|
19111
|
+
this.valueToArray(value, obj, property.name, property, options);
|
|
19063
19112
|
return;
|
|
19064
19113
|
}
|
|
19065
19114
|
var newObj = this.createNewObj(value, property);
|
|
19066
19115
|
if (newObj.newObj) {
|
|
19067
|
-
this.toObjectCore(value, newObj.newObj);
|
|
19116
|
+
this.toObjectCore(value, newObj.newObj, options);
|
|
19068
19117
|
value = newObj.newObj;
|
|
19069
19118
|
}
|
|
19070
19119
|
if (!newObj.error) {
|
|
19071
19120
|
if (property != null) {
|
|
19072
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
|
+
}
|
|
19073
19127
|
}
|
|
19074
19128
|
else {
|
|
19075
19129
|
obj[property.name] = value;
|
|
@@ -19168,17 +19222,17 @@ var JsonObject = /** @class */ (function () {
|
|
|
19168
19222
|
error.at = posObj.start;
|
|
19169
19223
|
error.end = posObj.end;
|
|
19170
19224
|
};
|
|
19171
|
-
JsonObject.prototype.valueToArray = function (value, obj, key, property) {
|
|
19225
|
+
JsonObject.prototype.valueToArray = function (value, obj, key, property, options) {
|
|
19172
19226
|
if (obj[key] && !this.isValueArray(obj[key]))
|
|
19173
19227
|
return;
|
|
19174
19228
|
if (obj[key] && value.length > 0)
|
|
19175
19229
|
obj[key].splice(0, obj[key].length);
|
|
19176
19230
|
var valueRes = obj[key] ? obj[key] : [];
|
|
19177
|
-
this.addValuesIntoArray(value, valueRes, property);
|
|
19231
|
+
this.addValuesIntoArray(value, valueRes, property, options);
|
|
19178
19232
|
if (!obj[key])
|
|
19179
19233
|
obj[key] = valueRes;
|
|
19180
19234
|
};
|
|
19181
|
-
JsonObject.prototype.addValuesIntoArray = function (value, result, property) {
|
|
19235
|
+
JsonObject.prototype.addValuesIntoArray = function (value, result, property, options) {
|
|
19182
19236
|
for (var i = 0; i < value.length; i++) {
|
|
19183
19237
|
var newValue = this.createNewObj(value[i], property);
|
|
19184
19238
|
if (newValue.newObj) {
|
|
@@ -19189,7 +19243,7 @@ var JsonObject = /** @class */ (function () {
|
|
|
19189
19243
|
newValue.newObj.valueName = value[i].valueName.toString();
|
|
19190
19244
|
}
|
|
19191
19245
|
result.push(newValue.newObj);
|
|
19192
|
-
this.toObjectCore(value[i], newValue.newObj);
|
|
19246
|
+
this.toObjectCore(value[i], newValue.newObj, options);
|
|
19193
19247
|
}
|
|
19194
19248
|
else {
|
|
19195
19249
|
if (!newValue.error) {
|
|
@@ -20031,14 +20085,21 @@ var LocalizableString = /** @class */ (function () {
|
|
|
20031
20085
|
if (this.htmlValues[loc] !== undefined)
|
|
20032
20086
|
return !!this.htmlValues[loc];
|
|
20033
20087
|
var renderedText = this.calculatedText;
|
|
20034
|
-
if (!renderedText)
|
|
20088
|
+
if (!renderedText) {
|
|
20089
|
+
this.setHtmlValue(loc, "");
|
|
20035
20090
|
return false;
|
|
20036
|
-
|
|
20091
|
+
}
|
|
20092
|
+
if (!!this.getLocalizationName() && renderedText === this.getLocalizationStr()) {
|
|
20093
|
+
this.setHtmlValue(loc, "");
|
|
20037
20094
|
return false;
|
|
20095
|
+
}
|
|
20038
20096
|
var res = this.owner.getMarkdownHtml(renderedText, this.name);
|
|
20039
|
-
this.
|
|
20097
|
+
this.setHtmlValue(loc, res);
|
|
20040
20098
|
return !!res;
|
|
20041
20099
|
};
|
|
20100
|
+
LocalizableString.prototype.setHtmlValue = function (loc, val) {
|
|
20101
|
+
this.htmlValues[loc] = val;
|
|
20102
|
+
};
|
|
20042
20103
|
LocalizableString.prototype.getHtmlValue = function () {
|
|
20043
20104
|
var loc = this.locale;
|
|
20044
20105
|
if (!loc)
|
|
@@ -26822,9 +26883,9 @@ var Question = /** @class */ (function (_super) {
|
|
|
26822
26883
|
return false;
|
|
26823
26884
|
if (!!this.page && this.page.isStartPage)
|
|
26824
26885
|
return false;
|
|
26825
|
-
if (!this.survey
|
|
26886
|
+
if (!this.survey)
|
|
26826
26887
|
return true;
|
|
26827
|
-
return !this.survey.hasVisibleQuestionByValueName(this.
|
|
26888
|
+
return !this.survey.hasVisibleQuestionByValueName(this.getValueName());
|
|
26828
26889
|
};
|
|
26829
26890
|
Object.defineProperty(Question.prototype, "isParentVisible", {
|
|
26830
26891
|
/**
|
|
@@ -27653,6 +27714,9 @@ var Question = /** @class */ (function (_super) {
|
|
|
27653
27714
|
if (this.questionComment === newValue)
|
|
27654
27715
|
return;
|
|
27655
27716
|
this.questionComment = newValue;
|
|
27717
|
+
this.setCommentIntoData(newValue);
|
|
27718
|
+
};
|
|
27719
|
+
Question.prototype.setCommentIntoData = function (newValue) {
|
|
27656
27720
|
if (this.data != null) {
|
|
27657
27721
|
this.data.setComment(this.getValueName(), newValue, this.isSurveyInputTextUpdate ? "text" : false);
|
|
27658
27722
|
}
|
|
@@ -29036,7 +29100,16 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
29036
29100
|
if (this.getStoreOthersAsComment() && !this.autoOtherMode) {
|
|
29037
29101
|
this.prevOtherValue = this.otherValue;
|
|
29038
29102
|
}
|
|
29039
|
-
this.
|
|
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;
|
|
29040
29113
|
}
|
|
29041
29114
|
};
|
|
29042
29115
|
QuestionSelectBase.prototype.setNewValue = function (newValue) {
|
|
@@ -29159,9 +29232,9 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
29159
29232
|
};
|
|
29160
29233
|
Object.defineProperty(QuestionSelectBase.prototype, "choicesByUrl", {
|
|
29161
29234
|
/**
|
|
29162
|
-
* 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.
|
|
29163
29236
|
*
|
|
29164
|
-
* [View Demo](https://surveyjs.io/form-library/examples/
|
|
29237
|
+
* [View Demo](https://surveyjs.io/form-library/examples/dropdown-menu-load-data-from-restful-service/ (linkStyle))
|
|
29165
29238
|
* @see choices
|
|
29166
29239
|
* @see [settings.specialChoicesOrder](https://surveyjs.io/form-library/documentation/api-reference/settings#specialChoicesOrder)
|
|
29167
29240
|
*/
|
|
@@ -30448,21 +30521,6 @@ var QuestionCheckboxBase = /** @class */ (function (_super) {
|
|
|
30448
30521
|
enumerable: false,
|
|
30449
30522
|
configurable: true
|
|
30450
30523
|
});
|
|
30451
|
-
QuestionCheckboxBase.prototype.clickItemHandler = function (item, checked) {
|
|
30452
|
-
var newValue = [].concat(this.renderedValue || []);
|
|
30453
|
-
var index = newValue.indexOf(item.value);
|
|
30454
|
-
if (checked) {
|
|
30455
|
-
if (index < 0) {
|
|
30456
|
-
newValue.push(item.value);
|
|
30457
|
-
}
|
|
30458
|
-
}
|
|
30459
|
-
else {
|
|
30460
|
-
if (index > -1) {
|
|
30461
|
-
newValue.splice(index, 1);
|
|
30462
|
-
}
|
|
30463
|
-
}
|
|
30464
|
-
this.renderedValue = newValue;
|
|
30465
|
-
};
|
|
30466
30524
|
QuestionCheckboxBase.prototype.onParentChanged = function () {
|
|
30467
30525
|
_super.prototype.onParentChanged.call(this);
|
|
30468
30526
|
if (this.isFlowLayout) {
|
|
@@ -31296,9 +31354,10 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
|
31296
31354
|
__extends(QuestionCheckboxModel, _super);
|
|
31297
31355
|
function QuestionCheckboxModel(name) {
|
|
31298
31356
|
var _this = _super.call(this, name) || this;
|
|
31299
|
-
_this.selectAllItemValue = new _itemvalue__WEBPACK_IMPORTED_MODULE_4__["ItemValue"]("selectall");
|
|
31300
31357
|
_this.invisibleOldValues = {};
|
|
31301
31358
|
_this.isChangingValueOnClearIncorrect = false;
|
|
31359
|
+
_this.selectAllItemValue = new _itemvalue__WEBPACK_IMPORTED_MODULE_4__["ItemValue"]("");
|
|
31360
|
+
_this.selectAllItemValue.id = "selectall";
|
|
31302
31361
|
var selectAllItemText = _this.createLocalizableString("selectAllText", _this.selectAllItem, true, "selectAllItemText");
|
|
31303
31362
|
_this.selectAllItem.locOwner = _this;
|
|
31304
31363
|
_this.selectAllItem.setLocText(selectAllItemText);
|
|
@@ -31456,6 +31515,31 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
|
31456
31515
|
}
|
|
31457
31516
|
this.renderedValue = val;
|
|
31458
31517
|
};
|
|
31518
|
+
QuestionCheckboxModel.prototype.clickItemHandler = function (item, checked) {
|
|
31519
|
+
if (item === this.selectAllItem) {
|
|
31520
|
+
if (checked === true || checked === false) {
|
|
31521
|
+
this.isAllSelected = checked;
|
|
31522
|
+
}
|
|
31523
|
+
else {
|
|
31524
|
+
this.toggleSelectAll();
|
|
31525
|
+
}
|
|
31526
|
+
}
|
|
31527
|
+
else {
|
|
31528
|
+
var newValue = [].concat(this.renderedValue || []);
|
|
31529
|
+
var index = newValue.indexOf(item.value);
|
|
31530
|
+
if (checked) {
|
|
31531
|
+
if (index < 0) {
|
|
31532
|
+
newValue.push(item.value);
|
|
31533
|
+
}
|
|
31534
|
+
}
|
|
31535
|
+
else {
|
|
31536
|
+
if (index > -1) {
|
|
31537
|
+
newValue.splice(index, 1);
|
|
31538
|
+
}
|
|
31539
|
+
}
|
|
31540
|
+
this.renderedValue = newValue;
|
|
31541
|
+
}
|
|
31542
|
+
};
|
|
31459
31543
|
QuestionCheckboxModel.prototype.isItemSelectedCore = function (item) {
|
|
31460
31544
|
if (item === this.selectAllItem)
|
|
31461
31545
|
return this.isAllSelected;
|
|
@@ -32456,6 +32540,16 @@ var QuestionCustomModelBase = /** @class */ (function (_super) {
|
|
|
32456
32540
|
this.getElement().localeChanged();
|
|
32457
32541
|
}
|
|
32458
32542
|
};
|
|
32543
|
+
QuestionCustomModelBase.prototype.addUsedLocales = function (locales) {
|
|
32544
|
+
_super.prototype.addUsedLocales.call(this, locales);
|
|
32545
|
+
if (!!this.getElement()) {
|
|
32546
|
+
this.getElement().addUsedLocales(locales);
|
|
32547
|
+
}
|
|
32548
|
+
};
|
|
32549
|
+
QuestionCustomModelBase.prototype.needResponsiveWidth = function () {
|
|
32550
|
+
var el = this.getElement();
|
|
32551
|
+
return !!el ? el.needResponsiveWidth() : false;
|
|
32552
|
+
};
|
|
32459
32553
|
QuestionCustomModelBase.prototype.createWrapper = function () { };
|
|
32460
32554
|
QuestionCustomModelBase.prototype.onPropertyValueChanged = function (name, oldValue, newValue) {
|
|
32461
32555
|
_super.prototype.onPropertyValueChanged.call(this, name, oldValue, newValue);
|
|
@@ -34288,6 +34382,9 @@ function dataUrl2File(dataUrl, fileName, type) {
|
|
|
34288
34382
|
var buffer = new Uint8Array(str.split("").map(function (c) { return c.charCodeAt(0); })).buffer;
|
|
34289
34383
|
return new File([buffer], fileName, { type: type });
|
|
34290
34384
|
}
|
|
34385
|
+
/**
|
|
34386
|
+
* A base class for question types that support file upload: `QuestionFileModel` and `QuestionSignaturePadModel`.
|
|
34387
|
+
*/
|
|
34291
34388
|
var QuestionFileModelBase = /** @class */ (function (_super) {
|
|
34292
34389
|
__extends(QuestionFileModelBase, _super);
|
|
34293
34390
|
function QuestionFileModelBase() {
|
|
@@ -36373,10 +36470,8 @@ var QuestionImagePickerModel = /** @class */ (function (_super) {
|
|
|
36373
36470
|
*
|
|
36374
36471
|
* Possible values:
|
|
36375
36472
|
*
|
|
36376
|
-
* - `"image"` - Images in one of the following formats: JPEG, GIF, PNG, APNG, SVG, BMP, ICO.
|
|
36473
|
+
* - `"image"` (default) - Images in one of the following formats: JPEG, GIF, PNG, APNG, SVG, BMP, ICO.
|
|
36377
36474
|
* - `"video"` - Videos in one of the following formats: MP4, MOV, WMV, FLV, AVI, MKV.
|
|
36378
|
-
* - `"youtube"` - Links to YouTube videos.
|
|
36379
|
-
* - `"auto"` (default) - Selects one of the above based on the `imageLink` property value of each choice item.
|
|
36380
36475
|
*/
|
|
36381
36476
|
get: function () {
|
|
36382
36477
|
return this.getPropertyValue("contentMode");
|
|
@@ -36989,13 +37084,15 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
|
|
|
36989
37084
|
var isChecked = row.value == column.value;
|
|
36990
37085
|
var isDisabled = this.isReadOnly;
|
|
36991
37086
|
var allowHover = !isChecked && !isDisabled;
|
|
37087
|
+
var hasCellText = this.hasCellText;
|
|
37088
|
+
var css = this.cssClasses;
|
|
36992
37089
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_11__["CssClassBuilder"]()
|
|
36993
|
-
.append(
|
|
36994
|
-
.append(
|
|
36995
|
-
.append(
|
|
36996
|
-
.append(
|
|
36997
|
-
.append(
|
|
36998
|
-
.append(
|
|
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)
|
|
36999
37096
|
.toString();
|
|
37000
37097
|
};
|
|
37001
37098
|
Object.defineProperty(QuestionMatrixModel.prototype, "itemSvgIcon", {
|
|
@@ -38088,7 +38185,7 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
|
38088
38185
|
if (this.data.isValidateOnValueChanging && this.hasQuestonError(changedQuestion))
|
|
38089
38186
|
return;
|
|
38090
38187
|
var isDeleting = newColumnValue == null && !changedQuestion ||
|
|
38091
|
-
isComment && !newColumnValue && !!changedQuestion
|
|
38188
|
+
isComment && !newColumnValue && !!changedQuestion;
|
|
38092
38189
|
this.data.onRowChanged(this, changedName, newValue, isDeleting);
|
|
38093
38190
|
if (changedName) {
|
|
38094
38191
|
this.runTriggers(MatrixDropdownTotalRowModel.RowVariableName + "." + changedName, newValue);
|
|
@@ -38789,6 +38886,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
38789
38886
|
this.resetRenderedTable();
|
|
38790
38887
|
this.fireCallback(this.columnsChangedCallback);
|
|
38791
38888
|
};
|
|
38889
|
+
//For internal use
|
|
38792
38890
|
QuestionMatrixDropdownModelBase.prototype.resetRenderedTable = function () {
|
|
38793
38891
|
if (this.lockResetRenderedTable || this.isUpdateLocked)
|
|
38794
38892
|
return;
|
|
@@ -40256,16 +40354,17 @@ function onUpdateSelectBaseCellQuestion(cellQuestion, column, question, data) {
|
|
|
40256
40354
|
cellQuestion.choicesByUrl.run(data.getTextProcessor());
|
|
40257
40355
|
}
|
|
40258
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
|
+
}
|
|
40259
40363
|
var matrixDropdownColumnTypes = {
|
|
40260
40364
|
dropdown: {
|
|
40261
40365
|
onCellQuestionUpdate: function (cellQuestion, column, question, data) {
|
|
40262
|
-
|
|
40263
|
-
|
|
40264
|
-
cellQuestion.locPlaceholder.isEmpty &&
|
|
40265
|
-
!question.locPlaceholder.isEmpty) {
|
|
40266
|
-
cellQuestion.optionsCaption = question.optionsCaption;
|
|
40267
|
-
}
|
|
40268
|
-
},
|
|
40366
|
+
onUpdateSelectDropdownCellQuestion(cellQuestion, column, question, data);
|
|
40367
|
+
}
|
|
40269
40368
|
},
|
|
40270
40369
|
checkbox: {
|
|
40271
40370
|
onCellQuestionUpdate: function (cellQuestion, column, question, data) {
|
|
@@ -40281,7 +40380,11 @@ var matrixDropdownColumnTypes = {
|
|
|
40281
40380
|
column.colCount > -1 ? column.colCount : question.columnColCount;
|
|
40282
40381
|
},
|
|
40283
40382
|
},
|
|
40284
|
-
tagbox: {
|
|
40383
|
+
tagbox: {
|
|
40384
|
+
onCellQuestionUpdate: function (cellQuestion, column, question, data) {
|
|
40385
|
+
onUpdateSelectBaseCellQuestion(cellQuestion, column, question, data);
|
|
40386
|
+
}
|
|
40387
|
+
},
|
|
40285
40388
|
text: {},
|
|
40286
40389
|
comment: {},
|
|
40287
40390
|
boolean: {
|
|
@@ -41339,6 +41442,8 @@ var QuestionMatrixDropdownRenderedCell = /** @class */ (function () {
|
|
|
41339
41442
|
return "";
|
|
41340
41443
|
return this.cell.column.locCellHint.renderedHtml;
|
|
41341
41444
|
}
|
|
41445
|
+
if (this.hasQuestion && this.question.isVisible && this.question.title)
|
|
41446
|
+
return this.question.title;
|
|
41342
41447
|
return this.cell.column.title;
|
|
41343
41448
|
}
|
|
41344
41449
|
if (this.hasQuestion && this.question.isVisible) {
|
|
@@ -44051,7 +44156,7 @@ var QuestionMultipleTextModel = /** @class */ (function (_super) {
|
|
|
44051
44156
|
/**
|
|
44052
44157
|
* Adds a new input item.
|
|
44053
44158
|
* @param name An item name.
|
|
44054
|
-
* @param title (Optional) An item title.
|
|
44159
|
+
* @param title *(Optional)* An item title.
|
|
44055
44160
|
* @see items
|
|
44056
44161
|
*/
|
|
44057
44162
|
QuestionMultipleTextModel.prototype.addItem = function (name, title) {
|
|
@@ -44884,7 +44989,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
44884
44989
|
_this.registerPropertyChangedHandlers(["panelsState"], function () {
|
|
44885
44990
|
_this.setPanelsState();
|
|
44886
44991
|
});
|
|
44887
|
-
_this.registerPropertyChangedHandlers(["isMobile"], function () {
|
|
44992
|
+
_this.registerPropertyChangedHandlers(["isMobile", "newPanelPosition", "showRangeInProgress", "renderMode"], function () {
|
|
44888
44993
|
_this.updateFooterActions();
|
|
44889
44994
|
});
|
|
44890
44995
|
_this.registerPropertyChangedHandlers(["allowAddPanel"], function () { _this.updateNoEntriesTextDefaultLoc(); });
|
|
@@ -45239,7 +45344,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
45239
45344
|
if (this.isRenderModeList || this.useTemplatePanel)
|
|
45240
45345
|
return;
|
|
45241
45346
|
var curPanel = this.getPropertyValue("currentPanel");
|
|
45242
|
-
|
|
45347
|
+
var index = !!val ? this.visiblePanels.indexOf(val) : -1;
|
|
45348
|
+
if (!!val && index < 0 || val === curPanel)
|
|
45243
45349
|
return;
|
|
45244
45350
|
if (curPanel) {
|
|
45245
45351
|
curPanel.onHidingContent();
|
|
@@ -45248,6 +45354,13 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
45248
45354
|
this.updateFooterActions();
|
|
45249
45355
|
this.updateTabToolbarItemsPressedState();
|
|
45250
45356
|
this.fireCallback(this.currentIndexChangedCallback);
|
|
45357
|
+
if (index > -1 && this.survey) {
|
|
45358
|
+
var options = {
|
|
45359
|
+
panel: val,
|
|
45360
|
+
visiblePanelIndex: index
|
|
45361
|
+
};
|
|
45362
|
+
this.survey.dynamicPanelCurrentIndexChanged(this, options);
|
|
45363
|
+
}
|
|
45251
45364
|
},
|
|
45252
45365
|
enumerable: false,
|
|
45253
45366
|
configurable: true
|
|
@@ -45705,6 +45818,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
45705
45818
|
* Specifies whether users are allowed to add new panels.
|
|
45706
45819
|
*
|
|
45707
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"`.
|
|
45708
45823
|
* @see canAddPanel
|
|
45709
45824
|
* @see allowRemovePanel
|
|
45710
45825
|
*/
|
|
@@ -45717,6 +45832,26 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
45717
45832
|
enumerable: false,
|
|
45718
45833
|
configurable: true
|
|
45719
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
|
+
});
|
|
45720
45855
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "allowRemovePanel", {
|
|
45721
45856
|
/**
|
|
45722
45857
|
* Specifies whether users are allowed to delete panels.
|
|
@@ -45820,7 +45955,6 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
45820
45955
|
},
|
|
45821
45956
|
set: function (val) {
|
|
45822
45957
|
this.setPropertyValue("showRangeInProgress", val);
|
|
45823
|
-
this.updateFooterActions();
|
|
45824
45958
|
this.fireCallback(this.currentIndexChangedCallback);
|
|
45825
45959
|
},
|
|
45826
45960
|
enumerable: false,
|
|
@@ -45843,7 +45977,6 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
45843
45977
|
},
|
|
45844
45978
|
set: function (val) {
|
|
45845
45979
|
this.setPropertyValue("renderMode", val);
|
|
45846
|
-
this.updateFooterActions();
|
|
45847
45980
|
this.fireCallback(this.renderModeChangedCallback);
|
|
45848
45981
|
},
|
|
45849
45982
|
enumerable: false,
|
|
@@ -45926,7 +46059,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
45926
46059
|
get: function () {
|
|
45927
46060
|
if (this.isDesignMode)
|
|
45928
46061
|
return false;
|
|
45929
|
-
if (this.isDefaultV2Theme && !this.legacyNavigation && !this.isRenderModeList &&
|
|
46062
|
+
if (this.isDefaultV2Theme && !this.legacyNavigation && !this.isRenderModeList &&
|
|
46063
|
+
(this.currentIndex < this.visiblePanelCount - 1 && this.newPanelPosition !== "next")) {
|
|
45930
46064
|
return false;
|
|
45931
46065
|
}
|
|
45932
46066
|
return (this.allowAddPanel &&
|
|
@@ -46079,48 +46213,61 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
46079
46213
|
return newPanel;
|
|
46080
46214
|
};
|
|
46081
46215
|
/**
|
|
46082
|
-
*
|
|
46083
|
-
* @
|
|
46216
|
+
* Adds a new panel based on the [template](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#template).
|
|
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.
|
|
46084
46218
|
* @see panelCount
|
|
46085
46219
|
* @see panels
|
|
46086
|
-
* @see
|
|
46220
|
+
* @see allowAddPanel
|
|
46221
|
+
* @see newPanelPosition
|
|
46087
46222
|
*/
|
|
46088
|
-
QuestionPanelDynamicModel.prototype.addPanel = function () {
|
|
46089
|
-
this.
|
|
46223
|
+
QuestionPanelDynamicModel.prototype.addPanel = function (index) {
|
|
46224
|
+
var curIndex = this.currentIndex;
|
|
46225
|
+
if (index === undefined) {
|
|
46226
|
+
index = curIndex < 0 ? this.panelCount : curIndex + 1;
|
|
46227
|
+
}
|
|
46228
|
+
if (index < 0 || index > this.panelCount) {
|
|
46229
|
+
index = this.panelCount;
|
|
46230
|
+
}
|
|
46231
|
+
this.updateValueOnAddingPanel(curIndex < 0 ? this.panelCount - 1 : curIndex, index);
|
|
46090
46232
|
if (!this.isRenderModeList) {
|
|
46091
|
-
this.currentIndex =
|
|
46233
|
+
this.currentIndex = index;
|
|
46092
46234
|
}
|
|
46235
|
+
if (this.survey)
|
|
46236
|
+
this.survey.dynamicPanelAdded(this);
|
|
46237
|
+
return this.panels[index];
|
|
46238
|
+
};
|
|
46239
|
+
QuestionPanelDynamicModel.prototype.updateValueOnAddingPanel = function (prevIndex, index) {
|
|
46240
|
+
this.panelCount++;
|
|
46093
46241
|
var newValue = this.value;
|
|
46242
|
+
if (!Array.isArray(newValue) || newValue.length !== this.panelCount)
|
|
46243
|
+
return;
|
|
46094
46244
|
var hasModified = false;
|
|
46245
|
+
var lastIndex = this.panelCount - 1;
|
|
46246
|
+
if (index < lastIndex) {
|
|
46247
|
+
hasModified = true;
|
|
46248
|
+
var rec = newValue[lastIndex];
|
|
46249
|
+
newValue.splice(lastIndex, 1);
|
|
46250
|
+
newValue.splice(index, 0, rec);
|
|
46251
|
+
}
|
|
46095
46252
|
if (!this.isValueEmpty(this.defaultPanelValue)) {
|
|
46096
|
-
if (!!newValue &&
|
|
46097
|
-
Array.isArray(newValue) &&
|
|
46098
|
-
newValue.length == this.panelCount) {
|
|
46099
|
-
hasModified = true;
|
|
46100
|
-
this.copyValue(newValue[newValue.length - 1], this.defaultPanelValue);
|
|
46101
|
-
}
|
|
46102
|
-
}
|
|
46103
|
-
if (this.defaultValueFromLastPanel &&
|
|
46104
|
-
!!newValue &&
|
|
46105
|
-
Array.isArray(newValue) &&
|
|
46106
|
-
newValue.length > 1 &&
|
|
46107
|
-
newValue.length == this.panelCount) {
|
|
46108
46253
|
hasModified = true;
|
|
46109
|
-
this.copyValue(newValue[
|
|
46254
|
+
this.copyValue(newValue[index], this.defaultPanelValue);
|
|
46255
|
+
}
|
|
46256
|
+
if (this.defaultValueFromLastPanel && newValue.length > 1) {
|
|
46257
|
+
var fromIndex = prevIndex > -1 && prevIndex <= lastIndex ? prevIndex : lastIndex;
|
|
46258
|
+
hasModified = true;
|
|
46259
|
+
this.copyValue(newValue[index], newValue[fromIndex]);
|
|
46110
46260
|
}
|
|
46111
46261
|
if (hasModified) {
|
|
46112
46262
|
this.value = newValue;
|
|
46113
46263
|
}
|
|
46114
|
-
if (this.survey)
|
|
46115
|
-
this.survey.dynamicPanelAdded(this);
|
|
46116
|
-
return this.panels[this.panelCount - 1];
|
|
46117
46264
|
};
|
|
46118
46265
|
QuestionPanelDynamicModel.prototype.canLeaveCurrentPanel = function () {
|
|
46119
46266
|
return !(this.renderMode !== "list" && this.currentPanel && this.currentPanel.hasErrors(true, true));
|
|
46120
46267
|
};
|
|
46121
|
-
QuestionPanelDynamicModel.prototype.copyValue = function (
|
|
46122
|
-
for (var key in
|
|
46123
|
-
|
|
46268
|
+
QuestionPanelDynamicModel.prototype.copyValue = function (dest, src) {
|
|
46269
|
+
for (var key in src) {
|
|
46270
|
+
dest[key] = src[key];
|
|
46124
46271
|
}
|
|
46125
46272
|
};
|
|
46126
46273
|
/**
|
|
@@ -46136,13 +46283,23 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
46136
46283
|
var _this = this;
|
|
46137
46284
|
if (!this.canRemovePanel)
|
|
46138
46285
|
return;
|
|
46139
|
-
if (this.
|
|
46286
|
+
if (this.isRequireConfirmOnDelete(value)) {
|
|
46140
46287
|
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_9__["confirmActionAsync"])(this.confirmDeleteText, function () { _this.removePanel(value); });
|
|
46141
46288
|
}
|
|
46142
46289
|
else {
|
|
46143
46290
|
this.removePanel(value);
|
|
46144
46291
|
}
|
|
46145
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
|
+
};
|
|
46146
46303
|
/**
|
|
46147
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.
|
|
46148
46305
|
* @see renderMode
|
|
@@ -46372,6 +46529,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
46372
46529
|
if (this.isReadOnly || !this.allowAddPanel) {
|
|
46373
46530
|
this.updateNoEntriesTextDefaultLoc();
|
|
46374
46531
|
}
|
|
46532
|
+
this.updateFooterActions();
|
|
46375
46533
|
_super.prototype.onSurveyLoad.call(this);
|
|
46376
46534
|
};
|
|
46377
46535
|
QuestionPanelDynamicModel.prototype.onFirstRendering = function () {
|
|
@@ -47196,6 +47354,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_5__["Serializer"].addClass("paneldynamic",
|
|
|
47196
47354
|
{ name: "noEntriesText:text", serializationProperty: "locNoEntriesText" },
|
|
47197
47355
|
{ name: "allowAddPanel:boolean", default: true },
|
|
47198
47356
|
{ name: "allowRemovePanel:boolean", default: true },
|
|
47357
|
+
{ name: "newPanelPosition", choices: ["next", "last"], default: "last", category: "layout" },
|
|
47199
47358
|
{
|
|
47200
47359
|
name: "panelCount:number",
|
|
47201
47360
|
isBindable: true,
|
|
@@ -48557,9 +48716,10 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
48557
48716
|
Object.defineProperty(QuestionRatingModel.prototype, "minRateDescription", {
|
|
48558
48717
|
/**
|
|
48559
48718
|
* Specifies a description for the minimum (first) rate value.
|
|
48719
|
+
* @see rateDescriptionLocation
|
|
48720
|
+
* @see displayRateDescriptionsAsExtremeItems
|
|
48560
48721
|
* @see rateValues
|
|
48561
48722
|
* @see rateMin
|
|
48562
|
-
* @see displayRateDescriptionsAsExtremeItems
|
|
48563
48723
|
*/
|
|
48564
48724
|
get: function () {
|
|
48565
48725
|
return this.getLocalizableStringText("minRateDescription");
|
|
@@ -48581,9 +48741,10 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
48581
48741
|
Object.defineProperty(QuestionRatingModel.prototype, "maxRateDescription", {
|
|
48582
48742
|
/**
|
|
48583
48743
|
* Specifies a description for the maximum (last) rate value.
|
|
48744
|
+
* @see rateDescriptionLocation
|
|
48745
|
+
* @see displayRateDescriptionsAsExtremeItems
|
|
48584
48746
|
* @see rateValues
|
|
48585
48747
|
* @see rateMax
|
|
48586
|
-
* @see displayRateDescriptionsAsExtremeItems
|
|
48587
48748
|
*/
|
|
48588
48749
|
get: function () {
|
|
48589
48750
|
return this.getLocalizableStringText("maxRateDescription");
|
|
@@ -48715,8 +48876,18 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
48715
48876
|
get: function () {
|
|
48716
48877
|
var baseClass = ((this.displayMode == "buttons" || (!!this.survey && this.survey.isDesignMode)) && this.cssClasses.rootWrappable) ?
|
|
48717
48878
|
this.cssClasses.rootWrappable : this.cssClasses.root;
|
|
48879
|
+
var rootClassModifier = "";
|
|
48880
|
+
if (this.hasMaxLabel || this.hasMinLabel) {
|
|
48881
|
+
if (this.rateDescriptionLocation == "top")
|
|
48882
|
+
rootClassModifier = this.cssClasses.rootLabelsTop;
|
|
48883
|
+
if (this.rateDescriptionLocation == "bottom")
|
|
48884
|
+
rootClassModifier = this.cssClasses.rootLabelsBottom;
|
|
48885
|
+
if (this.rateDescriptionLocation == "topBottom")
|
|
48886
|
+
rootClassModifier = this.cssClasses.rootLabelsDiagonal;
|
|
48887
|
+
}
|
|
48718
48888
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__["CssClassBuilder"]()
|
|
48719
48889
|
.append(baseClass)
|
|
48890
|
+
.append(rootClassModifier)
|
|
48720
48891
|
.append(this.cssClasses.itemSmall, this.itemSmallMode && this.rateType != "labels")
|
|
48721
48892
|
.toString();
|
|
48722
48893
|
},
|
|
@@ -49045,6 +49216,9 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
49045
49216
|
}
|
|
49046
49217
|
})
|
|
49047
49218
|
], QuestionRatingModel.prototype, "displayMode", void 0);
|
|
49219
|
+
__decorate([
|
|
49220
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
|
49221
|
+
], QuestionRatingModel.prototype, "rateDescriptionLocation", void 0);
|
|
49048
49222
|
__decorate([
|
|
49049
49223
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
|
49050
49224
|
], QuestionRatingModel.prototype, "rateType", void 0);
|
|
@@ -49174,6 +49348,12 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("rating", [
|
|
|
49174
49348
|
return obj.rateType == "labels";
|
|
49175
49349
|
}
|
|
49176
49350
|
},
|
|
49351
|
+
{
|
|
49352
|
+
name: "rateDescriptionLocation",
|
|
49353
|
+
default: "leftRight",
|
|
49354
|
+
category: "layout",
|
|
49355
|
+
choices: ["leftRight", "top", "bottom", "topBottom"],
|
|
49356
|
+
},
|
|
49177
49357
|
{
|
|
49178
49358
|
name: "displayMode",
|
|
49179
49359
|
default: "auto",
|
|
@@ -49800,6 +49980,7 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
|
|
|
49800
49980
|
_this.onOpened = _this.addEvent();
|
|
49801
49981
|
_this.createLocalizableString("placeholder", _this, false, true);
|
|
49802
49982
|
_this.createLocalizableString("clearCaption", _this, false, true);
|
|
49983
|
+
_this.createLocalizableString("readOnlyText", _this, true);
|
|
49803
49984
|
_this.registerPropertyChangedHandlers(["value", "renderAs", "showOtherItem", "otherText", "placeholder", "choices", "visibleChoices"], function () {
|
|
49804
49985
|
_this.updateReadOnlyText();
|
|
49805
49986
|
});
|
|
@@ -49861,6 +50042,23 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
|
|
|
49861
50042
|
enumerable: false,
|
|
49862
50043
|
configurable: true
|
|
49863
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
|
+
});
|
|
49864
50062
|
QuestionTagboxModel.prototype.getType = function () {
|
|
49865
50063
|
return "tagbox";
|
|
49866
50064
|
};
|
|
@@ -49986,9 +50184,6 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
|
|
|
49986
50184
|
enumerable: false,
|
|
49987
50185
|
configurable: true
|
|
49988
50186
|
});
|
|
49989
|
-
__decorate([
|
|
49990
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: "" })
|
|
49991
|
-
], QuestionTagboxModel.prototype, "readOnlyText", void 0);
|
|
49992
50187
|
__decorate([
|
|
49993
50188
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
|
49994
50189
|
], QuestionTagboxModel.prototype, "allowClear", void 0);
|
|
@@ -51393,14 +51588,8 @@ var settings = {
|
|
|
51393
51588
|
showEmptyTitles: true
|
|
51394
51589
|
},
|
|
51395
51590
|
//#region designMode section, Obsolete properties
|
|
51396
|
-
/**
|
|
51397
|
-
* This property is obsolete. Use the [`settings.designMode.showEmptyDescriptions`](https://surveyjs.io/form-library/documentation/api-reference/settings#designMode) property instead.
|
|
51398
|
-
*/
|
|
51399
51591
|
get allowShowEmptyDescriptionInDesignMode() { return this.designMode.showEmptyDescriptions; },
|
|
51400
51592
|
set allowShowEmptyDescriptionInDesignMode(val) { this.designMode.showEmptyDescriptions = val; },
|
|
51401
|
-
/**
|
|
51402
|
-
* This property is obsolete. Use the [`settings.designMode.showEmptyTitles`](https://surveyjs.io/form-library/documentation/api-reference/settings#designMode) property instead.
|
|
51403
|
-
*/
|
|
51404
51593
|
get allowShowEmptyTitleInDesignMode() { return this.designMode.showEmptyTitles; },
|
|
51405
51594
|
set allowShowEmptyTitleInDesignMode(val) { this.designMode.showEmptyTitles = val; },
|
|
51406
51595
|
//#endregion
|
|
@@ -51424,19 +51613,10 @@ var settings = {
|
|
|
51424
51613
|
defaultLocaleName: "default"
|
|
51425
51614
|
},
|
|
51426
51615
|
//#region localization section, obsolete properties
|
|
51427
|
-
/**
|
|
51428
|
-
* This property is obsolete. Use the [`settings.localization.useLocalTimeZone`](https://surveyjs.io/form-library/documentation/api-reference/settings#localization) property instead.
|
|
51429
|
-
*/
|
|
51430
51616
|
get useLocalTimeZone() { return this.localization.useLocalTimeZone; },
|
|
51431
51617
|
set useLocalTimeZone(val) { this.localization.useLocalTimeZone = val; },
|
|
51432
|
-
/**
|
|
51433
|
-
* This property is obsolete. Use the [`settings.localization.storeDuplicatedTranslations`](https://surveyjs.io/form-library/documentation/api-reference/settings#localization) property instead.
|
|
51434
|
-
*/
|
|
51435
51618
|
get storeDuplicatedTranslations() { return this.localization.storeDuplicatedTranslations; },
|
|
51436
51619
|
set storeDuplicatedTranslations(val) { this.localization.storeDuplicatedTranslations = val; },
|
|
51437
|
-
/**
|
|
51438
|
-
* This property is obsolete. Use the [`settings.localization.defaultLocaleName`](https://surveyjs.io/form-library/documentation/api-reference/settings#localization) property instead.
|
|
51439
|
-
*/
|
|
51440
51620
|
get defaultLocaleName() { return this.localization.defaultLocaleName; },
|
|
51441
51621
|
set defaultLocaleName(val) { this.localization.defaultLocaleName = val; },
|
|
51442
51622
|
//#endregion
|
|
@@ -51449,41 +51629,41 @@ var settings = {
|
|
|
51449
51629
|
* Specifies whether to encode URL parameters when you access a web service. Default value: `true`.
|
|
51450
51630
|
*
|
|
51451
51631
|
* - `cacheLoadedChoices`: `boolean`\
|
|
51452
|
-
* Specifies whether to cache [choices](https://surveyjs.io/form-library/documentation/api-reference/
|
|
51632
|
+
* Specifies whether to cache [choices loaded from a web service](https://surveyjs.io/form-library/documentation/api-reference/questionselectbase#choicesByUrl). Default value: `true`.
|
|
51453
51633
|
*
|
|
51454
51634
|
* - `disableQuestionWhileLoadingChoices`: `boolean`\
|
|
51455
51635
|
* Disables a question while its choices are being loaded from a web service. Default value: `false`.
|
|
51456
51636
|
*
|
|
51457
51637
|
* - `surveyServiceUrl`: `string`\
|
|
51458
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
|
+
* ```
|
|
51459
51650
|
*/
|
|
51460
51651
|
web: {
|
|
51652
|
+
onBeforeRequestChoices: function (sender, options) { },
|
|
51461
51653
|
encodeUrlParams: true,
|
|
51462
51654
|
cacheLoadedChoices: true,
|
|
51463
51655
|
disableQuestionWhileLoadingChoices: false,
|
|
51464
51656
|
surveyServiceUrl: "https://api.surveyjs.io/public/v1/Survey"
|
|
51465
51657
|
},
|
|
51466
51658
|
//#region web section, obsolete properties
|
|
51467
|
-
/**
|
|
51468
|
-
* This property is obsolete. Use the [`settings.web.encodeUrlParams`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
|
|
51469
|
-
*/
|
|
51470
51659
|
get webserviceEncodeParameters() { return this.web.encodeUrlParams; },
|
|
51471
51660
|
set webserviceEncodeParameters(val) { this.web.encodeUrlParams = val; },
|
|
51472
|
-
/**
|
|
51473
|
-
* This property is obsolete. Use the [`settings.web.cacheLoadedChoices`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
|
|
51474
|
-
*/
|
|
51475
51661
|
get useCachingForChoicesRestful() { return this.web.cacheLoadedChoices; },
|
|
51476
51662
|
set useCachingForChoicesRestful(val) { this.web.cacheLoadedChoices = val; },
|
|
51477
51663
|
get useCachingForChoicesRestfull() { return this.web.cacheLoadedChoices; },
|
|
51478
51664
|
set useCachingForChoicesRestfull(val) { this.web.cacheLoadedChoices = val; },
|
|
51479
|
-
/**
|
|
51480
|
-
* This property is obsolete. Use the [`settings.web.disableQuestionWhileLoadingChoices`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
|
|
51481
|
-
*/
|
|
51482
51665
|
get disableOnGettingChoicesFromWeb() { return this.web.disableQuestionWhileLoadingChoices; },
|
|
51483
51666
|
set disableOnGettingChoicesFromWeb(val) { this.web.disableQuestionWhileLoadingChoices = val; },
|
|
51484
|
-
/**
|
|
51485
|
-
* This property is obsolete. Use the [`settings.web.surveyServiceUrl`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
|
|
51486
|
-
*/
|
|
51487
51667
|
get surveyServiceUrl() { return this.web.surveyServiceUrl; },
|
|
51488
51668
|
set surveyServiceUrl(val) { this.web.surveyServiceUrl = val; },
|
|
51489
51669
|
//#endregion
|
|
@@ -51509,19 +51689,10 @@ var settings = {
|
|
|
51509
51689
|
executeSkipOnValueChanged: true
|
|
51510
51690
|
},
|
|
51511
51691
|
//#region triggers section, Obsolete properties
|
|
51512
|
-
/**
|
|
51513
|
-
* This property is obsolete. Use the [`settings.triggers.executeCompleteOnValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/settings#triggers) property instead.
|
|
51514
|
-
*/
|
|
51515
51692
|
get executeCompleteTriggerOnValueChanged() { return this.triggers.executeCompleteOnValueChanged; },
|
|
51516
51693
|
set executeCompleteTriggerOnValueChanged(val) { this.triggers.executeCompleteOnValueChanged = val; },
|
|
51517
|
-
/**
|
|
51518
|
-
* This property is obsolete. Use the [`settings.triggers.changeNavigationButtonsOnComplete`](https://surveyjs.io/form-library/documentation/api-reference/settings#triggers) property instead.
|
|
51519
|
-
*/
|
|
51520
51694
|
get changeNavigationButtonsOnCompleteTrigger() { return this.triggers.changeNavigationButtonsOnComplete; },
|
|
51521
51695
|
set changeNavigationButtonsOnCompleteTrigger(val) { this.triggers.changeNavigationButtonsOnComplete = val; },
|
|
51522
|
-
/**
|
|
51523
|
-
* This property is obsolete. Use the [`settings.triggers.executeSkipOnValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/settings#triggers) property instead.
|
|
51524
|
-
*/
|
|
51525
51696
|
get executeSkipTriggerOnValueChanged() { return this.triggers.executeSkipOnValueChanged; },
|
|
51526
51697
|
set executeSkipTriggerOnValueChanged(val) { this.triggers.executeSkipOnValueChanged = val; },
|
|
51527
51698
|
//#endregion
|
|
@@ -51559,19 +51730,10 @@ var settings = {
|
|
|
51559
51730
|
localizableStringSerializeAsObject: false
|
|
51560
51731
|
},
|
|
51561
51732
|
//#region serialization section, Obsolete properties
|
|
51562
|
-
/**
|
|
51563
|
-
* This property is obsolete. Use the [`settings.serialization.itemValueSerializeAsObject`](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization) property instead.
|
|
51564
|
-
*/
|
|
51565
51733
|
get itemValueAlwaysSerializeAsObject() { return this.serialization.itemValueSerializeAsObject; },
|
|
51566
51734
|
set itemValueAlwaysSerializeAsObject(val) { this.serialization.itemValueSerializeAsObject = val; },
|
|
51567
|
-
/**
|
|
51568
|
-
* This property is obsolete. Use the [`settings.serialization.itemValueSerializeDisplayText`](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization) property instead.
|
|
51569
|
-
*/
|
|
51570
51735
|
get itemValueAlwaysSerializeText() { return this.serialization.itemValueSerializeDisplayText; },
|
|
51571
51736
|
set itemValueAlwaysSerializeText(val) { this.serialization.itemValueSerializeDisplayText = val; },
|
|
51572
|
-
/**
|
|
51573
|
-
* This property is obsolete. Use the [`settings.serialization.localizableStringSerializeAsObject`](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization) property instead.
|
|
51574
|
-
*/
|
|
51575
51737
|
get serializeLocalizableStringAsObject() { return this.serialization.localizableStringSerializeAsObject; },
|
|
51576
51738
|
set serializeLocalizableStringAsObject(val) { this.serialization.localizableStringSerializeAsObject = val; },
|
|
51577
51739
|
//#endregion
|
|
@@ -51590,9 +51752,6 @@ var settings = {
|
|
|
51590
51752
|
firstBatchSize: 3
|
|
51591
51753
|
},
|
|
51592
51754
|
//#region lazyRender section, Obsolete properties
|
|
51593
|
-
/**
|
|
51594
|
-
* This property is obsolete. Use the [`settings.lazyRender.enabled`](https://surveyjs.io/form-library/documentation/api-reference/settings#lazyRender) property instead.
|
|
51595
|
-
*/
|
|
51596
51755
|
get lazyRowsRendering() { return this.lazyRender.enabled; },
|
|
51597
51756
|
set lazyRowsRendering(val) { this.lazyRender.enabled = val; },
|
|
51598
51757
|
get lazyRowsRenderingStartRow() { return this.lazyRender.firstBatchSize; },
|
|
@@ -51642,34 +51801,16 @@ var settings = {
|
|
|
51642
51801
|
rateSize: "small",
|
|
51643
51802
|
},
|
|
51644
51803
|
//#region matrix section, Obsolete properties
|
|
51645
|
-
/**
|
|
51646
|
-
* This property is obsolete. Use the [`settings.matrix.defaultRowName`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
|
51647
|
-
*/
|
|
51648
51804
|
get matrixDefaultRowName() { return this.matrix.defaultRowName; },
|
|
51649
51805
|
set matrixDefaultRowName(val) { this.matrix.defaultRowName = val; },
|
|
51650
|
-
/**
|
|
51651
|
-
* This property is obsolete. Use the [`settings.matrix.defaultCellType`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
|
51652
|
-
*/
|
|
51653
51806
|
get matrixDefaultCellType() { return this.matrix.defaultCellType; },
|
|
51654
51807
|
set matrixDefaultCellType(val) { this.matrix.defaultCellType = val; },
|
|
51655
|
-
/**
|
|
51656
|
-
* This property is obsolete. Use the [`settings.matrix.totalsSuffix`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
|
51657
|
-
*/
|
|
51658
51808
|
get matrixTotalValuePostFix() { return this.matrix.totalsSuffix; },
|
|
51659
51809
|
set matrixTotalValuePostFix(val) { this.matrix.totalsSuffix = val; },
|
|
51660
|
-
/**
|
|
51661
|
-
* This property is obsolete. Use the [`settings.matrix.maxRowCount`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
|
51662
|
-
*/
|
|
51663
51810
|
get matrixMaximumRowCount() { return this.matrix.maxRowCount; },
|
|
51664
51811
|
set matrixMaximumRowCount(val) { this.matrix.maxRowCount = val; },
|
|
51665
|
-
/**
|
|
51666
|
-
* This property is obsolete. Use the [`settings.matrix.maxRowCountInCondition`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
|
51667
|
-
*/
|
|
51668
51812
|
get matrixMaxRowCountInCondition() { return this.matrix.maxRowCountInCondition; },
|
|
51669
51813
|
set matrixMaxRowCountInCondition(val) { this.matrix.maxRowCountInCondition = val; },
|
|
51670
|
-
/**
|
|
51671
|
-
* This property is obsolete. Use the [`settings.matrix.renderRemoveAsIcon`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
|
51672
|
-
*/
|
|
51673
51814
|
get matrixRenderRemoveAsIcon() { return this.matrix.renderRemoveAsIcon; },
|
|
51674
51815
|
set matrixRenderRemoveAsIcon(val) { this.matrix.renderRemoveAsIcon = val; },
|
|
51675
51816
|
//#endregion
|
|
@@ -51691,14 +51832,8 @@ var settings = {
|
|
|
51691
51832
|
maxPanelCountInCondition: 1
|
|
51692
51833
|
},
|
|
51693
51834
|
//#region panel section, Obsolete properties
|
|
51694
|
-
/**
|
|
51695
|
-
* This property is obsolete. Use the [`settings.panel.maxPanelCountInCondition`](https://surveyjs.io/form-library/documentation/api-reference/settings#panel) property instead.
|
|
51696
|
-
*/
|
|
51697
51835
|
get panelDynamicMaxPanelCountInCondition() { return this.panel.maxPanelCountInCondition; },
|
|
51698
51836
|
set panelDynamicMaxPanelCountInCondition(val) { this.panel.maxPanelCountInCondition = val; },
|
|
51699
|
-
/**
|
|
51700
|
-
* This property is obsolete. Use the [`settings.panel.maxPanelCount`](https://surveyjs.io/form-library/documentation/api-reference/settings#panel) property instead.
|
|
51701
|
-
*/
|
|
51702
51837
|
get panelMaximumPanelCount() { return this.panel.maxPanelCount; },
|
|
51703
51838
|
set panelMaximumPanelCount(val) { this.panel.maxPanelCount = val; },
|
|
51704
51839
|
//#endregion
|
|
@@ -51719,14 +51854,8 @@ var settings = {
|
|
|
51719
51854
|
textRenderMode: "input"
|
|
51720
51855
|
},
|
|
51721
51856
|
//#region readOnly section, Obsolete properties
|
|
51722
|
-
/**
|
|
51723
|
-
* This property is obsolete. Use the [`settings.readOnly.commentRenderMode`](https://surveyjs.io/form-library/documentation/api-reference/settings#readOnly) property instead.
|
|
51724
|
-
*/
|
|
51725
51857
|
get readOnlyCommentRenderMode() { return this.readOnly.commentRenderMode; },
|
|
51726
51858
|
set readOnlyCommentRenderMode(val) { this.readOnly.commentRenderMode = val; },
|
|
51727
|
-
/**
|
|
51728
|
-
* This property is obsolete. Use the [`settings.readOnly.textRenderMode`](https://surveyjs.io/form-library/documentation/api-reference/settings#readOnly) property instead.
|
|
51729
|
-
*/
|
|
51730
51859
|
get readOnlyTextRenderMode() { return this.readOnly.textRenderMode; },
|
|
51731
51860
|
set readOnlyTextRenderMode(val) { this.readOnly.textRenderMode = val; },
|
|
51732
51861
|
//#endregion
|
|
@@ -51746,14 +51875,8 @@ var settings = {
|
|
|
51746
51875
|
includeQuestionsWithHiddenTitle: false
|
|
51747
51876
|
},
|
|
51748
51877
|
//#region numbering section, Obsolete properties
|
|
51749
|
-
/**
|
|
51750
|
-
* This property is obsolete. Use the [`settings.numbering.includeQuestionsWithHiddenTitle`](https://surveyjs.io/form-library/documentation/api-reference/settings#numbering) property instead.
|
|
51751
|
-
*/
|
|
51752
51878
|
get setQuestionVisibleIndexForHiddenTitle() { return this.numbering.includeQuestionsWithHiddenTitle; },
|
|
51753
51879
|
set setQuestionVisibleIndexForHiddenTitle(val) { this.numbering.includeQuestionsWithHiddenTitle = val; },
|
|
51754
|
-
/**
|
|
51755
|
-
* This property is obsolete. Use the [`settings.numbering.includeQuestionsWithHiddenNumber`](https://surveyjs.io/form-library/documentation/api-reference/settings#numbering) property instead.
|
|
51756
|
-
*/
|
|
51757
51880
|
get setQuestionVisibleIndexForHiddenNumber() { return this.numbering.includeQuestionsWithHiddenNumber; },
|
|
51758
51881
|
set setQuestionVisibleIndexForHiddenNumber(val) { this.numbering.includeQuestionsWithHiddenNumber = val; },
|
|
51759
51882
|
//#endregion
|
|
@@ -53151,6 +53274,16 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
53151
53274
|
enumerable: false,
|
|
53152
53275
|
configurable: true
|
|
53153
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
|
+
});
|
|
53154
53287
|
SurveyElement.prototype.ensureCssClassesValue = function () {
|
|
53155
53288
|
if (!this.cssClassesValue) {
|
|
53156
53289
|
this.cssClassesValue = this.calcCssClasses(this.css);
|
|
@@ -53204,7 +53337,7 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
53204
53337
|
SurveyElement.prototype.getIsLoadingFromJson = function () {
|
|
53205
53338
|
if (_super.prototype.getIsLoadingFromJson.call(this))
|
|
53206
53339
|
return true;
|
|
53207
|
-
return this.
|
|
53340
|
+
return this.surveyValue ? this.surveyValue.isLoadingFromJson : false;
|
|
53208
53341
|
};
|
|
53209
53342
|
Object.defineProperty(SurveyElement.prototype, "name", {
|
|
53210
53343
|
/**
|
|
@@ -53729,9 +53862,6 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
53729
53862
|
__decorate([
|
|
53730
53863
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
|
|
53731
53864
|
], SurveyElement.prototype, "isDragMe", void 0);
|
|
53732
|
-
__decorate([
|
|
53733
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
|
53734
|
-
], SurveyElement.prototype, "cssClassesValue", void 0);
|
|
53735
53865
|
__decorate([
|
|
53736
53866
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
|
|
53737
53867
|
], SurveyElement.prototype, "hasVisibleErrors", void 0);
|
|
@@ -54501,6 +54631,10 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
54501
54631
|
* [View Demo](https://surveyjs.io/form-library/examples/tabbed-interface-for-duplicate-group-option/ (linkStyle))
|
|
54502
54632
|
*/
|
|
54503
54633
|
_this.onGetDynamicPanelTabTitle = _this.addEvent();
|
|
54634
|
+
/**
|
|
54635
|
+
* An event that is raised after the current panel is changed in a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
|
|
54636
|
+
*/
|
|
54637
|
+
_this.onDynamicPanelCurrentIndexChanged = _this.addEvent();
|
|
54504
54638
|
/**
|
|
54505
54639
|
* An event that is raised to define whether a question answer is correct. Applies only to [quiz surveys](https://surveyjs.io/form-library/documentation/design-survey/create-a-quiz).
|
|
54506
54640
|
*/
|
|
@@ -55750,7 +55884,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
55750
55884
|
* [Survey Localization demo](https://surveyjs.io/form-library/examples/survey-localization/ (linkStyle))
|
|
55751
55885
|
*/
|
|
55752
55886
|
get: function () {
|
|
55753
|
-
return this.
|
|
55887
|
+
return this.getPropertyValueWithoutDefault("locale") || _surveyStrings__WEBPACK_IMPORTED_MODULE_8__["surveyLocalization"].currentLocale;
|
|
55754
55888
|
},
|
|
55755
55889
|
set: function (value) {
|
|
55756
55890
|
if (value === _surveyStrings__WEBPACK_IMPORTED_MODULE_8__["surveyLocalization"].defaultLocale && !_surveyStrings__WEBPACK_IMPORTED_MODULE_8__["surveyLocalization"].currentLocale) {
|
|
@@ -56151,6 +56285,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
56151
56285
|
if (newVal !== this._isCompact) {
|
|
56152
56286
|
this._isCompact = newVal;
|
|
56153
56287
|
this.updateElementCss();
|
|
56288
|
+
this.triggerResponsiveness(true);
|
|
56154
56289
|
}
|
|
56155
56290
|
},
|
|
56156
56291
|
enumerable: false,
|
|
@@ -56934,7 +57069,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
56934
57069
|
/**
|
|
56935
57070
|
* Merges a specified data object with the object from the [`data`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data) property.
|
|
56936
57071
|
*
|
|
56937
|
-
* Refer to the following help topic for more information: [
|
|
57072
|
+
* Refer to the following help topic for more information: [Populate Form Fields | Multiple Question Values](https://surveyjs.io/form-library/documentation/design-survey/pre-populate-form-fields#multiple-question-values).
|
|
56938
57073
|
*
|
|
56939
57074
|
* @param data A data object to merge. It should have the following structure: `{ questionName: questionValue, ... }`
|
|
56940
57075
|
* @see setValue
|
|
@@ -58102,21 +58237,16 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
58102
58237
|
var visPages = this.visiblePages;
|
|
58103
58238
|
var firstErrorPage = null;
|
|
58104
58239
|
var res = true;
|
|
58240
|
+
var rec = { fireCallback: fireCallback, focuseOnFirstError: focusOnFirstError, firstErrorQuestion: null, result: false };
|
|
58105
58241
|
for (var i = 0; i < visPages.length; i++) {
|
|
58106
|
-
if (!visPages[i].validate(fireCallback,
|
|
58242
|
+
if (!visPages[i].validate(fireCallback, focusOnFirstError, rec)) {
|
|
58107
58243
|
if (!firstErrorPage)
|
|
58108
58244
|
firstErrorPage = visPages[i];
|
|
58109
58245
|
res = false;
|
|
58110
58246
|
}
|
|
58111
58247
|
}
|
|
58112
|
-
if (focusOnFirstError && !!firstErrorPage) {
|
|
58113
|
-
|
|
58114
|
-
for (var i_2 = 0; i_2 < questions.length; i_2++) {
|
|
58115
|
-
if (questions[i_2].errors.length > 0) {
|
|
58116
|
-
questions[i_2].focus(true);
|
|
58117
|
-
break;
|
|
58118
|
-
}
|
|
58119
|
-
}
|
|
58248
|
+
if (focusOnFirstError && !!firstErrorPage && !!rec.firstErrorQuestion) {
|
|
58249
|
+
rec.firstErrorQuestion.focus(true);
|
|
58120
58250
|
}
|
|
58121
58251
|
if (!res || !onAsyncValidation)
|
|
58122
58252
|
return res;
|
|
@@ -58494,6 +58624,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
58494
58624
|
};
|
|
58495
58625
|
SurveyModel.prototype.setupPagesForPageModes = function (isSinglePage) {
|
|
58496
58626
|
this.questionHashesClear();
|
|
58627
|
+
this.isCreatingPagesForPreview = true;
|
|
58497
58628
|
var startIndex = this.getPageStartIndex();
|
|
58498
58629
|
_super.prototype.startLoadingFromJson.call(this);
|
|
58499
58630
|
var newPages = this.createPagesForQuestionOnPageMode(isSinglePage, startIndex);
|
|
@@ -58508,6 +58639,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
58508
58639
|
}
|
|
58509
58640
|
this.doElementsOnLoad();
|
|
58510
58641
|
this.updateCurrentPage();
|
|
58642
|
+
this.isCreatingPagesForPreview = false;
|
|
58511
58643
|
};
|
|
58512
58644
|
SurveyModel.prototype.createPagesForQuestionOnPageMode = function (isSinglePage, startIndex) {
|
|
58513
58645
|
if (isSinglePage) {
|
|
@@ -59159,7 +59291,8 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
59159
59291
|
SurveyModel.prototype.afterRenderPage = function (htmlElement) {
|
|
59160
59292
|
var _this = this;
|
|
59161
59293
|
if (!this.isDesignMode && !this.focusingQuestionInfo) {
|
|
59162
|
-
|
|
59294
|
+
var doScroll_1 = !this.isFirstPageRendering;
|
|
59295
|
+
setTimeout(function () { return _this.scrollToTopOnPageChange(doScroll_1); }, 1);
|
|
59163
59296
|
}
|
|
59164
59297
|
this.focusQuestionInfo();
|
|
59165
59298
|
this.isFirstPageRendering = false;
|
|
@@ -59378,6 +59511,10 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
59378
59511
|
options.question = question;
|
|
59379
59512
|
this.onGetDynamicPanelTabTitle.fire(this, options);
|
|
59380
59513
|
};
|
|
59514
|
+
SurveyModel.prototype.dynamicPanelCurrentIndexChanged = function (question, options) {
|
|
59515
|
+
options.question = question;
|
|
59516
|
+
this.onDynamicPanelCurrentIndexChanged.fire(this, options);
|
|
59517
|
+
};
|
|
59381
59518
|
SurveyModel.prototype.dragAndDropAllow = function (options) {
|
|
59382
59519
|
this.onDragDropAllow.fire(this, options);
|
|
59383
59520
|
return options.allow;
|
|
@@ -59461,13 +59598,8 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
59461
59598
|
* question,
|
|
59462
59599
|
* question.name,
|
|
59463
59600
|
* question.value,
|
|
59464
|
-
* (
|
|
59465
|
-
*
|
|
59466
|
-
* // Handle success
|
|
59467
|
-
* }
|
|
59468
|
-
* if (status === "error") {
|
|
59469
|
-
* // Handle error
|
|
59470
|
-
* }
|
|
59601
|
+
* (data, errors) => {
|
|
59602
|
+
* // ...
|
|
59471
59603
|
* }
|
|
59472
59604
|
* );
|
|
59473
59605
|
* ```
|
|
@@ -59656,7 +59788,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
59656
59788
|
/**
|
|
59657
59789
|
* Returns a question with a specified [`name`](https://surveyjs.io/form-library/documentation/api-reference/question#name).
|
|
59658
59790
|
* @param name A question name
|
|
59659
|
-
* @param caseInsensitive (Optional) A Boolean value that specifies case sensitivity when searching for the question. Default value: `false` (uppercase and lowercase letters are treated as distinct).
|
|
59791
|
+
* @param caseInsensitive *(Optional)* A Boolean value that specifies case sensitivity when searching for the question. Default value: `false` (uppercase and lowercase letters are treated as distinct).
|
|
59660
59792
|
* @returns A question with a specified name.
|
|
59661
59793
|
* @see getAllQuestions
|
|
59662
59794
|
* @see getQuestionByValueName
|
|
@@ -59684,7 +59816,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
59684
59816
|
*
|
|
59685
59817
|
* > Since `valueName` does not have to be unique, multiple questions can have the same `valueName` value. In this case, the `getQuestionByValueName()` method returns the first such question. If you need to get all questions with the same `valueName`, call the `getQuestionsByValueName()` method.
|
|
59686
59818
|
* @param valueName A question's `valueName` property value.
|
|
59687
|
-
* @param caseInsensitive (Optional) A Boolean value that specifies case sensitivity when searching for the question. Default value: `false` (uppercase and lowercase letters are treated as distinct).
|
|
59819
|
+
* @param caseInsensitive *(Optional)* A Boolean value that specifies case sensitivity when searching for the question. Default value: `false` (uppercase and lowercase letters are treated as distinct).
|
|
59688
59820
|
* @returns A question with a specified `valueName`.
|
|
59689
59821
|
* @see getAllQuestions
|
|
59690
59822
|
* @see getQuestionByName
|
|
@@ -59697,7 +59829,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
59697
59829
|
/**
|
|
59698
59830
|
* Returns all questions with a specified [`valueName`](https://surveyjs.io/form-library/documentation/api-reference/question#valueName). If a question's `valueName` is undefined, its [`name`](https://surveyjs.io/form-library/documentation/api-reference/question#name) property is used.
|
|
59699
59831
|
* @param valueName A question's `valueName` property value.
|
|
59700
|
-
* @param caseInsensitive (Optional) A Boolean value that specifies case sensitivity when searching for the questions. Default value: `false` (uppercase and lowercase letters are treated as distinct).
|
|
59832
|
+
* @param caseInsensitive *(Optional)* A Boolean value that specifies case sensitivity when searching for the questions. Default value: `false` (uppercase and lowercase letters are treated as distinct).
|
|
59701
59833
|
* @returns An array of questions with a specified `valueName`.
|
|
59702
59834
|
* @see getAllQuestions
|
|
59703
59835
|
* @see getQuestionByName
|
|
@@ -59722,7 +59854,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
59722
59854
|
/**
|
|
59723
59855
|
* Returns an array of questions with specified [names](https://surveyjs.io/form-library/documentation/api-reference/question#name).
|
|
59724
59856
|
* @param names An array of question names.
|
|
59725
|
-
* @param caseInsensitive (Optional) A Boolean value that specifies case sensitivity when searching for the questions. Default value: `false` (uppercase and lowercase letters are treated as distinct).
|
|
59857
|
+
* @param caseInsensitive *(Optional)* A Boolean value that specifies case sensitivity when searching for the questions. Default value: `false` (uppercase and lowercase letters are treated as distinct).
|
|
59726
59858
|
* @returns An array of questions with specified names
|
|
59727
59859
|
* @see getAllQuestions
|
|
59728
59860
|
*/
|
|
@@ -59840,7 +59972,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
59840
59972
|
/**
|
|
59841
59973
|
* Returns a [panel](https://surveyjs.io/form-library/documentation/api-reference/panel-model) with a specified [`name`](https://surveyjs.io/form-library/documentation/api-reference/panel-model#name).
|
|
59842
59974
|
* @param name A panel name.
|
|
59843
|
-
* @param caseInsensitive (Optional) A Boolean value that specifies case sensitivity when searching for the panel. Default value: `false` (uppercase and lowercase letters are treated as distinct).
|
|
59975
|
+
* @param caseInsensitive *(Optional)* A Boolean value that specifies case sensitivity when searching for the panel. Default value: `false` (uppercase and lowercase letters are treated as distinct).
|
|
59844
59976
|
* @returns A panel with a specified name.
|
|
59845
59977
|
* @see getAllPanels
|
|
59846
59978
|
*/
|
|
@@ -60154,8 +60286,8 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
60154
60286
|
this.calculatedValues[i].doCalculation(this.calculatedValues, this.conditionValues, properties);
|
|
60155
60287
|
}
|
|
60156
60288
|
_super.prototype.runConditionCore.call(this, this.conditionValues, properties);
|
|
60157
|
-
for (var
|
|
60158
|
-
pages[
|
|
60289
|
+
for (var i_2 = 0; i_2 < pages.length; i_2++) {
|
|
60290
|
+
pages[i_2].runCondition(this.conditionValues, properties);
|
|
60159
60291
|
}
|
|
60160
60292
|
};
|
|
60161
60293
|
SurveyModel.prototype.runQuestionsTriggers = function (name, value) {
|
|
@@ -60327,13 +60459,13 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
60327
60459
|
page.num = isPageVisible ? page.visibleIndex + 1 : -1;
|
|
60328
60460
|
}
|
|
60329
60461
|
};
|
|
60330
|
-
SurveyModel.prototype.fromJSON = function (json) {
|
|
60462
|
+
SurveyModel.prototype.fromJSON = function (json, options) {
|
|
60331
60463
|
if (!json)
|
|
60332
60464
|
return;
|
|
60333
60465
|
this.questionHashesClear();
|
|
60334
60466
|
this.jsonErrors = null;
|
|
60335
60467
|
var jsonConverter = new _jsonobject__WEBPACK_IMPORTED_MODULE_1__["JsonObject"]();
|
|
60336
|
-
jsonConverter.toObject(json, this);
|
|
60468
|
+
jsonConverter.toObject(json, this, options);
|
|
60337
60469
|
if (jsonConverter.errors.length > 0) {
|
|
60338
60470
|
this.jsonErrors = jsonConverter.errors;
|
|
60339
60471
|
}
|
|
@@ -60672,6 +60804,8 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
60672
60804
|
SurveyModel.prototype.setValue = function (name, newQuestionValue, locNotification, allowNotifyValueChanged, questionName) {
|
|
60673
60805
|
if (locNotification === void 0) { locNotification = false; }
|
|
60674
60806
|
if (allowNotifyValueChanged === void 0) { allowNotifyValueChanged = true; }
|
|
60807
|
+
if (this.isCreatingPagesForPreview)
|
|
60808
|
+
return;
|
|
60675
60809
|
var newValue = newQuestionValue;
|
|
60676
60810
|
if (allowNotifyValueChanged) {
|
|
60677
60811
|
newValue = this.questionOnValueChanging(name, newQuestionValue);
|
|
@@ -61404,6 +61538,9 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61404
61538
|
return this.getLocalizationFormatString(strName, surveySpent, surveyLimit);
|
|
61405
61539
|
};
|
|
61406
61540
|
SurveyModel.prototype.getDisplayClockTime = function (val) {
|
|
61541
|
+
if (val < 0) {
|
|
61542
|
+
val = 0;
|
|
61543
|
+
}
|
|
61407
61544
|
var min = Math.floor(val / 60);
|
|
61408
61545
|
var sec = val % 60;
|
|
61409
61546
|
var secStr = sec.toString();
|
|
@@ -61759,7 +61896,19 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61759
61896
|
}
|
|
61760
61897
|
}
|
|
61761
61898
|
else if (this.state === "running" && isStrCiEqual(layoutElement.id, "progress-" + this.progressBarType)) {
|
|
61762
|
-
|
|
61899
|
+
var headerLayoutElement = this.layoutElements.filter(function (a) { return a.id === "advanced-header"; })[0];
|
|
61900
|
+
var advHeader = headerLayoutElement && headerLayoutElement.data;
|
|
61901
|
+
var isBelowHeader = !advHeader || advHeader.hasBackground;
|
|
61902
|
+
if (container === "header" && !isBelowHeader) {
|
|
61903
|
+
layoutElement.index = -150;
|
|
61904
|
+
if (this.isShowProgressBarOnTop && !this.isShowStartingPage) {
|
|
61905
|
+
containerLayoutElements.push(layoutElement);
|
|
61906
|
+
}
|
|
61907
|
+
}
|
|
61908
|
+
if (container === "center" && isBelowHeader) {
|
|
61909
|
+
if (!!layoutElement.index) {
|
|
61910
|
+
delete layoutElement.index;
|
|
61911
|
+
}
|
|
61763
61912
|
if (this.isShowProgressBarOnTop && !this.isShowStartingPage) {
|
|
61764
61913
|
containerLayoutElements.push(layoutElement);
|
|
61765
61914
|
}
|
|
@@ -62042,7 +62191,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
|
|
|
62042
62191
|
onSetValue: function (obj, value, jsonConverter) {
|
|
62043
62192
|
obj.pages.splice(0, obj.pages.length);
|
|
62044
62193
|
var page = obj.addNewPage("");
|
|
62045
|
-
jsonConverter.toObject({ questions: value }, page);
|
|
62194
|
+
jsonConverter.toObject({ questions: value }, page, jsonConverter === null || jsonConverter === void 0 ? void 0 : jsonConverter.options);
|
|
62046
62195
|
},
|
|
62047
62196
|
},
|
|
62048
62197
|
{
|