survey-core 1.9.122 → 1.9.124
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 +1 -1
- package/defaultV2.css +79 -33
- package/defaultV2.css.map +1 -1
- package/defaultV2.fontless.css +79 -33
- package/defaultV2.fontless.css.map +1 -1
- package/defaultV2.fontless.min.css +3 -3
- package/defaultV2.min.css +3 -3
- package/i18n/arabic.js +2 -2
- package/i18n/arabic.min.js +2 -2
- package/i18n/basque.js +2 -2
- package/i18n/basque.min.js +2 -2
- package/i18n/bulgarian.js +2 -2
- package/i18n/bulgarian.min.js +2 -2
- package/i18n/catalan.js +2 -2
- package/i18n/catalan.min.js +2 -2
- package/i18n/croatian.js +2 -2
- package/i18n/croatian.min.js +2 -2
- package/i18n/czech.js +2 -2
- package/i18n/czech.min.js +2 -2
- package/i18n/danish.js +2 -2
- package/i18n/danish.min.js +2 -2
- package/i18n/dutch.js +2 -2
- package/i18n/dutch.min.js +2 -2
- package/i18n/english.js +2 -2
- package/i18n/english.min.js +2 -2
- package/i18n/estonian.js +2 -2
- package/i18n/estonian.min.js +2 -2
- package/i18n/finnish.js +2 -2
- package/i18n/finnish.min.js +2 -2
- package/i18n/french.js +2 -2
- package/i18n/french.min.js +2 -2
- package/i18n/georgian.js +2 -2
- package/i18n/georgian.min.js +2 -2
- package/i18n/german.js +2 -2
- package/i18n/german.min.js +2 -2
- package/i18n/greek.js +2 -2
- package/i18n/greek.min.js +2 -2
- package/i18n/hebrew.js +2 -2
- package/i18n/hebrew.min.js +2 -2
- package/i18n/hindi.js +2 -2
- package/i18n/hindi.min.js +2 -2
- package/i18n/hungarian.js +2 -2
- package/i18n/hungarian.min.js +2 -2
- package/i18n/icelandic.js +2 -2
- package/i18n/icelandic.min.js +2 -2
- package/i18n/index.js +2 -2
- package/i18n/index.min.js +2 -2
- package/i18n/indonesian.js +2 -2
- package/i18n/indonesian.min.js +2 -2
- package/i18n/italian.js +2 -2
- package/i18n/italian.min.js +2 -2
- package/i18n/japanese.js +2 -2
- package/i18n/japanese.min.js +2 -2
- package/i18n/kazakh.js +2 -2
- package/i18n/kazakh.min.js +2 -2
- package/i18n/korean.js +2 -2
- package/i18n/korean.min.js +2 -2
- package/i18n/latvian.js +2 -2
- package/i18n/latvian.min.js +2 -2
- package/i18n/lithuanian.js +2 -2
- package/i18n/lithuanian.min.js +2 -2
- package/i18n/macedonian.js +2 -2
- package/i18n/macedonian.min.js +2 -2
- package/i18n/malay.js +2 -2
- package/i18n/malay.min.js +2 -2
- package/i18n/nl-BE.js +2 -2
- package/i18n/nl-BE.min.js +2 -2
- package/i18n/norwegian.js +2 -2
- package/i18n/norwegian.min.js +2 -2
- package/i18n/persian.js +2 -2
- package/i18n/persian.min.js +2 -2
- package/i18n/polish.js +2 -2
- package/i18n/polish.min.js +2 -2
- package/i18n/portuguese-br.js +2 -2
- package/i18n/portuguese-br.min.js +2 -2
- package/i18n/portuguese.js +2 -2
- package/i18n/portuguese.min.js +2 -2
- package/i18n/romanian.js +2 -2
- package/i18n/romanian.min.js +2 -2
- package/i18n/russian.js +2 -2
- package/i18n/russian.min.js +2 -2
- package/i18n/serbian.js +2 -2
- package/i18n/serbian.min.js +2 -2
- package/i18n/simplified-chinese.js +2 -2
- package/i18n/simplified-chinese.min.js +2 -2
- package/i18n/slovak.js +2 -2
- package/i18n/slovak.min.js +2 -2
- package/i18n/spanish.js +2 -2
- package/i18n/spanish.min.js +2 -2
- package/i18n/swahili.js +2 -2
- package/i18n/swahili.min.js +2 -2
- package/i18n/swedish.js +2 -2
- package/i18n/swedish.min.js +2 -2
- package/i18n/tajik.js +2 -2
- package/i18n/tajik.min.js +2 -2
- package/i18n/telugu.js +2 -2
- package/i18n/telugu.min.js +2 -2
- package/i18n/thai.js +2 -2
- package/i18n/thai.min.js +2 -2
- package/i18n/traditional-chinese.js +2 -2
- package/i18n/traditional-chinese.min.js +2 -2
- package/i18n/turkish.js +2 -2
- package/i18n/turkish.min.js +2 -2
- package/i18n/ukrainian.js +2 -2
- package/i18n/ukrainian.min.js +2 -2
- package/i18n/urdu.js +2 -2
- package/i18n/urdu.min.js +2 -2
- package/i18n/vietnamese.js +2 -2
- package/i18n/vietnamese.min.js +2 -2
- package/i18n/welsh.js +2 -2
- package/i18n/welsh.min.js +2 -2
- package/modern.css +2 -9
- package/modern.css.map +1 -1
- package/modern.fontless.css +2 -9
- package/modern.fontless.css.map +1 -1
- package/modern.fontless.min.css +3 -3
- package/modern.min.css +3 -3
- package/package.json +1 -1
- package/plugins/bootstrap-integration.js +2 -2
- package/plugins/bootstrap-integration.min.js +2 -2
- package/plugins/bootstrap-material-integration.js +2 -2
- package/plugins/bootstrap-material-integration.min.js +2 -2
- package/survey.core.js +402 -242
- package/survey.core.js.map +1 -1
- package/survey.core.min.js +4 -4
- package/survey.css +2 -2
- package/survey.css.map +1 -1
- package/survey.i18n.js +2 -2
- package/survey.i18n.min.js +2 -2
- package/survey.min.css +2 -2
- package/themes/borderless-dark-panelless.js +3 -2
- package/themes/borderless-dark-panelless.js.map +1 -1
- package/themes/borderless-dark-panelless.min.js +3 -3
- package/themes/borderless-dark.js +3 -2
- package/themes/borderless-dark.js.map +1 -1
- package/themes/borderless-dark.min.js +3 -3
- package/themes/borderless-light-panelless..js +3 -2
- package/themes/borderless-light-panelless..js.map +1 -1
- package/themes/borderless-light-panelless..min.js +3 -3
- package/themes/borderless-light.js +3 -2
- package/themes/borderless-light.js.map +1 -1
- package/themes/borderless-light.min.js +3 -3
- package/themes/contrast-dark-panelless.js +3 -2
- package/themes/contrast-dark-panelless.js.map +1 -1
- package/themes/contrast-dark-panelless.min.js +3 -3
- package/themes/contrast-dark.js +3 -2
- package/themes/contrast-dark.js.map +1 -1
- package/themes/contrast-dark.min.js +3 -3
- package/themes/contrast-light-panelless.js +3 -2
- package/themes/contrast-light-panelless.js.map +1 -1
- package/themes/contrast-light-panelless.min.js +3 -3
- package/themes/contrast-light.js +3 -2
- package/themes/contrast-light.js.map +1 -1
- package/themes/contrast-light.min.js +3 -3
- package/themes/default-dark-panelless.js +3 -2
- package/themes/default-dark-panelless.js.map +1 -1
- package/themes/default-dark-panelless.min.js +3 -3
- package/themes/default-dark.js +3 -2
- package/themes/default-dark.js.map +1 -1
- package/themes/default-dark.min.js +3 -3
- package/themes/default-light-panelless.js +3 -2
- package/themes/default-light-panelless.js.map +1 -1
- package/themes/default-light-panelless.min.js +3 -3
- package/themes/default-light.js +3 -2
- package/themes/default-light.js.map +1 -1
- package/themes/default-light.min.js +3 -3
- package/themes/doubleborder-dark-panelless.js +3 -2
- package/themes/doubleborder-dark-panelless.js.map +1 -1
- package/themes/doubleborder-dark-panelless.min.js +3 -3
- package/themes/doubleborder-dark.js +3 -2
- package/themes/doubleborder-dark.js.map +1 -1
- package/themes/doubleborder-dark.min.js +3 -3
- package/themes/doubleborder-light-panelles.js +3 -2
- package/themes/doubleborder-light-panelles.js.map +1 -1
- package/themes/doubleborder-light-panelles.min.js +3 -3
- package/themes/doubleborder-light.js +3 -2
- package/themes/doubleborder-light.js.map +1 -1
- package/themes/doubleborder-light.min.js +3 -3
- package/themes/flat-dark-panelless.js +3 -2
- package/themes/flat-dark-panelless.js.map +1 -1
- package/themes/flat-dark-panelless.min.js +3 -3
- package/themes/flat-dark.js +3 -2
- package/themes/flat-dark.js.map +1 -1
- package/themes/flat-dark.min.js +3 -3
- package/themes/flat-light-panelless.js +3 -2
- package/themes/flat-light-panelless.js.map +1 -1
- package/themes/flat-light-panelless.min.js +3 -3
- package/themes/flat-light.js +3 -2
- package/themes/flat-light.js.map +1 -1
- package/themes/flat-light.min.js +3 -3
- package/themes/index.js +42 -2
- package/themes/index.js.map +1 -1
- package/themes/index.min.js +3 -3
- package/themes/layered-dark-panelless.js +3 -2
- package/themes/layered-dark-panelless.js.map +1 -1
- package/themes/layered-dark-panelless.min.js +3 -3
- package/themes/layered-dark.js +3 -2
- package/themes/layered-dark.js.map +1 -1
- package/themes/layered-dark.min.js +3 -3
- package/themes/layered-light-panelless.js +3 -2
- package/themes/layered-light-panelless.js.map +1 -1
- package/themes/layered-light-panelless.min.js +3 -3
- package/themes/layered-light.js +3 -2
- package/themes/layered-light.js.map +1 -1
- package/themes/layered-light.min.js +3 -3
- package/themes/plain-dark-panelless.js +3 -2
- package/themes/plain-dark-panelless.js.map +1 -1
- package/themes/plain-dark-panelless.min.js +3 -3
- package/themes/plain-dark.js +3 -2
- package/themes/plain-dark.js.map +1 -1
- package/themes/plain-dark.min.js +3 -3
- package/themes/plain-light-panelless.js +3 -2
- package/themes/plain-light-panelless.js.map +1 -1
- package/themes/plain-light-panelless.min.js +3 -3
- package/themes/plain-light.js +3 -2
- package/themes/plain-light.js.map +1 -1
- package/themes/plain-light.min.js +3 -3
- package/themes/sharp-dark-panelless.js +3 -2
- package/themes/sharp-dark-panelless.js.map +1 -1
- package/themes/sharp-dark-panelless.min.js +3 -3
- package/themes/sharp-dark.js +3 -2
- package/themes/sharp-dark.js.map +1 -1
- package/themes/sharp-dark.min.js +3 -3
- package/themes/sharp-light-panelless.js +3 -2
- package/themes/sharp-light-panelless.js.map +1 -1
- package/themes/sharp-light-panelless.min.js +3 -3
- package/themes/sharp-light.js +3 -2
- package/themes/sharp-light.js.map +1 -1
- package/themes/sharp-light.min.js +3 -3
- package/themes/solid-dark-panelless.js +3 -2
- package/themes/solid-dark-panelless.js.map +1 -1
- package/themes/solid-dark-panelless.min.js +3 -3
- package/themes/solid-dark.js +3 -2
- package/themes/solid-dark.js.map +1 -1
- package/themes/solid-dark.min.js +3 -3
- package/themes/solid-light-panelless.js +3 -2
- package/themes/solid-light-panelless.js.map +1 -1
- package/themes/solid-light-panelless.min.js +3 -3
- package/themes/solid-light.js +3 -2
- package/themes/solid-light.js.map +1 -1
- package/themes/solid-light.min.js +3 -3
- package/themes/three-dimensional-dark-panelless.js +3 -2
- package/themes/three-dimensional-dark-panelless.js.map +1 -1
- package/themes/three-dimensional-dark-panelless.min.js +3 -3
- package/themes/three-dimensional-dark.js +3 -2
- package/themes/three-dimensional-dark.js.map +1 -1
- package/themes/three-dimensional-dark.min.js +3 -3
- package/themes/three-dimensional-light-panelless.js +3 -2
- package/themes/three-dimensional-light-panelless.js.map +1 -1
- package/themes/three-dimensional-light-panelless.min.js +3 -3
- package/themes/three-dimensional-light.js +3 -2
- package/themes/three-dimensional-light.js.map +1 -1
- package/themes/three-dimensional-light.min.js +3 -3
- 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 +3 -0
- package/ts3.4/typings/base.d.ts +5 -2
- package/ts3.4/typings/choicesRestful.d.ts +6 -1
- package/ts3.4/typings/entries/chunks/model.d.ts +1 -1
- 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 +8 -3
- package/ts3.4/typings/question_boolean.d.ts +2 -2
- package/ts3.4/typings/question_matrix.d.ts +5 -0
- package/ts3.4/typings/question_matrixdropdownbase.d.ts +1 -1
- package/ts3.4/typings/question_matrixdropdownrendered.d.ts +2 -4
- package/ts3.4/typings/question_matrixdynamic.d.ts +1 -0
- package/ts3.4/typings/question_paneldynamic.d.ts +16 -0
- package/ts3.4/typings/question_tagbox.d.ts +2 -1
- package/ts3.4/typings/settings.d.ts +15 -85
- package/ts3.4/typings/survey.d.ts +11 -2
- package/ts3.4/typings/utils/devices.d.ts +5 -0
- package/ts3.4/typings/validator.d.ts +2 -0
- package/typings/base-interfaces.d.ts +3 -0
- package/typings/base.d.ts +5 -2
- package/typings/choicesRestful.d.ts +10 -2
- package/typings/entries/chunks/model.d.ts +1 -1
- 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 +8 -3
- package/typings/question_boolean.d.ts +4 -4
- package/typings/question_matrix.d.ts +5 -0
- package/typings/question_matrixdropdownbase.d.ts +1 -1
- package/typings/question_matrixdropdownrendered.d.ts +2 -4
- package/typings/question_matrixdynamic.d.ts +1 -0
- package/typings/question_paneldynamic.d.ts +17 -0
- 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.d.ts +12 -2
- package/typings/utils/devices.d.ts +5 -0
- package/typings/validator.d.ts +3 -0
package/survey.core.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.9.
|
|
3
|
-
* Copyright (c) 2015-
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.9.124
|
|
3
|
+
* Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
6
6
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -1964,6 +1964,13 @@ var Base = /** @class */ (function () {
|
|
|
1964
1964
|
enumerable: false,
|
|
1965
1965
|
configurable: true
|
|
1966
1966
|
});
|
|
1967
|
+
Object.defineProperty(Base.prototype, "isDesignModeV2", {
|
|
1968
|
+
get: function () {
|
|
1969
|
+
return _settings__WEBPACK_IMPORTED_MODULE_3__["settings"].supportCreatorV2 && this.isDesignMode;
|
|
1970
|
+
},
|
|
1971
|
+
enumerable: false,
|
|
1972
|
+
configurable: true
|
|
1973
|
+
});
|
|
1967
1974
|
Object.defineProperty(Base.prototype, "inSurvey", {
|
|
1968
1975
|
/**
|
|
1969
1976
|
* Returns `true` if the object is included in a survey.
|
|
@@ -2029,10 +2036,12 @@ var Base = /** @class */ (function () {
|
|
|
2029
2036
|
* 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
2037
|
*
|
|
2031
2038
|
* @param json A JSON object with properties that you want to apply to the current SurveyJS object.
|
|
2039
|
+
* @param options An object with configuration options.
|
|
2040
|
+
* @param {boolean} options.validatePropertyValues Pass `true` if you want to validate property values. Use the [`jsonErrors`](#jsonErrors) array to access validation errors.
|
|
2032
2041
|
* @see toJSON
|
|
2033
2042
|
*/
|
|
2034
|
-
Base.prototype.fromJSON = function (json) {
|
|
2035
|
-
new _jsonobject__WEBPACK_IMPORTED_MODULE_2__["JsonObject"]().toObject(json, this);
|
|
2043
|
+
Base.prototype.fromJSON = function (json, options) {
|
|
2044
|
+
new _jsonobject__WEBPACK_IMPORTED_MODULE_2__["JsonObject"]().toObject(json, this, options);
|
|
2036
2045
|
this.onSurveyLoad();
|
|
2037
2046
|
};
|
|
2038
2047
|
Base.prototype.onSurveyLoad = function () { };
|
|
@@ -2137,6 +2146,7 @@ var Base = /** @class */ (function () {
|
|
|
2137
2146
|
Base.prototype.resetPropertyValue = function (name) {
|
|
2138
2147
|
var locStr = this.localizableStrings ? this.localizableStrings[name] : undefined;
|
|
2139
2148
|
if (locStr) {
|
|
2149
|
+
this.setLocalizableStringText(name, undefined);
|
|
2140
2150
|
locStr.clear();
|
|
2141
2151
|
}
|
|
2142
2152
|
else {
|
|
@@ -3135,7 +3145,7 @@ var XmlParser = /** @class */ (function () {
|
|
|
3135
3145
|
* }
|
|
3136
3146
|
* ```
|
|
3137
3147
|
*
|
|
3138
|
-
* Typically, you should assign this object to a question's [`choicesByUrl`](https://surveyjs.io/Documentation/Library?id=QuestionSelectBase#choicesByUrl) property.
|
|
3148
|
+
* 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
3149
|
*/
|
|
3140
3150
|
var ChoicesRestful = /** @class */ (function (_super) {
|
|
3141
3151
|
__extends(ChoicesRestful, _super);
|
|
@@ -3150,6 +3160,10 @@ var ChoicesRestful = /** @class */ (function (_super) {
|
|
|
3150
3160
|
_this.createItemValue = function (value) {
|
|
3151
3161
|
return new _itemvalue__WEBPACK_IMPORTED_MODULE_1__["ItemValue"](value);
|
|
3152
3162
|
};
|
|
3163
|
+
_this.registerPropertyChangedHandlers(["url"], function () {
|
|
3164
|
+
if (_this.owner)
|
|
3165
|
+
_this.owner.setPropertyValue("isUsingRestful", !!_this.url);
|
|
3166
|
+
});
|
|
3153
3167
|
return _this;
|
|
3154
3168
|
}
|
|
3155
3169
|
Object.defineProperty(ChoicesRestful, "EncodeParameters", {
|
|
@@ -3193,6 +3207,16 @@ var ChoicesRestful = /** @class */ (function (_super) {
|
|
|
3193
3207
|
}
|
|
3194
3208
|
}
|
|
3195
3209
|
};
|
|
3210
|
+
Object.defineProperty(ChoicesRestful, "onBeforeSendRequest", {
|
|
3211
|
+
get: function () {
|
|
3212
|
+
return _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].web.onBeforeRequestChoices;
|
|
3213
|
+
},
|
|
3214
|
+
set: function (val) {
|
|
3215
|
+
_settings__WEBPACK_IMPORTED_MODULE_4__["settings"].web.onBeforeRequestChoices = val;
|
|
3216
|
+
},
|
|
3217
|
+
enumerable: false,
|
|
3218
|
+
configurable: true
|
|
3219
|
+
});
|
|
3196
3220
|
ChoicesRestful.getCachedItemsResult = function (obj) {
|
|
3197
3221
|
var hash = obj.objHash;
|
|
3198
3222
|
var res = ChoicesRestful.itemsResult[hash];
|
|
@@ -3329,8 +3353,8 @@ var ChoicesRestful = /** @class */ (function (_super) {
|
|
|
3329
3353
|
}
|
|
3330
3354
|
};
|
|
3331
3355
|
var options = { request: xhr };
|
|
3332
|
-
if (!!
|
|
3333
|
-
|
|
3356
|
+
if (!!_settings__WEBPACK_IMPORTED_MODULE_4__["settings"].web.onBeforeRequestChoices) {
|
|
3357
|
+
_settings__WEBPACK_IMPORTED_MODULE_4__["settings"].web.onBeforeRequestChoices(this, options);
|
|
3334
3358
|
}
|
|
3335
3359
|
this.beforeSendRequest();
|
|
3336
3360
|
options.request.send();
|
|
@@ -3432,7 +3456,7 @@ var ChoicesRestful = /** @class */ (function (_super) {
|
|
|
3432
3456
|
* @see titleName
|
|
3433
3457
|
*/
|
|
3434
3458
|
get: function () {
|
|
3435
|
-
return this.getPropertyValue("url"
|
|
3459
|
+
return this.getPropertyValue("url") || "";
|
|
3436
3460
|
},
|
|
3437
3461
|
set: function (val) {
|
|
3438
3462
|
this.setPropertyValue("url", val);
|
|
@@ -3470,8 +3494,7 @@ var ChoicesRestful = /** @class */ (function (_super) {
|
|
|
3470
3494
|
* @see titleName
|
|
3471
3495
|
*/
|
|
3472
3496
|
get: function () {
|
|
3473
|
-
|
|
3474
|
-
return !!res ? res : "";
|
|
3497
|
+
return this.getPropertyValue("path") || "";
|
|
3475
3498
|
},
|
|
3476
3499
|
set: function (val) {
|
|
3477
3500
|
this.setPropertyValue("path", val);
|
|
@@ -3533,6 +3556,11 @@ var ChoicesRestful = /** @class */ (function (_super) {
|
|
|
3533
3556
|
configurable: true
|
|
3534
3557
|
});
|
|
3535
3558
|
Object.defineProperty(ChoicesRestful.prototype, "allowEmptyResponse", {
|
|
3559
|
+
/**
|
|
3560
|
+
* Specifies whether the service is allowed to return an empty response or an empty array in a response.
|
|
3561
|
+
*
|
|
3562
|
+
* Default value: `false`
|
|
3563
|
+
*/
|
|
3536
3564
|
get: function () {
|
|
3537
3565
|
return this.getPropertyValue("allowEmptyResponse");
|
|
3538
3566
|
},
|
|
@@ -3767,10 +3795,10 @@ var ChoicesRestfull = /** @class */ (function (_super) {
|
|
|
3767
3795
|
};
|
|
3768
3796
|
Object.defineProperty(ChoicesRestfull, "onBeforeSendRequest", {
|
|
3769
3797
|
get: function () {
|
|
3770
|
-
return
|
|
3798
|
+
return _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].web.onBeforeRequestChoices;
|
|
3771
3799
|
},
|
|
3772
3800
|
set: function (val) {
|
|
3773
|
-
|
|
3801
|
+
_settings__WEBPACK_IMPORTED_MODULE_4__["settings"].web.onBeforeRequestChoices = val;
|
|
3774
3802
|
},
|
|
3775
3803
|
enumerable: false,
|
|
3776
3804
|
configurable: true
|
|
@@ -6128,8 +6156,6 @@ var DragDropInfo = /** @class */ (function () {
|
|
|
6128
6156
|
__webpack_require__.r(__webpack_exports__);
|
|
6129
6157
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragDropPageHelperV1", function() { return DragDropPageHelperV1; });
|
|
6130
6158
|
/* harmony import */ var _drag_drop_helper_v1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./drag-drop-helper-v1 */ "./src/drag-drop-helper-v1.ts");
|
|
6131
|
-
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
|
|
6132
|
-
|
|
6133
6159
|
|
|
6134
6160
|
var DragDropPageHelperV1 = /** @class */ (function () {
|
|
6135
6161
|
function DragDropPageHelperV1(page) {
|
|
@@ -6227,7 +6253,7 @@ var DragDropPageHelperV1 = /** @class */ (function () {
|
|
|
6227
6253
|
var elementsToResetSWNL = [];
|
|
6228
6254
|
if (!isCancel && !!row) {
|
|
6229
6255
|
var isSamePanel = false;
|
|
6230
|
-
if (this.page.
|
|
6256
|
+
if (this.page.isDesignModeV2) {
|
|
6231
6257
|
var srcRow = src && src.parent && src.parent.dragDropFindRow(src);
|
|
6232
6258
|
if (row.panel.elements[targetIndex] && row.panel.elements[targetIndex].startWithNewLine && row.elements.length > 1 && row.panel.elements[targetIndex] === dest) {
|
|
6233
6259
|
elementsToSetSWNL.push(target);
|
|
@@ -6246,8 +6272,8 @@ var DragDropPageHelperV1 = /** @class */ (function () {
|
|
|
6246
6272
|
elementsToResetSWNL.push(target);
|
|
6247
6273
|
}
|
|
6248
6274
|
}
|
|
6275
|
+
this.page.survey.startMovingQuestion();
|
|
6249
6276
|
if (!!src && !!src.parent) {
|
|
6250
|
-
this.page.survey.startMovingQuestion();
|
|
6251
6277
|
isSamePanel = row.panel == src.parent;
|
|
6252
6278
|
if (isSamePanel) {
|
|
6253
6279
|
row.panel.dragDropMoveElement(src, target, targetIndex);
|
|
@@ -6290,7 +6316,7 @@ var DragDropPageHelperV1 = /** @class */ (function () {
|
|
|
6290
6316
|
var destination = this.dragDropInfo.destination;
|
|
6291
6317
|
if (!this.dragDropCanDropCore(source, destination))
|
|
6292
6318
|
return false;
|
|
6293
|
-
if (this.page.
|
|
6319
|
+
if (this.page.isDesignModeV2) {
|
|
6294
6320
|
var rowSource = this.page.dragDropFindRow(source);
|
|
6295
6321
|
var rowDestination = this.page.dragDropFindRow(destination);
|
|
6296
6322
|
if (rowSource !== rowDestination) {
|
|
@@ -6356,8 +6382,6 @@ var DragDropPageHelperV1 = /** @class */ (function () {
|
|
|
6356
6382
|
__webpack_require__.r(__webpack_exports__);
|
|
6357
6383
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragDropPanelHelperV1", function() { return DragDropPanelHelperV1; });
|
|
6358
6384
|
/* harmony import */ var _drag_drop_helper_v1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./drag-drop-helper-v1 */ "./src/drag-drop-helper-v1.ts");
|
|
6359
|
-
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
|
|
6360
|
-
|
|
6361
6385
|
|
|
6362
6386
|
var DragDropPanelHelperV1 = /** @class */ (function () {
|
|
6363
6387
|
function DragDropPanelHelperV1(panel) {
|
|
@@ -6462,7 +6486,7 @@ var DragDropPanelHelperV1 = /** @class */ (function () {
|
|
|
6462
6486
|
var index = destRow.elements.indexOf(dragDropInfo.destination);
|
|
6463
6487
|
if (index == 0 &&
|
|
6464
6488
|
!dragDropInfo.isBottom) {
|
|
6465
|
-
if (this.panel.
|
|
6489
|
+
if (this.panel.isDesignModeV2) {
|
|
6466
6490
|
}
|
|
6467
6491
|
else if (destRow.elements[0].startWithNewLine) {
|
|
6468
6492
|
if (destRow.index > 0) {
|
|
@@ -6500,7 +6524,7 @@ var DragDropPanelHelperV1 = /** @class */ (function () {
|
|
|
6500
6524
|
};
|
|
6501
6525
|
DragDropPanelHelperV1.prototype.dragDropAddTargetToNewRow = function (dragDropInfo, destRow, prevRow) {
|
|
6502
6526
|
var targetRow = destRow.panel.createRowAndSetLazy(destRow.panel.rows.length);
|
|
6503
|
-
if (this.panel.
|
|
6527
|
+
if (this.panel.isDesignModeV2) {
|
|
6504
6528
|
targetRow.setIsLazyRendering(false);
|
|
6505
6529
|
}
|
|
6506
6530
|
targetRow.addElement(dragDropInfo.target);
|
|
@@ -9315,8 +9339,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9315
9339
|
//import "../../modern.scss";
|
|
9316
9340
|
var Version;
|
|
9317
9341
|
var ReleaseDate;
|
|
9318
|
-
Version = "" + "1.9.
|
|
9319
|
-
ReleaseDate = "" + "
|
|
9342
|
+
Version = "" + "1.9.124";
|
|
9343
|
+
ReleaseDate = "" + "2024-01-04";
|
|
9320
9344
|
function checkLibraryVersion(ver, libraryName) {
|
|
9321
9345
|
if (Version != ver) {
|
|
9322
9346
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
|
@@ -15756,7 +15780,7 @@ var Helpers = /** @class */ (function () {
|
|
|
15756
15780
|
if (x["equals"])
|
|
15757
15781
|
return x.equals(y);
|
|
15758
15782
|
if (!!x.toJSON && !!y.toJSON && !!x.getType && !!y.getType) {
|
|
15759
|
-
if (x.
|
|
15783
|
+
if (x.isDisposed || y.isDisposed)
|
|
15760
15784
|
return false;
|
|
15761
15785
|
if (x.getType() !== y.getType())
|
|
15762
15786
|
return false;
|
|
@@ -17164,7 +17188,7 @@ var ItemValue = /** @class */ (function (_super) {
|
|
|
17164
17188
|
};
|
|
17165
17189
|
Object.defineProperty(ItemValue.prototype, "visibleIf", {
|
|
17166
17190
|
get: function () {
|
|
17167
|
-
return this.
|
|
17191
|
+
return this.getPropertyValueWithoutDefault("visibleIf") || "";
|
|
17168
17192
|
},
|
|
17169
17193
|
set: function (val) {
|
|
17170
17194
|
this.setPropertyValue("visibleIf", val);
|
|
@@ -17174,7 +17198,7 @@ var ItemValue = /** @class */ (function (_super) {
|
|
|
17174
17198
|
});
|
|
17175
17199
|
Object.defineProperty(ItemValue.prototype, "enableIf", {
|
|
17176
17200
|
get: function () {
|
|
17177
|
-
return this.
|
|
17201
|
+
return this.getPropertyValueWithoutDefault("enableIf") || "";
|
|
17178
17202
|
},
|
|
17179
17203
|
set: function (val) {
|
|
17180
17204
|
this.setPropertyValue("enableIf", val);
|
|
@@ -17184,7 +17208,8 @@ var ItemValue = /** @class */ (function (_super) {
|
|
|
17184
17208
|
});
|
|
17185
17209
|
Object.defineProperty(ItemValue.prototype, "isVisible", {
|
|
17186
17210
|
get: function () {
|
|
17187
|
-
|
|
17211
|
+
var res = this.getPropertyValueWithoutDefault("isVisible");
|
|
17212
|
+
return res !== undefined ? res : true;
|
|
17188
17213
|
},
|
|
17189
17214
|
enumerable: false,
|
|
17190
17215
|
configurable: true
|
|
@@ -17194,7 +17219,8 @@ var ItemValue = /** @class */ (function (_super) {
|
|
|
17194
17219
|
};
|
|
17195
17220
|
Object.defineProperty(ItemValue.prototype, "isEnabled", {
|
|
17196
17221
|
get: function () {
|
|
17197
|
-
|
|
17222
|
+
var res = this.getPropertyValueWithoutDefault("isEnabled");
|
|
17223
|
+
return res !== undefined ? res : true;
|
|
17198
17224
|
},
|
|
17199
17225
|
enumerable: false,
|
|
17200
17226
|
configurable: true
|
|
@@ -17339,7 +17365,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("itemvalue", [
|
|
|
17339
17365
|
/*!***************************!*\
|
|
17340
17366
|
!*** ./src/jsonobject.ts ***!
|
|
17341
17367
|
\***************************/
|
|
17342
|
-
/*! exports provided: property, propertyArray, JsonObjectProperty, CustomPropertiesCollection, JsonMetadataClass, JsonMetadata, JsonError, JsonUnknownPropertyError, JsonMissingTypeErrorBase, JsonMissingTypeError, JsonIncorrectTypeError, JsonRequiredPropertyError, JsonRequiredArrayPropertyError, JsonObject, Serializer */
|
|
17368
|
+
/*! exports provided: property, propertyArray, JsonObjectProperty, CustomPropertiesCollection, JsonMetadataClass, JsonMetadata, JsonError, JsonUnknownPropertyError, JsonMissingTypeErrorBase, JsonMissingTypeError, JsonIncorrectTypeError, JsonRequiredPropertyError, JsonRequiredArrayPropertyError, JsonIncorrectPropertyValueError, JsonObject, Serializer */
|
|
17343
17369
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
17344
17370
|
|
|
17345
17371
|
"use strict";
|
|
@@ -17357,6 +17383,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17357
17383
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonIncorrectTypeError", function() { return JsonIncorrectTypeError; });
|
|
17358
17384
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonRequiredPropertyError", function() { return JsonRequiredPropertyError; });
|
|
17359
17385
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonRequiredArrayPropertyError", function() { return JsonRequiredArrayPropertyError; });
|
|
17386
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonIncorrectPropertyValueError", function() { return JsonIncorrectPropertyValueError; });
|
|
17360
17387
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonObject", function() { return JsonObject; });
|
|
17361
17388
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Serializer", function() { return Serializer; });
|
|
17362
17389
|
/* harmony import */ var _surveyStrings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./surveyStrings */ "./src/surveyStrings.ts");
|
|
@@ -17693,6 +17720,12 @@ var JsonObjectProperty = /** @class */ (function () {
|
|
|
17693
17720
|
}
|
|
17694
17721
|
}
|
|
17695
17722
|
};
|
|
17723
|
+
JsonObjectProperty.prototype.validateValue = function (value) {
|
|
17724
|
+
var choices = this.choices;
|
|
17725
|
+
if (!Array.isArray(choices) || choices.length === 0)
|
|
17726
|
+
return true;
|
|
17727
|
+
return choices.indexOf(value) > -1;
|
|
17728
|
+
};
|
|
17696
17729
|
JsonObjectProperty.prototype.getObjType = function (objType) {
|
|
17697
17730
|
if (!this.classNamePart)
|
|
17698
17731
|
return objType;
|
|
@@ -18770,8 +18803,8 @@ var JsonMetadata = /** @class */ (function () {
|
|
|
18770
18803
|
};
|
|
18771
18804
|
JsonMetadata.prototype.getChemeRefName = function (className, isRoot) {
|
|
18772
18805
|
//Fix for #6486, according to https://niem.github.io/json/reference/json-schema/references/#:~:text=In%20a%20JSON%20schema%2C%20a,%2C%20an%20in%2Dschema%20reference
|
|
18773
|
-
|
|
18774
|
-
|
|
18806
|
+
//Checked by https://www.jsonschemavalidator.net/
|
|
18807
|
+
return isRoot ? "#/definitions/" + className : className;
|
|
18775
18808
|
};
|
|
18776
18809
|
JsonMetadata.prototype.generateChemaClass = function (className, schemaDef, isRoot) {
|
|
18777
18810
|
if (!!schemaDef[className])
|
|
@@ -18926,6 +18959,17 @@ var JsonRequiredArrayPropertyError = /** @class */ (function (_super) {
|
|
|
18926
18959
|
return JsonRequiredArrayPropertyError;
|
|
18927
18960
|
}(JsonError));
|
|
18928
18961
|
|
|
18962
|
+
var JsonIncorrectPropertyValueError = /** @class */ (function (_super) {
|
|
18963
|
+
__extends(JsonIncorrectPropertyValueError, _super);
|
|
18964
|
+
function JsonIncorrectPropertyValueError(property, value) {
|
|
18965
|
+
var _this = _super.call(this, "incorrectvalue", "The property value: '" + value + "' is incorrect for property '" + property.name + "'.") || this;
|
|
18966
|
+
_this.property = property;
|
|
18967
|
+
_this.value = value;
|
|
18968
|
+
return _this;
|
|
18969
|
+
}
|
|
18970
|
+
return JsonIncorrectPropertyValueError;
|
|
18971
|
+
}(JsonError));
|
|
18972
|
+
|
|
18929
18973
|
var JsonObject = /** @class */ (function () {
|
|
18930
18974
|
function JsonObject() {
|
|
18931
18975
|
this.errors = new Array();
|
|
@@ -18942,14 +18986,14 @@ var JsonObject = /** @class */ (function () {
|
|
|
18942
18986
|
if (storeDefaults === void 0) { storeDefaults = false; }
|
|
18943
18987
|
return this.toJsonObjectCore(obj, null, storeDefaults);
|
|
18944
18988
|
};
|
|
18945
|
-
JsonObject.prototype.toObject = function (jsonObj, obj) {
|
|
18946
|
-
this.toObjectCore(jsonObj, obj);
|
|
18989
|
+
JsonObject.prototype.toObject = function (jsonObj, obj, options) {
|
|
18990
|
+
this.toObjectCore(jsonObj, obj, options);
|
|
18947
18991
|
var error = this.getRequiredError(obj, jsonObj);
|
|
18948
18992
|
if (!!error) {
|
|
18949
18993
|
this.addNewError(error, jsonObj, obj);
|
|
18950
18994
|
}
|
|
18951
18995
|
};
|
|
18952
|
-
JsonObject.prototype.toObjectCore = function (jsonObj, obj) {
|
|
18996
|
+
JsonObject.prototype.toObjectCore = function (jsonObj, obj, options) {
|
|
18953
18997
|
if (!jsonObj)
|
|
18954
18998
|
return;
|
|
18955
18999
|
var properties = null;
|
|
@@ -18967,6 +19011,7 @@ var JsonObject = /** @class */ (function () {
|
|
|
18967
19011
|
obj.startLoadingFromJson(jsonObj);
|
|
18968
19012
|
}
|
|
18969
19013
|
properties = this.addDynamicProperties(obj, jsonObj, properties);
|
|
19014
|
+
this.options = options;
|
|
18970
19015
|
for (var key in jsonObj) {
|
|
18971
19016
|
if (key === JsonObject.typePropertyName)
|
|
18972
19017
|
continue;
|
|
@@ -18981,8 +19026,9 @@ var JsonObject = /** @class */ (function () {
|
|
|
18981
19026
|
}
|
|
18982
19027
|
continue;
|
|
18983
19028
|
}
|
|
18984
|
-
this.valueToObj(jsonObj[key], obj, property, jsonObj);
|
|
19029
|
+
this.valueToObj(jsonObj[key], obj, property, jsonObj, options);
|
|
18985
19030
|
}
|
|
19031
|
+
this.options = undefined;
|
|
18986
19032
|
if (obj.endLoadingFromJson) {
|
|
18987
19033
|
obj.endLoadingFromJson();
|
|
18988
19034
|
}
|
|
@@ -19055,7 +19101,7 @@ var JsonObject = /** @class */ (function () {
|
|
|
19055
19101
|
}
|
|
19056
19102
|
}
|
|
19057
19103
|
};
|
|
19058
|
-
JsonObject.prototype.valueToObj = function (value, obj, property, jsonObj) {
|
|
19104
|
+
JsonObject.prototype.valueToObj = function (value, obj, property, jsonObj, options) {
|
|
19059
19105
|
if (value === null || value === undefined)
|
|
19060
19106
|
return;
|
|
19061
19107
|
this.removePos(property, value);
|
|
@@ -19069,17 +19115,22 @@ var JsonObject = /** @class */ (function () {
|
|
|
19069
19115
|
this.addNewError(new JsonRequiredArrayPropertyError(propName, obj.getType()), !!jsonObj ? jsonObj : value, obj);
|
|
19070
19116
|
}
|
|
19071
19117
|
if (this.isValueArray(value)) {
|
|
19072
|
-
this.valueToArray(value, obj, property.name, property);
|
|
19118
|
+
this.valueToArray(value, obj, property.name, property, options);
|
|
19073
19119
|
return;
|
|
19074
19120
|
}
|
|
19075
19121
|
var newObj = this.createNewObj(value, property);
|
|
19076
19122
|
if (newObj.newObj) {
|
|
19077
|
-
this.toObjectCore(value, newObj.newObj);
|
|
19123
|
+
this.toObjectCore(value, newObj.newObj, options);
|
|
19078
19124
|
value = newObj.newObj;
|
|
19079
19125
|
}
|
|
19080
19126
|
if (!newObj.error) {
|
|
19081
19127
|
if (property != null) {
|
|
19082
19128
|
property.setValue(obj, value, this);
|
|
19129
|
+
if (!!options && options.validatePropertyValues) {
|
|
19130
|
+
if (!property.validateValue(value)) {
|
|
19131
|
+
this.addNewError(new JsonIncorrectPropertyValueError(property, value), jsonObj, obj);
|
|
19132
|
+
}
|
|
19133
|
+
}
|
|
19083
19134
|
}
|
|
19084
19135
|
else {
|
|
19085
19136
|
obj[property.name] = value;
|
|
@@ -19178,17 +19229,17 @@ var JsonObject = /** @class */ (function () {
|
|
|
19178
19229
|
error.at = posObj.start;
|
|
19179
19230
|
error.end = posObj.end;
|
|
19180
19231
|
};
|
|
19181
|
-
JsonObject.prototype.valueToArray = function (value, obj, key, property) {
|
|
19232
|
+
JsonObject.prototype.valueToArray = function (value, obj, key, property, options) {
|
|
19182
19233
|
if (obj[key] && !this.isValueArray(obj[key]))
|
|
19183
19234
|
return;
|
|
19184
19235
|
if (obj[key] && value.length > 0)
|
|
19185
19236
|
obj[key].splice(0, obj[key].length);
|
|
19186
19237
|
var valueRes = obj[key] ? obj[key] : [];
|
|
19187
|
-
this.addValuesIntoArray(value, valueRes, property);
|
|
19238
|
+
this.addValuesIntoArray(value, valueRes, property, options);
|
|
19188
19239
|
if (!obj[key])
|
|
19189
19240
|
obj[key] = valueRes;
|
|
19190
19241
|
};
|
|
19191
|
-
JsonObject.prototype.addValuesIntoArray = function (value, result, property) {
|
|
19242
|
+
JsonObject.prototype.addValuesIntoArray = function (value, result, property, options) {
|
|
19192
19243
|
for (var i = 0; i < value.length; i++) {
|
|
19193
19244
|
var newValue = this.createNewObj(value[i], property);
|
|
19194
19245
|
if (newValue.newObj) {
|
|
@@ -19199,7 +19250,7 @@ var JsonObject = /** @class */ (function () {
|
|
|
19199
19250
|
newValue.newObj.valueName = value[i].valueName.toString();
|
|
19200
19251
|
}
|
|
19201
19252
|
result.push(newValue.newObj);
|
|
19202
|
-
this.toObjectCore(value[i], newValue.newObj);
|
|
19253
|
+
this.toObjectCore(value[i], newValue.newObj, options);
|
|
19203
19254
|
}
|
|
19204
19255
|
else {
|
|
19205
19256
|
if (!newValue.error) {
|
|
@@ -20041,14 +20092,21 @@ var LocalizableString = /** @class */ (function () {
|
|
|
20041
20092
|
if (this.htmlValues[loc] !== undefined)
|
|
20042
20093
|
return !!this.htmlValues[loc];
|
|
20043
20094
|
var renderedText = this.calculatedText;
|
|
20044
|
-
if (!renderedText)
|
|
20095
|
+
if (!renderedText) {
|
|
20096
|
+
this.setHtmlValue(loc, "");
|
|
20045
20097
|
return false;
|
|
20046
|
-
|
|
20098
|
+
}
|
|
20099
|
+
if (!!this.getLocalizationName() && renderedText === this.getLocalizationStr()) {
|
|
20100
|
+
this.setHtmlValue(loc, "");
|
|
20047
20101
|
return false;
|
|
20102
|
+
}
|
|
20048
20103
|
var res = this.owner.getMarkdownHtml(renderedText, this.name);
|
|
20049
|
-
this.
|
|
20104
|
+
this.setHtmlValue(loc, res);
|
|
20050
20105
|
return !!res;
|
|
20051
20106
|
};
|
|
20107
|
+
LocalizableString.prototype.setHtmlValue = function (loc, val) {
|
|
20108
|
+
this.htmlValues[loc] = val;
|
|
20109
|
+
};
|
|
20052
20110
|
LocalizableString.prototype.getHtmlValue = function () {
|
|
20053
20111
|
var loc = this.locale;
|
|
20054
20112
|
if (!loc)
|
|
@@ -26561,8 +26619,7 @@ var Question = /** @class */ (function (_super) {
|
|
|
26561
26619
|
if (this.forceIsInputReadOnly !== undefined) {
|
|
26562
26620
|
return this.forceIsInputReadOnly;
|
|
26563
26621
|
}
|
|
26564
|
-
|
|
26565
|
-
return this.isReadOnly || isDesignModeV2;
|
|
26622
|
+
return this.isReadOnly || this.isDesignModeV2;
|
|
26566
26623
|
},
|
|
26567
26624
|
enumerable: false,
|
|
26568
26625
|
configurable: true
|
|
@@ -27663,6 +27720,9 @@ var Question = /** @class */ (function (_super) {
|
|
|
27663
27720
|
if (this.questionComment === newValue)
|
|
27664
27721
|
return;
|
|
27665
27722
|
this.questionComment = newValue;
|
|
27723
|
+
this.setCommentIntoData(newValue);
|
|
27724
|
+
};
|
|
27725
|
+
Question.prototype.setCommentIntoData = function (newValue) {
|
|
27666
27726
|
if (this.data != null) {
|
|
27667
27727
|
this.data.setComment(this.getValueName(), newValue, this.isSurveyInputTextUpdate ? "text" : false);
|
|
27668
27728
|
}
|
|
@@ -28521,7 +28581,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
28521
28581
|
_this.onVisibleChoicesChanged();
|
|
28522
28582
|
}
|
|
28523
28583
|
});
|
|
28524
|
-
_this.registerPropertyChangedHandlers(["choicesFromQuestion", "choicesFromQuestionMode", "choiceValuesFromQuestion",
|
|
28584
|
+
_this.registerPropertyChangedHandlers(["choicesFromQuestion", "choicesFromQuestionMode", "choiceValuesFromQuestion",
|
|
28585
|
+
"choiceTextsFromQuestion", "showNoneItem", "isUsingRestful"], function () {
|
|
28525
28586
|
_this.onVisibleChoicesChanged();
|
|
28526
28587
|
});
|
|
28527
28588
|
_this.registerPropertyChangedHandlers(["hideIfChoicesEmpty"], function () {
|
|
@@ -28552,7 +28613,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
28552
28613
|
}
|
|
28553
28614
|
Object.defineProperty(QuestionSelectBase.prototype, "waitingChoicesByURL", {
|
|
28554
28615
|
get: function () {
|
|
28555
|
-
return !this.isChoicesLoaded &&
|
|
28616
|
+
return !this.isChoicesLoaded && this.hasChoicesUrl;
|
|
28556
28617
|
},
|
|
28557
28618
|
enumerable: false,
|
|
28558
28619
|
configurable: true
|
|
@@ -28608,6 +28669,16 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
28608
28669
|
var mode = selBaseQuestion ? "select" : (arrayQuestion ? "array" : undefined);
|
|
28609
28670
|
this.setPropertyValue("carryForwardQuestionType", mode);
|
|
28610
28671
|
};
|
|
28672
|
+
Object.defineProperty(QuestionSelectBase.prototype, "isUsingRestful", {
|
|
28673
|
+
get: function () {
|
|
28674
|
+
return this.getPropertyValueWithoutDefault("isUsingRestful") || false;
|
|
28675
|
+
},
|
|
28676
|
+
enumerable: false,
|
|
28677
|
+
configurable: true
|
|
28678
|
+
});
|
|
28679
|
+
QuestionSelectBase.prototype.updateIsUsingRestful = function () {
|
|
28680
|
+
this.setPropertyValueDirectly("isUsingRestful", this.hasChoicesUrl);
|
|
28681
|
+
};
|
|
28611
28682
|
QuestionSelectBase.prototype.supportGoNextPageError = function () {
|
|
28612
28683
|
return !this.isOtherSelected || !!this.otherValue;
|
|
28613
28684
|
};
|
|
@@ -29046,7 +29117,16 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
29046
29117
|
if (this.getStoreOthersAsComment() && !this.autoOtherMode) {
|
|
29047
29118
|
this.prevOtherValue = this.otherValue;
|
|
29048
29119
|
}
|
|
29049
|
-
this.
|
|
29120
|
+
this.makeCommentEmpty = true;
|
|
29121
|
+
this.otherValueCore = "";
|
|
29122
|
+
this.setPropertyValue("comment", "");
|
|
29123
|
+
}
|
|
29124
|
+
};
|
|
29125
|
+
QuestionSelectBase.prototype.setValueCore = function (newValue) {
|
|
29126
|
+
_super.prototype.setValueCore.call(this, newValue);
|
|
29127
|
+
if (this.makeCommentEmpty) {
|
|
29128
|
+
this.setCommentIntoData("");
|
|
29129
|
+
this.makeCommentEmpty = false;
|
|
29050
29130
|
}
|
|
29051
29131
|
};
|
|
29052
29132
|
QuestionSelectBase.prototype.setNewValue = function (newValue) {
|
|
@@ -29106,7 +29186,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
29106
29186
|
var value = this.value;
|
|
29107
29187
|
var valueArray = Array.isArray(value) ? value : [value];
|
|
29108
29188
|
var hasItemWithoutValues = valueArray.some(function (val) { return !_itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].getItemByValue(_this.choices, val); });
|
|
29109
|
-
if (hasItemWithoutValues && (this.choicesLazyLoadEnabled ||
|
|
29189
|
+
if (hasItemWithoutValues && (this.choicesLazyLoadEnabled || this.hasChoicesUrl)) {
|
|
29110
29190
|
this.waitingGetChoiceDisplayValueResponse = true;
|
|
29111
29191
|
this.updateIsReady();
|
|
29112
29192
|
this.survey.getChoiceDisplayValue({
|
|
@@ -29169,9 +29249,9 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
29169
29249
|
};
|
|
29170
29250
|
Object.defineProperty(QuestionSelectBase.prototype, "choicesByUrl", {
|
|
29171
29251
|
/**
|
|
29172
|
-
* Configures access to a RESTful service that returns choice items. Refer to the [ChoicesRestful](https://surveyjs.io/form-library/documentation/choicesrestful) class description for more information.
|
|
29252
|
+
* Configures access to a RESTful service that returns choice items. Refer to the [`ChoicesRestful`](https://surveyjs.io/form-library/documentation/choicesrestful) class description for more information. You can also specify additional application-wide settings using the [`settings.web`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) object.
|
|
29173
29253
|
*
|
|
29174
|
-
* [View Demo](https://surveyjs.io/form-library/examples/
|
|
29254
|
+
* [View Demo](https://surveyjs.io/form-library/examples/dropdown-menu-load-data-from-restful-service/ (linkStyle))
|
|
29175
29255
|
* @see choices
|
|
29176
29256
|
* @see [settings.specialChoicesOrder](https://surveyjs.io/form-library/documentation/api-reference/settings#specialChoicesOrder)
|
|
29177
29257
|
*/
|
|
@@ -29496,7 +29576,9 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
29496
29576
|
QuestionSelectBase.prototype.addToVisibleChoices = function (items, isAddAll) {
|
|
29497
29577
|
this.headItemsCount = 0;
|
|
29498
29578
|
this.footItemsCount = 0;
|
|
29499
|
-
this.
|
|
29579
|
+
if (!this.hasChoicesUrl) {
|
|
29580
|
+
this.addNewItemToVisibleChoices(items, isAddAll);
|
|
29581
|
+
}
|
|
29500
29582
|
var dict = new Array();
|
|
29501
29583
|
this.addNonChoicesItems(dict, isAddAll);
|
|
29502
29584
|
dict.sort(function (a, b) {
|
|
@@ -29558,8 +29640,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
29558
29640
|
};
|
|
29559
29641
|
Object.defineProperty(QuestionSelectBase.prototype, "isAddDefaultItems", {
|
|
29560
29642
|
get: function () {
|
|
29561
|
-
return _settings__WEBPACK_IMPORTED_MODULE_9__["settings"].
|
|
29562
|
-
|
|
29643
|
+
return _settings__WEBPACK_IMPORTED_MODULE_9__["settings"].showDefaultItemsInCreatorV2 && this.isDesignModeV2 &&
|
|
29644
|
+
!this.customWidget && !this.isContentElement;
|
|
29563
29645
|
},
|
|
29564
29646
|
enumerable: false,
|
|
29565
29647
|
configurable: true
|
|
@@ -29658,6 +29740,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
29658
29740
|
question.addDependedQuestion(this);
|
|
29659
29741
|
return this.getChoicesFromArrayQuestion(question);
|
|
29660
29742
|
}
|
|
29743
|
+
if (this.isDesignModeV2 && this.hasChoicesUrl)
|
|
29744
|
+
return [];
|
|
29661
29745
|
return this.choicesFromUrl ? this.choicesFromUrl : this.getChoices();
|
|
29662
29746
|
},
|
|
29663
29747
|
enumerable: false,
|
|
@@ -29820,7 +29904,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
29820
29904
|
return (this.storeOthersAsComment === true ||
|
|
29821
29905
|
(this.storeOthersAsComment == "default" &&
|
|
29822
29906
|
(this.survey != null ? this.survey.storeOthersAsComment : true)) ||
|
|
29823
|
-
(
|
|
29907
|
+
(this.hasChoicesUrl && !this.choicesFromUrl));
|
|
29824
29908
|
};
|
|
29825
29909
|
QuestionSelectBase.prototype.onSurveyLoad = function () {
|
|
29826
29910
|
this.runChoicesByUrl();
|
|
@@ -29882,7 +29966,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
29882
29966
|
}
|
|
29883
29967
|
};
|
|
29884
29968
|
QuestionSelectBase.prototype.runChoicesByUrl = function () {
|
|
29885
|
-
|
|
29969
|
+
this.updateIsUsingRestful();
|
|
29970
|
+
if (!this.choicesByUrl || this.isLoadingFromJson || this.isRunningChoices || this.isDesignModeV2)
|
|
29886
29971
|
return;
|
|
29887
29972
|
var processor = this.surveyImpl
|
|
29888
29973
|
? this.surveyImpl.getTextProcessor()
|
|
@@ -30056,6 +30141,13 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
30056
30141
|
QuestionSelectBase.prototype.randomizeArray = function (array) {
|
|
30057
30142
|
return _helpers__WEBPACK_IMPORTED_MODULE_8__["Helpers"].randomizeArray(array);
|
|
30058
30143
|
};
|
|
30144
|
+
Object.defineProperty(QuestionSelectBase.prototype, "hasChoicesUrl", {
|
|
30145
|
+
get: function () {
|
|
30146
|
+
return this.choicesByUrl && !!this.choicesByUrl.url;
|
|
30147
|
+
},
|
|
30148
|
+
enumerable: false,
|
|
30149
|
+
configurable: true
|
|
30150
|
+
});
|
|
30059
30151
|
QuestionSelectBase.prototype.clearIncorrectValues = function () {
|
|
30060
30152
|
if (!this.hasValueToClearIncorrectValues())
|
|
30061
30153
|
return;
|
|
@@ -30064,8 +30156,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
30064
30156
|
if (!!this.survey &&
|
|
30065
30157
|
this.survey.questionsByValueName(this.getValueName()).length > 1)
|
|
30066
30158
|
return;
|
|
30067
|
-
if (
|
|
30068
|
-
!this.choicesByUrl.isEmpty &&
|
|
30159
|
+
if (this.hasChoicesUrl &&
|
|
30069
30160
|
(!this.choicesFromUrl || this.choicesFromUrl.length == 0))
|
|
30070
30161
|
return;
|
|
30071
30162
|
if (this.clearIncorrectValuesCallback) {
|
|
@@ -31994,8 +32085,20 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
|
31994
32085
|
_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("checkbox", [
|
|
31995
32086
|
{ name: "showSelectAllItem:boolean", alternativeName: "hasSelectAll" },
|
|
31996
32087
|
{ name: "separateSpecialChoices", visible: true },
|
|
31997
|
-
{ name: "maxSelectedChoices:number", default: 0
|
|
31998
|
-
|
|
32088
|
+
{ name: "maxSelectedChoices:number", default: 0, onSettingValue: function (obj, val) {
|
|
32089
|
+
if (val <= 0)
|
|
32090
|
+
return 0;
|
|
32091
|
+
var min = obj.minSelectedChoices;
|
|
32092
|
+
return min > 0 && val < min ? min : val;
|
|
32093
|
+
}
|
|
32094
|
+
},
|
|
32095
|
+
{ name: "minSelectedChoices:number", default: 0, onSettingValue: function (obj, val) {
|
|
32096
|
+
if (val <= 0)
|
|
32097
|
+
return 0;
|
|
32098
|
+
var max = obj.maxSelectedChoices;
|
|
32099
|
+
return max > 0 && val > max ? max : val;
|
|
32100
|
+
}
|
|
32101
|
+
},
|
|
31999
32102
|
{
|
|
32000
32103
|
name: "selectAllText",
|
|
32001
32104
|
serializationProperty: "locSelectAllText",
|
|
@@ -36941,6 +37044,23 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
|
|
|
36941
37044
|
QuestionMatrixModel.prototype.getType = function () {
|
|
36942
37045
|
return "matrix";
|
|
36943
37046
|
};
|
|
37047
|
+
Object.defineProperty(QuestionMatrixModel.prototype, "cellComponent", {
|
|
37048
|
+
/**
|
|
37049
|
+
* The name of a component used to render cells.
|
|
37050
|
+
*/
|
|
37051
|
+
get: function () {
|
|
37052
|
+
return this.getPropertyValue("cellComponent");
|
|
37053
|
+
},
|
|
37054
|
+
enumerable: false,
|
|
37055
|
+
configurable: true
|
|
37056
|
+
});
|
|
37057
|
+
Object.defineProperty(QuestionMatrixModel.prototype, "itemComponent", {
|
|
37058
|
+
set: function (value) {
|
|
37059
|
+
this.setPropertyValue("cellComponent", value);
|
|
37060
|
+
},
|
|
37061
|
+
enumerable: false,
|
|
37062
|
+
configurable: true
|
|
37063
|
+
});
|
|
36944
37064
|
Object.defineProperty(QuestionMatrixModel.prototype, "hasSingleInput", {
|
|
36945
37065
|
get: function () {
|
|
36946
37066
|
return false;
|
|
@@ -37021,13 +37141,15 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
|
|
|
37021
37141
|
var isChecked = row.value == column.value;
|
|
37022
37142
|
var isDisabled = this.isReadOnly;
|
|
37023
37143
|
var allowHover = !isChecked && !isDisabled;
|
|
37144
|
+
var hasCellText = this.hasCellText;
|
|
37145
|
+
var css = this.cssClasses;
|
|
37024
37146
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_11__["CssClassBuilder"]()
|
|
37025
|
-
.append(
|
|
37026
|
-
.append(
|
|
37027
|
-
.append(
|
|
37028
|
-
.append(
|
|
37029
|
-
.append(
|
|
37030
|
-
.append(
|
|
37147
|
+
.append(css.cell, hasCellText)
|
|
37148
|
+
.append(hasCellText ? css.cellText : css.label)
|
|
37149
|
+
.append(css.itemOnError, !hasCellText && this.hasCssError())
|
|
37150
|
+
.append(hasCellText ? css.cellTextSelected : css.itemChecked, isChecked)
|
|
37151
|
+
.append(hasCellText ? css.cellTextDisabled : css.itemDisabled, isDisabled)
|
|
37152
|
+
.append(css.itemHover, allowHover && !hasCellText)
|
|
37031
37153
|
.toString();
|
|
37032
37154
|
};
|
|
37033
37155
|
Object.defineProperty(QuestionMatrixModel.prototype, "itemSvgIcon", {
|
|
@@ -37362,6 +37484,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_3__["Serializer"].addClass("matrix", [
|
|
|
37362
37484
|
},
|
|
37363
37485
|
"isAllRowRequired:boolean",
|
|
37364
37486
|
"hideIfRowsEmpty:boolean",
|
|
37487
|
+
{ name: "cellComponent", visible: false, default: "survey-matrix-cell" }
|
|
37365
37488
|
], function () {
|
|
37366
37489
|
return new QuestionMatrixModel("");
|
|
37367
37490
|
}, "matrixbase");
|
|
@@ -37659,6 +37782,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
37659
37782
|
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
|
|
37660
37783
|
/* harmony import */ var _question_matrixdropdowncolumn__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./question_matrixdropdowncolumn */ "./src/question_matrixdropdowncolumn.ts");
|
|
37661
37784
|
/* harmony import */ var _question_matrixdropdownrendered__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./question_matrixdropdownrendered */ "./src/question_matrixdropdownrendered.ts");
|
|
37785
|
+
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
|
|
37662
37786
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
37663
37787
|
var extendStatics = function (d, b) {
|
|
37664
37788
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -37688,6 +37812,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
|
37688
37812
|
|
|
37689
37813
|
|
|
37690
37814
|
|
|
37815
|
+
|
|
37691
37816
|
var MatrixDropdownCell = /** @class */ (function () {
|
|
37692
37817
|
function MatrixDropdownCell(column, row, data) {
|
|
37693
37818
|
this.column = column;
|
|
@@ -38035,12 +38160,17 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
|
38035
38160
|
if (!!this.data) {
|
|
38036
38161
|
values[MatrixDropdownRowModelBase.OwnerVariableName] = this.data.value;
|
|
38037
38162
|
}
|
|
38038
|
-
|
|
38163
|
+
var rowIndex = this.rowIndex;
|
|
38164
|
+
values[MatrixDropdownRowModelBase.IndexVariableName] = rowIndex;
|
|
38039
38165
|
values[MatrixDropdownRowModelBase.RowValueVariableName] = this.rowName;
|
|
38040
38166
|
var newProps = _helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].createCopy(properties);
|
|
38041
38167
|
newProps[MatrixDropdownRowModelBase.RowVariableName] = this;
|
|
38168
|
+
var rowValues = rowIndex > 0 ? this.data.getRowValue(this.rowIndex - 1) : this.value;
|
|
38042
38169
|
for (var i = 0; i < this.cells.length; i++) {
|
|
38043
|
-
|
|
38170
|
+
if (i > 0) {
|
|
38171
|
+
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_14__["mergeValues"])(this.value, rowValues);
|
|
38172
|
+
}
|
|
38173
|
+
values[MatrixDropdownRowModelBase.RowVariableName] = rowValues;
|
|
38044
38174
|
this.cells[i].runCondition(values, newProps);
|
|
38045
38175
|
}
|
|
38046
38176
|
if (!!this.detailPanel) {
|
|
@@ -38120,7 +38250,7 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
|
38120
38250
|
if (this.data.isValidateOnValueChanging && this.hasQuestonError(changedQuestion))
|
|
38121
38251
|
return;
|
|
38122
38252
|
var isDeleting = newColumnValue == null && !changedQuestion ||
|
|
38123
|
-
isComment && !newColumnValue && !!changedQuestion
|
|
38253
|
+
isComment && !newColumnValue && !!changedQuestion;
|
|
38124
38254
|
this.data.onRowChanged(this, changedName, newValue, isDeleting);
|
|
38125
38255
|
if (changedName) {
|
|
38126
38256
|
this.runTriggers(MatrixDropdownTotalRowModel.RowVariableName + "." + changedName, newValue);
|
|
@@ -38821,6 +38951,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
38821
38951
|
this.resetRenderedTable();
|
|
38822
38952
|
this.fireCallback(this.columnsChangedCallback);
|
|
38823
38953
|
};
|
|
38954
|
+
//For internal use
|
|
38824
38955
|
QuestionMatrixDropdownModelBase.prototype.resetRenderedTable = function () {
|
|
38825
38956
|
if (this.lockResetRenderedTable || this.isUpdateLocked)
|
|
38826
38957
|
return;
|
|
@@ -39183,7 +39314,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
39183
39314
|
if (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isArraysEqual(curVisibleChoices, newVisibleChoices, true, false, false))
|
|
39184
39315
|
return true;
|
|
39185
39316
|
}
|
|
39186
|
-
return curVis
|
|
39317
|
+
return curVis !== column.isColumnVisible;
|
|
39187
39318
|
};
|
|
39188
39319
|
QuestionMatrixDropdownModelBase.prototype.updateNewVisibleChoices = function (q, dest) {
|
|
39189
39320
|
var choices = q.visibleChoices;
|
|
@@ -40288,16 +40419,17 @@ function onUpdateSelectBaseCellQuestion(cellQuestion, column, question, data) {
|
|
|
40288
40419
|
cellQuestion.choicesByUrl.run(data.getTextProcessor());
|
|
40289
40420
|
}
|
|
40290
40421
|
}
|
|
40422
|
+
function onUpdateSelectDropdownCellQuestion(cellQuestion, column, question, data) {
|
|
40423
|
+
onUpdateSelectBaseCellQuestion(cellQuestion, column, question, data);
|
|
40424
|
+
if (!!cellQuestion.locPlaceholder && cellQuestion.locPlaceholder.isEmpty && !question.locPlaceholder.isEmpty) {
|
|
40425
|
+
cellQuestion.optionsCaption = question.optionsCaption;
|
|
40426
|
+
}
|
|
40427
|
+
}
|
|
40291
40428
|
var matrixDropdownColumnTypes = {
|
|
40292
40429
|
dropdown: {
|
|
40293
40430
|
onCellQuestionUpdate: function (cellQuestion, column, question, data) {
|
|
40294
|
-
|
|
40295
|
-
|
|
40296
|
-
cellQuestion.locPlaceholder.isEmpty &&
|
|
40297
|
-
!question.locPlaceholder.isEmpty) {
|
|
40298
|
-
cellQuestion.optionsCaption = question.optionsCaption;
|
|
40299
|
-
}
|
|
40300
|
-
},
|
|
40431
|
+
onUpdateSelectDropdownCellQuestion(cellQuestion, column, question, data);
|
|
40432
|
+
}
|
|
40301
40433
|
},
|
|
40302
40434
|
checkbox: {
|
|
40303
40435
|
onCellQuestionUpdate: function (cellQuestion, column, question, data) {
|
|
@@ -40313,7 +40445,11 @@ var matrixDropdownColumnTypes = {
|
|
|
40313
40445
|
column.colCount > -1 ? column.colCount : question.columnColCount;
|
|
40314
40446
|
},
|
|
40315
40447
|
},
|
|
40316
|
-
tagbox: {
|
|
40448
|
+
tagbox: {
|
|
40449
|
+
onCellQuestionUpdate: function (cellQuestion, column, question, data) {
|
|
40450
|
+
onUpdateSelectBaseCellQuestion(cellQuestion, column, question, data);
|
|
40451
|
+
}
|
|
40452
|
+
},
|
|
40317
40453
|
text: {},
|
|
40318
40454
|
comment: {},
|
|
40319
40455
|
boolean: {
|
|
@@ -41255,6 +41391,13 @@ var QuestionMatrixDropdownRenderedCell = /** @class */ (function () {
|
|
|
41255
41391
|
this.classNameValue = "";
|
|
41256
41392
|
this.idValue = QuestionMatrixDropdownRenderedCell.counter++;
|
|
41257
41393
|
}
|
|
41394
|
+
Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "requiredText", {
|
|
41395
|
+
get: function () {
|
|
41396
|
+
return this.column && this.column.isRenderedRequired ? this.column.requiredText : undefined;
|
|
41397
|
+
},
|
|
41398
|
+
enumerable: false,
|
|
41399
|
+
configurable: true
|
|
41400
|
+
});
|
|
41258
41401
|
Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "hasQuestion", {
|
|
41259
41402
|
get: function () {
|
|
41260
41403
|
return !!this.question && !this.isErrorsCell;
|
|
@@ -41371,6 +41514,8 @@ var QuestionMatrixDropdownRenderedCell = /** @class */ (function () {
|
|
|
41371
41514
|
return "";
|
|
41372
41515
|
return this.cell.column.locCellHint.renderedHtml;
|
|
41373
41516
|
}
|
|
41517
|
+
if (this.hasQuestion && this.question.isVisible && this.question.title)
|
|
41518
|
+
return this.question.title;
|
|
41374
41519
|
return this.cell.column.title;
|
|
41375
41520
|
}
|
|
41376
41521
|
if (this.hasQuestion && this.question.isVisible) {
|
|
@@ -41587,9 +41732,9 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
|
41587
41732
|
enumerable: false,
|
|
41588
41733
|
configurable: true
|
|
41589
41734
|
});
|
|
41590
|
-
Object.defineProperty(QuestionMatrixDropdownRenderedTable.prototype, "
|
|
41735
|
+
Object.defineProperty(QuestionMatrixDropdownRenderedTable.prototype, "isRowsDragAndDrop", {
|
|
41591
41736
|
get: function () {
|
|
41592
|
-
return this.matrix.
|
|
41737
|
+
return this.matrix.isRowsDragAndDrop && this.matrix.isColumnLayoutHorizontal;
|
|
41593
41738
|
},
|
|
41594
41739
|
enumerable: false,
|
|
41595
41740
|
configurable: true
|
|
@@ -41748,7 +41893,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
|
41748
41893
|
if (!isShown)
|
|
41749
41894
|
return;
|
|
41750
41895
|
this.headerRowValue = this.createRenderedRow(this.cssClasses);
|
|
41751
|
-
if (this.
|
|
41896
|
+
if (this.isRowsDragAndDrop) {
|
|
41752
41897
|
this.headerRow.cells.push(this.createHeaderCell(null, "action"));
|
|
41753
41898
|
}
|
|
41754
41899
|
if (this.hasActionCellInRows("start")) {
|
|
@@ -41792,7 +41937,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
|
41792
41937
|
if (!this.showFooter)
|
|
41793
41938
|
return;
|
|
41794
41939
|
this.footerRowValue = this.createRenderedRow(this.cssClasses);
|
|
41795
|
-
if (this.
|
|
41940
|
+
if (this.isRowsDragAndDrop) {
|
|
41796
41941
|
this.footerRow.cells.push(this.createHeaderCell(null));
|
|
41797
41942
|
}
|
|
41798
41943
|
if (this.hasActionCellInRows("start")) {
|
|
@@ -42037,7 +42182,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
|
42037
42182
|
};
|
|
42038
42183
|
QuestionMatrixDropdownRenderedTable.prototype.createHorizontalRow = function (row, useAsHeader) {
|
|
42039
42184
|
var res = this.createRenderedRow(this.cssClasses);
|
|
42040
|
-
if (this.
|
|
42185
|
+
if (this.isRowsDragAndDrop) {
|
|
42041
42186
|
var rowIndex = this.matrix.visibleRows.indexOf(row);
|
|
42042
42187
|
res.cells.push(this.getRowDragCell(rowIndex));
|
|
42043
42188
|
}
|
|
@@ -42185,9 +42330,6 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
|
42185
42330
|
.append(hCell.className)
|
|
42186
42331
|
.append(this.cssClasses.rowTextCell)
|
|
42187
42332
|
.append(this.cssClasses.columnTitleCell).toString();
|
|
42188
|
-
if (!choice) {
|
|
42189
|
-
this.setRequriedToHeaderCell(column, hCell);
|
|
42190
|
-
}
|
|
42191
42333
|
res.cells.push(hCell);
|
|
42192
42334
|
}
|
|
42193
42335
|
var rows = this.matrix.visibleRows;
|
|
@@ -42317,26 +42459,11 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
|
42317
42459
|
};
|
|
42318
42460
|
QuestionMatrixDropdownRenderedTable.prototype.setHeaderCell = function (column, cell) {
|
|
42319
42461
|
this.setHeaderCellWidth(column, cell);
|
|
42320
|
-
this.setRequriedToHeaderCell(column, cell);
|
|
42321
42462
|
};
|
|
42322
42463
|
QuestionMatrixDropdownRenderedTable.prototype.setHeaderCellWidth = function (column, cell) {
|
|
42323
42464
|
cell.minWidth = column != null ? this.matrix.getColumnWidth(column) : this.matrix.getRowTitleWidth();
|
|
42324
42465
|
cell.width = column != null ? column.width : this.matrix.getRowTitleWidth();
|
|
42325
42466
|
};
|
|
42326
|
-
QuestionMatrixDropdownRenderedTable.prototype.setRequriedToHeaderCell = function (column, cell) {
|
|
42327
|
-
if (!!column && column.isRequired && this.matrix.survey) {
|
|
42328
|
-
cell.requiredText = this.matrix.survey.requiredText;
|
|
42329
|
-
}
|
|
42330
|
-
};
|
|
42331
|
-
QuestionMatrixDropdownRenderedTable.prototype.createRemoveRowCell = function (row) {
|
|
42332
|
-
var res = new QuestionMatrixDropdownRenderedCell();
|
|
42333
|
-
res.row = row;
|
|
42334
|
-
res.isRemoveRow = this.canRemoveRow(row);
|
|
42335
|
-
if (!!this.cssClasses.cell) {
|
|
42336
|
-
res.className = this.cssClasses.cell;
|
|
42337
|
-
}
|
|
42338
|
-
return res;
|
|
42339
|
-
};
|
|
42340
42467
|
QuestionMatrixDropdownRenderedTable.prototype.createTextCell = function (locTitle) {
|
|
42341
42468
|
var cell = new QuestionMatrixDropdownRenderedCell();
|
|
42342
42469
|
cell.locTitle = locTitle;
|
|
@@ -42494,7 +42621,7 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
|
|
|
42494
42621
|
_this.registerPropertyChangedHandlers(["hideColumnsIfEmpty", "allowAddRows"], function () {
|
|
42495
42622
|
_this.updateShowTableAndAddRow();
|
|
42496
42623
|
});
|
|
42497
|
-
_this.registerPropertyChangedHandlers(["allowRowsDragAndDrop"], function () { _this.clearRowsAndResetRenderedTable(); });
|
|
42624
|
+
_this.registerPropertyChangedHandlers(["allowRowsDragAndDrop", "isReadOnly"], function () { _this.clearRowsAndResetRenderedTable(); });
|
|
42498
42625
|
_this.dragOrClickHelper = new _utils_dragOrClickHelper__WEBPACK_IMPORTED_MODULE_9__["DragOrClickHelper"](_this.startDragMatrixRow);
|
|
42499
42626
|
return _this;
|
|
42500
42627
|
}
|
|
@@ -42513,7 +42640,7 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
|
|
|
42513
42640
|
return true;
|
|
42514
42641
|
};
|
|
42515
42642
|
QuestionMatrixDynamicModel.prototype.onPointerDown = function (pointerDownEvent, row) {
|
|
42516
|
-
if (!row || !this.
|
|
42643
|
+
if (!row || !this.isRowsDragAndDrop)
|
|
42517
42644
|
return;
|
|
42518
42645
|
if (this.isBanStartDrag(pointerDownEvent))
|
|
42519
42646
|
return;
|
|
@@ -42710,8 +42837,6 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
|
|
|
42710
42837
|
* Default value: `false`
|
|
42711
42838
|
*/
|
|
42712
42839
|
get: function () {
|
|
42713
|
-
if (this.readOnly)
|
|
42714
|
-
return false;
|
|
42715
42840
|
return this.getPropertyValue("allowRowsDragAndDrop");
|
|
42716
42841
|
},
|
|
42717
42842
|
set: function (val) {
|
|
@@ -42720,6 +42845,13 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
|
|
|
42720
42845
|
enumerable: false,
|
|
42721
42846
|
configurable: true
|
|
42722
42847
|
});
|
|
42848
|
+
Object.defineProperty(QuestionMatrixDynamicModel.prototype, "isRowsDragAndDrop", {
|
|
42849
|
+
get: function () {
|
|
42850
|
+
return this.allowRowsDragAndDrop && !this.isReadOnly;
|
|
42851
|
+
},
|
|
42852
|
+
enumerable: false,
|
|
42853
|
+
configurable: true
|
|
42854
|
+
});
|
|
42723
42855
|
Object.defineProperty(QuestionMatrixDynamicModel.prototype, "iconDragElement", {
|
|
42724
42856
|
get: function () {
|
|
42725
42857
|
return this.cssClasses.iconDragElement;
|
|
@@ -44916,7 +45048,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
44916
45048
|
_this.registerPropertyChangedHandlers(["panelsState"], function () {
|
|
44917
45049
|
_this.setPanelsState();
|
|
44918
45050
|
});
|
|
44919
|
-
_this.registerPropertyChangedHandlers(["isMobile"], function () {
|
|
45051
|
+
_this.registerPropertyChangedHandlers(["isMobile", "newPanelPosition", "showRangeInProgress", "renderMode"], function () {
|
|
44920
45052
|
_this.updateFooterActions();
|
|
44921
45053
|
});
|
|
44922
45054
|
_this.registerPropertyChangedHandlers(["allowAddPanel"], function () { _this.updateNoEntriesTextDefaultLoc(); });
|
|
@@ -45139,9 +45271,10 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
45139
45271
|
* @see visiblePanels
|
|
45140
45272
|
*/
|
|
45141
45273
|
get: function () {
|
|
45142
|
-
return this.
|
|
45274
|
+
return this.getPropertyValue("templateVisibleIf");
|
|
45143
45275
|
},
|
|
45144
45276
|
set: function (val) {
|
|
45277
|
+
this.setPropertyValue("templateVisibleIf", val);
|
|
45145
45278
|
this.template.visibleIf = val;
|
|
45146
45279
|
},
|
|
45147
45280
|
enumerable: false,
|
|
@@ -45745,6 +45878,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
45745
45878
|
* Specifies whether users are allowed to add new panels.
|
|
45746
45879
|
*
|
|
45747
45880
|
* Default value: `true`
|
|
45881
|
+
*
|
|
45882
|
+
* By default, users add new panels to the end. If you want to let users insert a new panel after the current panel, set the [`newPanelPosition`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#newPanelPosition) property to `"next"`.
|
|
45748
45883
|
* @see canAddPanel
|
|
45749
45884
|
* @see allowRemovePanel
|
|
45750
45885
|
*/
|
|
@@ -45757,6 +45892,26 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
45757
45892
|
enumerable: false,
|
|
45758
45893
|
configurable: true
|
|
45759
45894
|
});
|
|
45895
|
+
Object.defineProperty(QuestionPanelDynamicModel.prototype, "newPanelPosition", {
|
|
45896
|
+
/**
|
|
45897
|
+
* Specifies the position of newly added panels.
|
|
45898
|
+
*
|
|
45899
|
+
* Possible values:
|
|
45900
|
+
*
|
|
45901
|
+
* - `"last"` (default) - New panels are added to the end.
|
|
45902
|
+
* - `"next"` - New panels are inserted after the current panel.
|
|
45903
|
+
* @see allowAddPanel
|
|
45904
|
+
* @see addPanel
|
|
45905
|
+
*/
|
|
45906
|
+
get: function () {
|
|
45907
|
+
return this.getPropertyValue("newPanelPosition");
|
|
45908
|
+
},
|
|
45909
|
+
set: function (val) {
|
|
45910
|
+
this.setPropertyValue("newPanelPosition", val);
|
|
45911
|
+
},
|
|
45912
|
+
enumerable: false,
|
|
45913
|
+
configurable: true
|
|
45914
|
+
});
|
|
45760
45915
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "allowRemovePanel", {
|
|
45761
45916
|
/**
|
|
45762
45917
|
* Specifies whether users are allowed to delete panels.
|
|
@@ -45860,7 +46015,6 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
45860
46015
|
},
|
|
45861
46016
|
set: function (val) {
|
|
45862
46017
|
this.setPropertyValue("showRangeInProgress", val);
|
|
45863
|
-
this.updateFooterActions();
|
|
45864
46018
|
this.fireCallback(this.currentIndexChangedCallback);
|
|
45865
46019
|
},
|
|
45866
46020
|
enumerable: false,
|
|
@@ -45883,7 +46037,6 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
45883
46037
|
},
|
|
45884
46038
|
set: function (val) {
|
|
45885
46039
|
this.setPropertyValue("renderMode", val);
|
|
45886
|
-
this.updateFooterActions();
|
|
45887
46040
|
this.fireCallback(this.renderModeChangedCallback);
|
|
45888
46041
|
},
|
|
45889
46042
|
enumerable: false,
|
|
@@ -45966,7 +46119,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
45966
46119
|
get: function () {
|
|
45967
46120
|
if (this.isDesignMode)
|
|
45968
46121
|
return false;
|
|
45969
|
-
if (this.isDefaultV2Theme && !this.legacyNavigation && !this.isRenderModeList &&
|
|
46122
|
+
if (this.isDefaultV2Theme && !this.legacyNavigation && !this.isRenderModeList &&
|
|
46123
|
+
(this.currentIndex < this.visiblePanelCount - 1 && this.newPanelPosition !== "next")) {
|
|
45970
46124
|
return false;
|
|
45971
46125
|
}
|
|
45972
46126
|
return (this.allowAddPanel &&
|
|
@@ -46123,6 +46277,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
46123
46277
|
* @param index *(Optional)* An index at which to insert the new panel. `undefined` adds the panel to the end or inserts it after the current panel if [`renderMode`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#renderMode) is `"tab"`. A negative index (for instance, -1) adds the panel to the end in all cases, regardless of the `renderMode` value.
|
|
46124
46278
|
* @see panelCount
|
|
46125
46279
|
* @see panels
|
|
46280
|
+
* @see allowAddPanel
|
|
46281
|
+
* @see newPanelPosition
|
|
46126
46282
|
*/
|
|
46127
46283
|
QuestionPanelDynamicModel.prototype.addPanel = function (index) {
|
|
46128
46284
|
var curIndex = this.currentIndex;
|
|
@@ -46187,13 +46343,23 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
46187
46343
|
var _this = this;
|
|
46188
46344
|
if (!this.canRemovePanel)
|
|
46189
46345
|
return;
|
|
46190
|
-
if (this.
|
|
46346
|
+
if (this.isRequireConfirmOnDelete(value)) {
|
|
46191
46347
|
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_9__["confirmActionAsync"])(this.confirmDeleteText, function () { _this.removePanel(value); });
|
|
46192
46348
|
}
|
|
46193
46349
|
else {
|
|
46194
46350
|
this.removePanel(value);
|
|
46195
46351
|
}
|
|
46196
46352
|
};
|
|
46353
|
+
QuestionPanelDynamicModel.prototype.isRequireConfirmOnDelete = function (val) {
|
|
46354
|
+
if (!this.confirmDelete)
|
|
46355
|
+
return false;
|
|
46356
|
+
var index = this.getVisualPanelIndex(val);
|
|
46357
|
+
if (index < 0 || index >= this.visiblePanelCount)
|
|
46358
|
+
return false;
|
|
46359
|
+
var panelValue = this.visiblePanels[index].getValue();
|
|
46360
|
+
return !this.isValueEmpty(panelValue) &&
|
|
46361
|
+
(this.isValueEmpty(this.defaultPanelValue) || !this.isTwoValueEquals(panelValue, this.defaultPanelValue));
|
|
46362
|
+
};
|
|
46197
46363
|
/**
|
|
46198
46364
|
* Switches Dynamic Panel to the next panel. Returns `true` in case of success, or `false` if `renderMode` is `"list"` or the current panel contains validation errors.
|
|
46199
46365
|
* @see renderMode
|
|
@@ -46423,6 +46589,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
46423
46589
|
if (this.isReadOnly || !this.allowAddPanel) {
|
|
46424
46590
|
this.updateNoEntriesTextDefaultLoc();
|
|
46425
46591
|
}
|
|
46592
|
+
this.updateFooterActions();
|
|
46426
46593
|
_super.prototype.onSurveyLoad.call(this);
|
|
46427
46594
|
};
|
|
46428
46595
|
QuestionPanelDynamicModel.prototype.onFirstRendering = function () {
|
|
@@ -47247,6 +47414,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_5__["Serializer"].addClass("paneldynamic",
|
|
|
47247
47414
|
{ name: "noEntriesText:text", serializationProperty: "locNoEntriesText" },
|
|
47248
47415
|
{ name: "allowAddPanel:boolean", default: true },
|
|
47249
47416
|
{ name: "allowRemovePanel:boolean", default: true },
|
|
47417
|
+
{ name: "newPanelPosition", choices: ["next", "last"], default: "last", category: "layout" },
|
|
47250
47418
|
{
|
|
47251
47419
|
name: "panelCount:number",
|
|
47252
47420
|
isBindable: true,
|
|
@@ -49872,6 +50040,7 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
|
|
|
49872
50040
|
_this.onOpened = _this.addEvent();
|
|
49873
50041
|
_this.createLocalizableString("placeholder", _this, false, true);
|
|
49874
50042
|
_this.createLocalizableString("clearCaption", _this, false, true);
|
|
50043
|
+
_this.createLocalizableString("readOnlyText", _this, true);
|
|
49875
50044
|
_this.registerPropertyChangedHandlers(["value", "renderAs", "showOtherItem", "otherText", "placeholder", "choices", "visibleChoices"], function () {
|
|
49876
50045
|
_this.updateReadOnlyText();
|
|
49877
50046
|
});
|
|
@@ -49933,6 +50102,23 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
|
|
|
49933
50102
|
enumerable: false,
|
|
49934
50103
|
configurable: true
|
|
49935
50104
|
});
|
|
50105
|
+
Object.defineProperty(QuestionTagboxModel.prototype, "readOnlyText", {
|
|
50106
|
+
get: function () {
|
|
50107
|
+
return this.getLocalizableStringText("readOnlyText");
|
|
50108
|
+
},
|
|
50109
|
+
set: function (val) {
|
|
50110
|
+
this.setLocalizableStringText("readOnlyText", val);
|
|
50111
|
+
},
|
|
50112
|
+
enumerable: false,
|
|
50113
|
+
configurable: true
|
|
50114
|
+
});
|
|
50115
|
+
Object.defineProperty(QuestionTagboxModel.prototype, "locReadOnlyText", {
|
|
50116
|
+
get: function () {
|
|
50117
|
+
return this.getLocalizableString("readOnlyText");
|
|
50118
|
+
},
|
|
50119
|
+
enumerable: false,
|
|
50120
|
+
configurable: true
|
|
50121
|
+
});
|
|
49936
50122
|
QuestionTagboxModel.prototype.getType = function () {
|
|
49937
50123
|
return "tagbox";
|
|
49938
50124
|
};
|
|
@@ -50058,9 +50244,6 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
|
|
|
50058
50244
|
enumerable: false,
|
|
50059
50245
|
configurable: true
|
|
50060
50246
|
});
|
|
50061
|
-
__decorate([
|
|
50062
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: "" })
|
|
50063
|
-
], QuestionTagboxModel.prototype, "readOnlyText", void 0);
|
|
50064
50247
|
__decorate([
|
|
50065
50248
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
|
50066
50249
|
], QuestionTagboxModel.prototype, "allowClear", void 0);
|
|
@@ -51465,14 +51648,8 @@ var settings = {
|
|
|
51465
51648
|
showEmptyTitles: true
|
|
51466
51649
|
},
|
|
51467
51650
|
//#region designMode section, Obsolete properties
|
|
51468
|
-
/**
|
|
51469
|
-
* This property is obsolete. Use the [`settings.designMode.showEmptyDescriptions`](https://surveyjs.io/form-library/documentation/api-reference/settings#designMode) property instead.
|
|
51470
|
-
*/
|
|
51471
51651
|
get allowShowEmptyDescriptionInDesignMode() { return this.designMode.showEmptyDescriptions; },
|
|
51472
51652
|
set allowShowEmptyDescriptionInDesignMode(val) { this.designMode.showEmptyDescriptions = val; },
|
|
51473
|
-
/**
|
|
51474
|
-
* This property is obsolete. Use the [`settings.designMode.showEmptyTitles`](https://surveyjs.io/form-library/documentation/api-reference/settings#designMode) property instead.
|
|
51475
|
-
*/
|
|
51476
51653
|
get allowShowEmptyTitleInDesignMode() { return this.designMode.showEmptyTitles; },
|
|
51477
51654
|
set allowShowEmptyTitleInDesignMode(val) { this.designMode.showEmptyTitles = val; },
|
|
51478
51655
|
//#endregion
|
|
@@ -51496,19 +51673,10 @@ var settings = {
|
|
|
51496
51673
|
defaultLocaleName: "default"
|
|
51497
51674
|
},
|
|
51498
51675
|
//#region localization section, obsolete properties
|
|
51499
|
-
/**
|
|
51500
|
-
* This property is obsolete. Use the [`settings.localization.useLocalTimeZone`](https://surveyjs.io/form-library/documentation/api-reference/settings#localization) property instead.
|
|
51501
|
-
*/
|
|
51502
51676
|
get useLocalTimeZone() { return this.localization.useLocalTimeZone; },
|
|
51503
51677
|
set useLocalTimeZone(val) { this.localization.useLocalTimeZone = val; },
|
|
51504
|
-
/**
|
|
51505
|
-
* This property is obsolete. Use the [`settings.localization.storeDuplicatedTranslations`](https://surveyjs.io/form-library/documentation/api-reference/settings#localization) property instead.
|
|
51506
|
-
*/
|
|
51507
51678
|
get storeDuplicatedTranslations() { return this.localization.storeDuplicatedTranslations; },
|
|
51508
51679
|
set storeDuplicatedTranslations(val) { this.localization.storeDuplicatedTranslations = val; },
|
|
51509
|
-
/**
|
|
51510
|
-
* This property is obsolete. Use the [`settings.localization.defaultLocaleName`](https://surveyjs.io/form-library/documentation/api-reference/settings#localization) property instead.
|
|
51511
|
-
*/
|
|
51512
51680
|
get defaultLocaleName() { return this.localization.defaultLocaleName; },
|
|
51513
51681
|
set defaultLocaleName(val) { this.localization.defaultLocaleName = val; },
|
|
51514
51682
|
//#endregion
|
|
@@ -51521,41 +51689,41 @@ var settings = {
|
|
|
51521
51689
|
* Specifies whether to encode URL parameters when you access a web service. Default value: `true`.
|
|
51522
51690
|
*
|
|
51523
51691
|
* - `cacheLoadedChoices`: `boolean`\
|
|
51524
|
-
* Specifies whether to cache [choices](https://surveyjs.io/form-library/documentation/api-reference/
|
|
51692
|
+
* Specifies whether to cache [choices loaded from a web service](https://surveyjs.io/form-library/documentation/api-reference/questionselectbase#choicesByUrl). Default value: `true`.
|
|
51525
51693
|
*
|
|
51526
51694
|
* - `disableQuestionWhileLoadingChoices`: `boolean`\
|
|
51527
51695
|
* Disables a question while its choices are being loaded from a web service. Default value: `false`.
|
|
51528
51696
|
*
|
|
51529
51697
|
* - `surveyServiceUrl`: `string`\
|
|
51530
51698
|
* The URL of the SurveyJS Service API endpoint.
|
|
51699
|
+
*
|
|
51700
|
+
* - `onBeforeRequestChoices`: `(sender: ChoicesRestful, options: { request: XMLHttpRequest })`\
|
|
51701
|
+
* 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:
|
|
51702
|
+
*
|
|
51703
|
+
* ```js
|
|
51704
|
+
* import { settings } from "survey-core";
|
|
51705
|
+
*
|
|
51706
|
+
* settings.web.onBeforeSendRequest = (sender, options) => {
|
|
51707
|
+
* options.request.setRequestHeader('RequestVerificationToken', requestVerificationToken);
|
|
51708
|
+
* };
|
|
51709
|
+
* ```
|
|
51531
51710
|
*/
|
|
51532
51711
|
web: {
|
|
51712
|
+
onBeforeRequestChoices: function (sender, options) { },
|
|
51533
51713
|
encodeUrlParams: true,
|
|
51534
51714
|
cacheLoadedChoices: true,
|
|
51535
51715
|
disableQuestionWhileLoadingChoices: false,
|
|
51536
51716
|
surveyServiceUrl: "https://api.surveyjs.io/public/v1/Survey"
|
|
51537
51717
|
},
|
|
51538
51718
|
//#region web section, obsolete properties
|
|
51539
|
-
/**
|
|
51540
|
-
* This property is obsolete. Use the [`settings.web.encodeUrlParams`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
|
|
51541
|
-
*/
|
|
51542
51719
|
get webserviceEncodeParameters() { return this.web.encodeUrlParams; },
|
|
51543
51720
|
set webserviceEncodeParameters(val) { this.web.encodeUrlParams = val; },
|
|
51544
|
-
/**
|
|
51545
|
-
* This property is obsolete. Use the [`settings.web.cacheLoadedChoices`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
|
|
51546
|
-
*/
|
|
51547
51721
|
get useCachingForChoicesRestful() { return this.web.cacheLoadedChoices; },
|
|
51548
51722
|
set useCachingForChoicesRestful(val) { this.web.cacheLoadedChoices = val; },
|
|
51549
51723
|
get useCachingForChoicesRestfull() { return this.web.cacheLoadedChoices; },
|
|
51550
51724
|
set useCachingForChoicesRestfull(val) { this.web.cacheLoadedChoices = val; },
|
|
51551
|
-
/**
|
|
51552
|
-
* This property is obsolete. Use the [`settings.web.disableQuestionWhileLoadingChoices`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
|
|
51553
|
-
*/
|
|
51554
51725
|
get disableOnGettingChoicesFromWeb() { return this.web.disableQuestionWhileLoadingChoices; },
|
|
51555
51726
|
set disableOnGettingChoicesFromWeb(val) { this.web.disableQuestionWhileLoadingChoices = val; },
|
|
51556
|
-
/**
|
|
51557
|
-
* This property is obsolete. Use the [`settings.web.surveyServiceUrl`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
|
|
51558
|
-
*/
|
|
51559
51727
|
get surveyServiceUrl() { return this.web.surveyServiceUrl; },
|
|
51560
51728
|
set surveyServiceUrl(val) { this.web.surveyServiceUrl = val; },
|
|
51561
51729
|
//#endregion
|
|
@@ -51581,19 +51749,10 @@ var settings = {
|
|
|
51581
51749
|
executeSkipOnValueChanged: true
|
|
51582
51750
|
},
|
|
51583
51751
|
//#region triggers section, Obsolete properties
|
|
51584
|
-
/**
|
|
51585
|
-
* This property is obsolete. Use the [`settings.triggers.executeCompleteOnValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/settings#triggers) property instead.
|
|
51586
|
-
*/
|
|
51587
51752
|
get executeCompleteTriggerOnValueChanged() { return this.triggers.executeCompleteOnValueChanged; },
|
|
51588
51753
|
set executeCompleteTriggerOnValueChanged(val) { this.triggers.executeCompleteOnValueChanged = val; },
|
|
51589
|
-
/**
|
|
51590
|
-
* This property is obsolete. Use the [`settings.triggers.changeNavigationButtonsOnComplete`](https://surveyjs.io/form-library/documentation/api-reference/settings#triggers) property instead.
|
|
51591
|
-
*/
|
|
51592
51754
|
get changeNavigationButtonsOnCompleteTrigger() { return this.triggers.changeNavigationButtonsOnComplete; },
|
|
51593
51755
|
set changeNavigationButtonsOnCompleteTrigger(val) { this.triggers.changeNavigationButtonsOnComplete = val; },
|
|
51594
|
-
/**
|
|
51595
|
-
* This property is obsolete. Use the [`settings.triggers.executeSkipOnValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/settings#triggers) property instead.
|
|
51596
|
-
*/
|
|
51597
51756
|
get executeSkipTriggerOnValueChanged() { return this.triggers.executeSkipOnValueChanged; },
|
|
51598
51757
|
set executeSkipTriggerOnValueChanged(val) { this.triggers.executeSkipOnValueChanged = val; },
|
|
51599
51758
|
//#endregion
|
|
@@ -51631,19 +51790,10 @@ var settings = {
|
|
|
51631
51790
|
localizableStringSerializeAsObject: false
|
|
51632
51791
|
},
|
|
51633
51792
|
//#region serialization section, Obsolete properties
|
|
51634
|
-
/**
|
|
51635
|
-
* This property is obsolete. Use the [`settings.serialization.itemValueSerializeAsObject`](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization) property instead.
|
|
51636
|
-
*/
|
|
51637
51793
|
get itemValueAlwaysSerializeAsObject() { return this.serialization.itemValueSerializeAsObject; },
|
|
51638
51794
|
set itemValueAlwaysSerializeAsObject(val) { this.serialization.itemValueSerializeAsObject = val; },
|
|
51639
|
-
/**
|
|
51640
|
-
* This property is obsolete. Use the [`settings.serialization.itemValueSerializeDisplayText`](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization) property instead.
|
|
51641
|
-
*/
|
|
51642
51795
|
get itemValueAlwaysSerializeText() { return this.serialization.itemValueSerializeDisplayText; },
|
|
51643
51796
|
set itemValueAlwaysSerializeText(val) { this.serialization.itemValueSerializeDisplayText = val; },
|
|
51644
|
-
/**
|
|
51645
|
-
* This property is obsolete. Use the [`settings.serialization.localizableStringSerializeAsObject`](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization) property instead.
|
|
51646
|
-
*/
|
|
51647
51797
|
get serializeLocalizableStringAsObject() { return this.serialization.localizableStringSerializeAsObject; },
|
|
51648
51798
|
set serializeLocalizableStringAsObject(val) { this.serialization.localizableStringSerializeAsObject = val; },
|
|
51649
51799
|
//#endregion
|
|
@@ -51662,9 +51812,6 @@ var settings = {
|
|
|
51662
51812
|
firstBatchSize: 3
|
|
51663
51813
|
},
|
|
51664
51814
|
//#region lazyRender section, Obsolete properties
|
|
51665
|
-
/**
|
|
51666
|
-
* This property is obsolete. Use the [`settings.lazyRender.enabled`](https://surveyjs.io/form-library/documentation/api-reference/settings#lazyRender) property instead.
|
|
51667
|
-
*/
|
|
51668
51815
|
get lazyRowsRendering() { return this.lazyRender.enabled; },
|
|
51669
51816
|
set lazyRowsRendering(val) { this.lazyRender.enabled = val; },
|
|
51670
51817
|
get lazyRowsRenderingStartRow() { return this.lazyRender.firstBatchSize; },
|
|
@@ -51714,34 +51861,16 @@ var settings = {
|
|
|
51714
51861
|
rateSize: "small",
|
|
51715
51862
|
},
|
|
51716
51863
|
//#region matrix section, Obsolete properties
|
|
51717
|
-
/**
|
|
51718
|
-
* This property is obsolete. Use the [`settings.matrix.defaultRowName`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
|
51719
|
-
*/
|
|
51720
51864
|
get matrixDefaultRowName() { return this.matrix.defaultRowName; },
|
|
51721
51865
|
set matrixDefaultRowName(val) { this.matrix.defaultRowName = val; },
|
|
51722
|
-
/**
|
|
51723
|
-
* This property is obsolete. Use the [`settings.matrix.defaultCellType`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
|
51724
|
-
*/
|
|
51725
51866
|
get matrixDefaultCellType() { return this.matrix.defaultCellType; },
|
|
51726
51867
|
set matrixDefaultCellType(val) { this.matrix.defaultCellType = val; },
|
|
51727
|
-
/**
|
|
51728
|
-
* This property is obsolete. Use the [`settings.matrix.totalsSuffix`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
|
51729
|
-
*/
|
|
51730
51868
|
get matrixTotalValuePostFix() { return this.matrix.totalsSuffix; },
|
|
51731
51869
|
set matrixTotalValuePostFix(val) { this.matrix.totalsSuffix = val; },
|
|
51732
|
-
/**
|
|
51733
|
-
* This property is obsolete. Use the [`settings.matrix.maxRowCount`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
|
51734
|
-
*/
|
|
51735
51870
|
get matrixMaximumRowCount() { return this.matrix.maxRowCount; },
|
|
51736
51871
|
set matrixMaximumRowCount(val) { this.matrix.maxRowCount = val; },
|
|
51737
|
-
/**
|
|
51738
|
-
* This property is obsolete. Use the [`settings.matrix.maxRowCountInCondition`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
|
51739
|
-
*/
|
|
51740
51872
|
get matrixMaxRowCountInCondition() { return this.matrix.maxRowCountInCondition; },
|
|
51741
51873
|
set matrixMaxRowCountInCondition(val) { this.matrix.maxRowCountInCondition = val; },
|
|
51742
|
-
/**
|
|
51743
|
-
* This property is obsolete. Use the [`settings.matrix.renderRemoveAsIcon`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
|
51744
|
-
*/
|
|
51745
51874
|
get matrixRenderRemoveAsIcon() { return this.matrix.renderRemoveAsIcon; },
|
|
51746
51875
|
set matrixRenderRemoveAsIcon(val) { this.matrix.renderRemoveAsIcon = val; },
|
|
51747
51876
|
//#endregion
|
|
@@ -51763,14 +51892,8 @@ var settings = {
|
|
|
51763
51892
|
maxPanelCountInCondition: 1
|
|
51764
51893
|
},
|
|
51765
51894
|
//#region panel section, Obsolete properties
|
|
51766
|
-
/**
|
|
51767
|
-
* This property is obsolete. Use the [`settings.panel.maxPanelCountInCondition`](https://surveyjs.io/form-library/documentation/api-reference/settings#panel) property instead.
|
|
51768
|
-
*/
|
|
51769
51895
|
get panelDynamicMaxPanelCountInCondition() { return this.panel.maxPanelCountInCondition; },
|
|
51770
51896
|
set panelDynamicMaxPanelCountInCondition(val) { this.panel.maxPanelCountInCondition = val; },
|
|
51771
|
-
/**
|
|
51772
|
-
* This property is obsolete. Use the [`settings.panel.maxPanelCount`](https://surveyjs.io/form-library/documentation/api-reference/settings#panel) property instead.
|
|
51773
|
-
*/
|
|
51774
51897
|
get panelMaximumPanelCount() { return this.panel.maxPanelCount; },
|
|
51775
51898
|
set panelMaximumPanelCount(val) { this.panel.maxPanelCount = val; },
|
|
51776
51899
|
//#endregion
|
|
@@ -51791,14 +51914,8 @@ var settings = {
|
|
|
51791
51914
|
textRenderMode: "input"
|
|
51792
51915
|
},
|
|
51793
51916
|
//#region readOnly section, Obsolete properties
|
|
51794
|
-
/**
|
|
51795
|
-
* This property is obsolete. Use the [`settings.readOnly.commentRenderMode`](https://surveyjs.io/form-library/documentation/api-reference/settings#readOnly) property instead.
|
|
51796
|
-
*/
|
|
51797
51917
|
get readOnlyCommentRenderMode() { return this.readOnly.commentRenderMode; },
|
|
51798
51918
|
set readOnlyCommentRenderMode(val) { this.readOnly.commentRenderMode = val; },
|
|
51799
|
-
/**
|
|
51800
|
-
* This property is obsolete. Use the [`settings.readOnly.textRenderMode`](https://surveyjs.io/form-library/documentation/api-reference/settings#readOnly) property instead.
|
|
51801
|
-
*/
|
|
51802
51919
|
get readOnlyTextRenderMode() { return this.readOnly.textRenderMode; },
|
|
51803
51920
|
set readOnlyTextRenderMode(val) { this.readOnly.textRenderMode = val; },
|
|
51804
51921
|
//#endregion
|
|
@@ -51818,14 +51935,8 @@ var settings = {
|
|
|
51818
51935
|
includeQuestionsWithHiddenTitle: false
|
|
51819
51936
|
},
|
|
51820
51937
|
//#region numbering section, Obsolete properties
|
|
51821
|
-
/**
|
|
51822
|
-
* This property is obsolete. Use the [`settings.numbering.includeQuestionsWithHiddenTitle`](https://surveyjs.io/form-library/documentation/api-reference/settings#numbering) property instead.
|
|
51823
|
-
*/
|
|
51824
51938
|
get setQuestionVisibleIndexForHiddenTitle() { return this.numbering.includeQuestionsWithHiddenTitle; },
|
|
51825
51939
|
set setQuestionVisibleIndexForHiddenTitle(val) { this.numbering.includeQuestionsWithHiddenTitle = val; },
|
|
51826
|
-
/**
|
|
51827
|
-
* This property is obsolete. Use the [`settings.numbering.includeQuestionsWithHiddenNumber`](https://surveyjs.io/form-library/documentation/api-reference/settings#numbering) property instead.
|
|
51828
|
-
*/
|
|
51829
51940
|
get setQuestionVisibleIndexForHiddenNumber() { return this.numbering.includeQuestionsWithHiddenNumber; },
|
|
51830
51941
|
set setQuestionVisibleIndexForHiddenNumber(val) { this.numbering.includeQuestionsWithHiddenNumber = val; },
|
|
51831
51942
|
//#endregion
|
|
@@ -53223,6 +53334,16 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
53223
53334
|
enumerable: false,
|
|
53224
53335
|
configurable: true
|
|
53225
53336
|
});
|
|
53337
|
+
Object.defineProperty(SurveyElement.prototype, "cssClassesValue", {
|
|
53338
|
+
get: function () {
|
|
53339
|
+
return this.getPropertyValueWithoutDefault("cssClassesValue");
|
|
53340
|
+
},
|
|
53341
|
+
set: function (val) {
|
|
53342
|
+
this.setPropertyValue("cssClassesValue", val);
|
|
53343
|
+
},
|
|
53344
|
+
enumerable: false,
|
|
53345
|
+
configurable: true
|
|
53346
|
+
});
|
|
53226
53347
|
SurveyElement.prototype.ensureCssClassesValue = function () {
|
|
53227
53348
|
if (!this.cssClassesValue) {
|
|
53228
53349
|
this.cssClassesValue = this.calcCssClasses(this.css);
|
|
@@ -53276,7 +53397,7 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
53276
53397
|
SurveyElement.prototype.getIsLoadingFromJson = function () {
|
|
53277
53398
|
if (_super.prototype.getIsLoadingFromJson.call(this))
|
|
53278
53399
|
return true;
|
|
53279
|
-
return this.
|
|
53400
|
+
return this.surveyValue ? this.surveyValue.isLoadingFromJson : false;
|
|
53280
53401
|
};
|
|
53281
53402
|
Object.defineProperty(SurveyElement.prototype, "name", {
|
|
53282
53403
|
/**
|
|
@@ -53801,9 +53922,6 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
53801
53922
|
__decorate([
|
|
53802
53923
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
|
|
53803
53924
|
], SurveyElement.prototype, "isDragMe", void 0);
|
|
53804
|
-
__decorate([
|
|
53805
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
|
53806
|
-
], SurveyElement.prototype, "cssClassesValue", void 0);
|
|
53807
53925
|
__decorate([
|
|
53808
53926
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
|
|
53809
53927
|
], SurveyElement.prototype, "hasVisibleErrors", void 0);
|
|
@@ -54764,6 +54882,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
54764
54882
|
_this.registerPropertyChangedHandlers(["renderBackgroundImage", "backgroundOpacity", "backgroundImageFit", "fitToContainer", "backgroundImageAttachment"], function () {
|
|
54765
54883
|
_this.updateBackgroundImageStyle();
|
|
54766
54884
|
});
|
|
54885
|
+
_this.registerPropertyChangedHandlers(["showPrevButton", "showCompleteButton"], function () { _this.updateButtonsVisibility(); });
|
|
54767
54886
|
_this.onGetQuestionNo.onCallbacksChanged = function () {
|
|
54768
54887
|
_this.resetVisibleIndexes();
|
|
54769
54888
|
};
|
|
@@ -55347,6 +55466,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
55347
55466
|
* - `"none"` - Hides the navigation buttons. This setting may be useful if you [implement custom external navigation](https://surveyjs.io/form-library/examples/external-form-navigation-system/).
|
|
55348
55467
|
* @see goNextPageAutomatic
|
|
55349
55468
|
* @see showPrevButton
|
|
55469
|
+
* @see showCompleteButton
|
|
55350
55470
|
*/
|
|
55351
55471
|
get: function () {
|
|
55352
55472
|
return this.getPropertyValue("showNavigationButtons");
|
|
@@ -55367,6 +55487,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
55367
55487
|
/**
|
|
55368
55488
|
* Specifies whether to display the Previous button. Set this property to `false` if respondents should not move backward along the survey.
|
|
55369
55489
|
* @see showNavigationButtons
|
|
55490
|
+
* @see showCompleteButton
|
|
55370
55491
|
*/
|
|
55371
55492
|
get: function () {
|
|
55372
55493
|
return this.getPropertyValue("showPrevButton");
|
|
@@ -55377,6 +55498,21 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
55377
55498
|
enumerable: false,
|
|
55378
55499
|
configurable: true
|
|
55379
55500
|
});
|
|
55501
|
+
Object.defineProperty(SurveyModel.prototype, "showCompleteButton", {
|
|
55502
|
+
/**
|
|
55503
|
+
* Specifies whether to display the Complete button. Set this property to `false` if respondents should not complete the survey.
|
|
55504
|
+
* @see showNavigationButtons
|
|
55505
|
+
* @see showPrevButton
|
|
55506
|
+
*/
|
|
55507
|
+
get: function () {
|
|
55508
|
+
return this.getPropertyValue("showCompleteButton", true);
|
|
55509
|
+
},
|
|
55510
|
+
set: function (val) {
|
|
55511
|
+
this.setPropertyValue("showCompleteButton", val);
|
|
55512
|
+
},
|
|
55513
|
+
enumerable: false,
|
|
55514
|
+
configurable: true
|
|
55515
|
+
});
|
|
55380
55516
|
Object.defineProperty(SurveyModel.prototype, "showTOC", {
|
|
55381
55517
|
/**
|
|
55382
55518
|
* Gets or sets the visibility of the table of contents.
|
|
@@ -55826,7 +55962,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
55826
55962
|
* [Survey Localization demo](https://surveyjs.io/form-library/examples/survey-localization/ (linkStyle))
|
|
55827
55963
|
*/
|
|
55828
55964
|
get: function () {
|
|
55829
|
-
return this.
|
|
55965
|
+
return this.getPropertyValueWithoutDefault("locale") || _surveyStrings__WEBPACK_IMPORTED_MODULE_8__["surveyLocalization"].currentLocale;
|
|
55830
55966
|
},
|
|
55831
55967
|
set: function (value) {
|
|
55832
55968
|
if (value === _surveyStrings__WEBPACK_IMPORTED_MODULE_8__["surveyLocalization"].defaultLocale && !_surveyStrings__WEBPACK_IMPORTED_MODULE_8__["surveyLocalization"].currentLocale) {
|
|
@@ -56227,6 +56363,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
56227
56363
|
if (newVal !== this._isCompact) {
|
|
56228
56364
|
this._isCompact = newVal;
|
|
56229
56365
|
this.updateElementCss();
|
|
56366
|
+
this.triggerResponsiveness(true);
|
|
56230
56367
|
}
|
|
56231
56368
|
},
|
|
56232
56369
|
enumerable: false,
|
|
@@ -58178,21 +58315,16 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
58178
58315
|
var visPages = this.visiblePages;
|
|
58179
58316
|
var firstErrorPage = null;
|
|
58180
58317
|
var res = true;
|
|
58318
|
+
var rec = { fireCallback: fireCallback, focuseOnFirstError: focusOnFirstError, firstErrorQuestion: null, result: false };
|
|
58181
58319
|
for (var i = 0; i < visPages.length; i++) {
|
|
58182
|
-
if (!visPages[i].validate(fireCallback,
|
|
58320
|
+
if (!visPages[i].validate(fireCallback, focusOnFirstError, rec)) {
|
|
58183
58321
|
if (!firstErrorPage)
|
|
58184
58322
|
firstErrorPage = visPages[i];
|
|
58185
58323
|
res = false;
|
|
58186
58324
|
}
|
|
58187
58325
|
}
|
|
58188
|
-
if (focusOnFirstError && !!firstErrorPage) {
|
|
58189
|
-
|
|
58190
|
-
for (var i_2 = 0; i_2 < questions.length; i_2++) {
|
|
58191
|
-
if (questions[i_2].errors.length > 0) {
|
|
58192
|
-
questions[i_2].focus(true);
|
|
58193
|
-
break;
|
|
58194
|
-
}
|
|
58195
|
-
}
|
|
58326
|
+
if (focusOnFirstError && !!firstErrorPage && !!rec.firstErrorQuestion) {
|
|
58327
|
+
rec.firstErrorQuestion.focus(true);
|
|
58196
58328
|
}
|
|
58197
58329
|
if (!res || !onAsyncValidation)
|
|
58198
58330
|
return res;
|
|
@@ -58722,7 +58854,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
58722
58854
|
var state = this.state;
|
|
58723
58855
|
return this.isEditMode && (this.state === "running" &&
|
|
58724
58856
|
(this.isLastPage && !this.isShowPreviewBeforeComplete || this.canBeCompletedByTrigger)
|
|
58725
|
-
|| state === "preview");
|
|
58857
|
+
|| state === "preview") && this.showCompleteButton;
|
|
58726
58858
|
};
|
|
58727
58859
|
SurveyModel.prototype.calcIsPreviewButtonVisible = function () {
|
|
58728
58860
|
return (this.isEditMode &&
|
|
@@ -60232,8 +60364,8 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
60232
60364
|
this.calculatedValues[i].doCalculation(this.calculatedValues, this.conditionValues, properties);
|
|
60233
60365
|
}
|
|
60234
60366
|
_super.prototype.runConditionCore.call(this, this.conditionValues, properties);
|
|
60235
|
-
for (var
|
|
60236
|
-
pages[
|
|
60367
|
+
for (var i_2 = 0; i_2 < pages.length; i_2++) {
|
|
60368
|
+
pages[i_2].runCondition(this.conditionValues, properties);
|
|
60237
60369
|
}
|
|
60238
60370
|
};
|
|
60239
60371
|
SurveyModel.prototype.runQuestionsTriggers = function (name, value) {
|
|
@@ -60405,13 +60537,13 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
60405
60537
|
page.num = isPageVisible ? page.visibleIndex + 1 : -1;
|
|
60406
60538
|
}
|
|
60407
60539
|
};
|
|
60408
|
-
SurveyModel.prototype.fromJSON = function (json) {
|
|
60540
|
+
SurveyModel.prototype.fromJSON = function (json, options) {
|
|
60409
60541
|
if (!json)
|
|
60410
60542
|
return;
|
|
60411
60543
|
this.questionHashesClear();
|
|
60412
60544
|
this.jsonErrors = null;
|
|
60413
60545
|
var jsonConverter = new _jsonobject__WEBPACK_IMPORTED_MODULE_1__["JsonObject"]();
|
|
60414
|
-
jsonConverter.toObject(json, this);
|
|
60546
|
+
jsonConverter.toObject(json, this, options);
|
|
60415
60547
|
if (jsonConverter.errors.length > 0) {
|
|
60416
60548
|
this.jsonErrors = jsonConverter.errors;
|
|
60417
60549
|
}
|
|
@@ -61007,7 +61139,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61007
61139
|
}
|
|
61008
61140
|
this.updateVisibleIndexes();
|
|
61009
61141
|
this.setCalculatedWidthModeUpdater();
|
|
61010
|
-
if (
|
|
61142
|
+
if (this.canFireAddElement()) {
|
|
61011
61143
|
this.onQuestionAdded.fire(this, {
|
|
61012
61144
|
question: question,
|
|
61013
61145
|
name: question.name,
|
|
@@ -61019,6 +61151,9 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61019
61151
|
});
|
|
61020
61152
|
}
|
|
61021
61153
|
};
|
|
61154
|
+
SurveyModel.prototype.canFireAddElement = function () {
|
|
61155
|
+
return !this.isMovingQuestion || this.isDesignMode && !_settings__WEBPACK_IMPORTED_MODULE_14__["settings"].supportCreatorV2;
|
|
61156
|
+
};
|
|
61022
61157
|
SurveyModel.prototype.questionRemoved = function (question) {
|
|
61023
61158
|
this.questionHashesRemoved(question, question.name, question.getValueName());
|
|
61024
61159
|
this.updateVisibleIndexes();
|
|
@@ -61092,15 +61227,17 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61092
61227
|
}
|
|
61093
61228
|
this.questionHashesPanelAdded(panel);
|
|
61094
61229
|
this.updateVisibleIndexes();
|
|
61095
|
-
this.
|
|
61096
|
-
|
|
61097
|
-
|
|
61098
|
-
|
|
61099
|
-
|
|
61100
|
-
|
|
61101
|
-
|
|
61102
|
-
|
|
61103
|
-
|
|
61230
|
+
if (this.canFireAddElement()) {
|
|
61231
|
+
this.onPanelAdded.fire(this, {
|
|
61232
|
+
panel: panel,
|
|
61233
|
+
name: panel.name,
|
|
61234
|
+
index: index,
|
|
61235
|
+
parent: parentPanel,
|
|
61236
|
+
page: rootPanel,
|
|
61237
|
+
parentPanel: parentPanel,
|
|
61238
|
+
rootPanel: rootPanel,
|
|
61239
|
+
});
|
|
61240
|
+
}
|
|
61104
61241
|
};
|
|
61105
61242
|
SurveyModel.prototype.panelRemoved = function (panel) {
|
|
61106
61243
|
this.updateVisibleIndexes();
|
|
@@ -61829,7 +61966,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61829
61966
|
var containerLayoutElements = [];
|
|
61830
61967
|
for (var _i = 0, _a = this.layoutElements; _i < _a.length; _i++) {
|
|
61831
61968
|
var layoutElement = _a[_i];
|
|
61832
|
-
if (isStrCiEqual(layoutElement.id, "timerpanel")) {
|
|
61969
|
+
if (this.mode !== "display" && isStrCiEqual(layoutElement.id, "timerpanel")) {
|
|
61833
61970
|
if (container === "header") {
|
|
61834
61971
|
if (this.isTimerPanelShowingOnTop && !this.isShowStartingPage) {
|
|
61835
61972
|
containerLayoutElements.push(layoutElement);
|
|
@@ -62137,7 +62274,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
|
|
|
62137
62274
|
onSetValue: function (obj, value, jsonConverter) {
|
|
62138
62275
|
obj.pages.splice(0, obj.pages.length);
|
|
62139
62276
|
var page = obj.addNewPage("");
|
|
62140
|
-
jsonConverter.toObject({ questions: value }, page);
|
|
62277
|
+
jsonConverter.toObject({ questions: value }, page, jsonConverter === null || jsonConverter === void 0 ? void 0 : jsonConverter.options);
|
|
62141
62278
|
},
|
|
62142
62279
|
},
|
|
62143
62280
|
{
|
|
@@ -62729,9 +62866,12 @@ var SurveyTimerModel = /** @class */ (function (_super) {
|
|
|
62729
62866
|
_this.progress = Math.floor((spent + 1) / limit * 100) / 100;
|
|
62730
62867
|
}, 0);
|
|
62731
62868
|
}
|
|
62732
|
-
else if (spent
|
|
62869
|
+
else if (spent <= limit) {
|
|
62733
62870
|
this.progress = Math.floor((spent + 1) / limit * 100) / 100;
|
|
62734
62871
|
}
|
|
62872
|
+
if (this.progress > 1) {
|
|
62873
|
+
this.progress = undefined;
|
|
62874
|
+
}
|
|
62735
62875
|
}
|
|
62736
62876
|
};
|
|
62737
62877
|
SurveyTimerModel.prototype.updateText = function () {
|
|
@@ -64272,12 +64412,13 @@ var CssClassBuilder = /** @class */ (function () {
|
|
|
64272
64412
|
/*!******************************!*\
|
|
64273
64413
|
!*** ./src/utils/devices.ts ***!
|
|
64274
64414
|
\******************************/
|
|
64275
|
-
/*! exports provided: IsMobile, IsTouch, _setIsTouch */
|
|
64415
|
+
/*! exports provided: IsMobile, mouseInfo, IsTouch, _setIsTouch */
|
|
64276
64416
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
64277
64417
|
|
|
64278
64418
|
"use strict";
|
|
64279
64419
|
__webpack_require__.r(__webpack_exports__);
|
|
64280
64420
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IsMobile", function() { return IsMobile; });
|
|
64421
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mouseInfo", function() { return mouseInfo; });
|
|
64281
64422
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IsTouch", function() { return IsTouch; });
|
|
64282
64423
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_setIsTouch", function() { return _setIsTouch; });
|
|
64283
64424
|
// isMobile
|
|
@@ -64301,12 +64442,18 @@ if (typeof navigator !== "undefined" &&
|
|
|
64301
64442
|
})(vendor);
|
|
64302
64443
|
var _IPad = false;
|
|
64303
64444
|
var IsMobile = _isMobile || _IPad;
|
|
64304
|
-
|
|
64305
|
-
|
|
64306
|
-
|
|
64307
|
-
|
|
64308
|
-
|
|
64309
|
-
|
|
64445
|
+
var mouseInfo = {
|
|
64446
|
+
get isTouch() {
|
|
64447
|
+
return !this.hasMouse && this.hasTouchEvent;
|
|
64448
|
+
},
|
|
64449
|
+
get hasTouchEvent() {
|
|
64450
|
+
return typeof window !== "undefined" && ("ontouchstart" in window || navigator.maxTouchPoints > 0);
|
|
64451
|
+
},
|
|
64452
|
+
hasMouse: true
|
|
64453
|
+
};
|
|
64454
|
+
var pointerMatches = (typeof matchMedia !== "undefined" && !!matchMedia && matchMedia("(pointer:fine)")) || undefined;
|
|
64455
|
+
mouseInfo.hasMouse = !!pointerMatches && !!pointerMatches.matches;
|
|
64456
|
+
var IsTouch = mouseInfo.isTouch;
|
|
64310
64457
|
//for tests
|
|
64311
64458
|
function _setIsTouch(val) {
|
|
64312
64459
|
IsTouch = val;
|
|
@@ -65645,7 +65792,7 @@ var RegexValidator = /** @class */ (function (_super) {
|
|
|
65645
65792
|
if (properties === void 0) { properties = null; }
|
|
65646
65793
|
if (!this.regex || this.isValueEmpty(value))
|
|
65647
65794
|
return null;
|
|
65648
|
-
var re =
|
|
65795
|
+
var re = this.createRegExp();
|
|
65649
65796
|
if (Array.isArray(value)) {
|
|
65650
65797
|
for (var i = 0; i < value.length; i++) {
|
|
65651
65798
|
var res = this.hasError(re, value[i], name);
|
|
@@ -65673,6 +65820,19 @@ var RegexValidator = /** @class */ (function (_super) {
|
|
|
65673
65820
|
enumerable: false,
|
|
65674
65821
|
configurable: true
|
|
65675
65822
|
});
|
|
65823
|
+
Object.defineProperty(RegexValidator.prototype, "insensitive", {
|
|
65824
|
+
get: function () {
|
|
65825
|
+
return this.getPropertyValue("insensitive");
|
|
65826
|
+
},
|
|
65827
|
+
set: function (val) {
|
|
65828
|
+
this.setPropertyValue("insensitive", val);
|
|
65829
|
+
},
|
|
65830
|
+
enumerable: false,
|
|
65831
|
+
configurable: true
|
|
65832
|
+
});
|
|
65833
|
+
RegexValidator.prototype.createRegExp = function () {
|
|
65834
|
+
return new RegExp(this.regex, this.insensitive ? "i" : "");
|
|
65835
|
+
};
|
|
65676
65836
|
return RegexValidator;
|
|
65677
65837
|
}(SurveyValidator));
|
|
65678
65838
|
|
|
@@ -65813,7 +65973,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("textvalidator",
|
|
|
65813
65973
|
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("answercountvalidator", ["minCount:number", "maxCount:number"], function () {
|
|
65814
65974
|
return new AnswerCountValidator();
|
|
65815
65975
|
}, "surveyvalidator");
|
|
65816
|
-
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("regexvalidator", ["regex"], function () {
|
|
65976
|
+
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("regexvalidator", ["regex", { name: "insensitive:boolean", visible: false }], function () {
|
|
65817
65977
|
return new RegexValidator();
|
|
65818
65978
|
}, "surveyvalidator");
|
|
65819
65979
|
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("emailvalidator", [], function () {
|