survey-core 2.0.0-rc.3 → 2.0.0-rc.4
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/fesm/i18n/arabic.js +1 -1
- package/fesm/i18n/basque.js +1 -1
- package/fesm/i18n/bulgarian.js +1 -1
- package/fesm/i18n/burmese.js +1 -1
- package/fesm/i18n/catalan.js +1 -1
- package/fesm/i18n/croatian.js +1 -1
- package/fesm/i18n/czech.js +1 -1
- package/fesm/i18n/danish.js +1 -1
- package/fesm/i18n/dutch.js +1 -1
- package/fesm/i18n/english.js +1 -1
- package/fesm/i18n/estonian.js +1 -1
- package/fesm/i18n/finnish.js +1 -1
- package/fesm/i18n/french.js +1 -1
- package/fesm/i18n/georgian.js +1 -1
- package/fesm/i18n/german.js +1 -1
- package/fesm/i18n/greek.js +1 -1
- package/fesm/i18n/hebrew.js +1 -1
- package/fesm/i18n/hindi.js +1 -1
- package/fesm/i18n/hungarian.js +1 -1
- package/fesm/i18n/icelandic.js +1 -1
- package/fesm/i18n/index.js +1 -1
- package/fesm/i18n/indonesian.js +1 -1
- package/fesm/i18n/italian.js +1 -1
- package/fesm/i18n/japanese.js +1 -1
- package/fesm/i18n/kazakh.js +1 -1
- package/fesm/i18n/korean.js +1 -1
- package/fesm/i18n/latvian.js +1 -1
- package/fesm/i18n/lithuanian.js +1 -1
- package/fesm/i18n/macedonian.js +1 -1
- package/fesm/i18n/malay.js +1 -1
- package/fesm/i18n/nl-BE.js +1 -1
- package/fesm/i18n/norwegian.js +1 -1
- package/fesm/i18n/persian.js +1 -1
- package/fesm/i18n/philippines.js +1 -1
- package/fesm/i18n/polish.js +1 -1
- package/fesm/i18n/portuguese-br.js +1 -1
- package/fesm/i18n/portuguese.js +1 -1
- package/fesm/i18n/romanian.js +1 -1
- package/fesm/i18n/russian.js +1 -1
- package/fesm/i18n/serbian.js +1 -1
- package/fesm/i18n/simplified-chinese.js +1 -1
- package/fesm/i18n/slovak.js +1 -1
- package/fesm/i18n/spanish.js +1 -1
- package/fesm/i18n/swahili.js +1 -1
- package/fesm/i18n/swedish.js +1 -1
- package/fesm/i18n/tajik.js +1 -1
- package/fesm/i18n/telugu.js +1 -1
- package/fesm/i18n/thai.js +1 -1
- package/fesm/i18n/traditional-chinese.js +1 -1
- package/fesm/i18n/turkish.js +1 -1
- package/fesm/i18n/ukrainian.js +1 -1
- package/fesm/i18n/urdu.js +1 -1
- package/fesm/i18n/vietnamese.js +1 -1
- package/fesm/i18n/welsh.js +1 -1
- package/fesm/icons/iconsV1.js +1 -1
- package/fesm/icons/iconsV2.js +1 -1
- package/fesm/survey-core.js +255 -191
- package/fesm/survey-core.js.map +1 -1
- package/fesm/survey.i18n.js +1 -1
- package/fesm/themes/borderless-dark-panelless.js +1 -1
- package/fesm/themes/borderless-dark.js +1 -1
- package/fesm/themes/borderless-light-panelless.js +1 -1
- package/fesm/themes/borderless-light.js +1 -1
- package/fesm/themes/contrast-dark-panelless.js +1 -1
- package/fesm/themes/contrast-dark.js +1 -1
- package/fesm/themes/contrast-light-panelless.js +1 -1
- package/fesm/themes/contrast-light.js +1 -1
- package/fesm/themes/default-dark-panelless.js +1 -1
- package/fesm/themes/default-dark.js +1 -1
- package/fesm/themes/default-light-panelless.js +1 -1
- package/fesm/themes/default-light.js +1 -1
- package/fesm/themes/doubleborder-dark-panelless.js +1 -1
- package/fesm/themes/doubleborder-dark.js +1 -1
- package/fesm/themes/doubleborder-light-panelles.js +1 -1
- package/fesm/themes/doubleborder-light.js +1 -1
- package/fesm/themes/flat-dark-panelless.js +1 -1
- package/fesm/themes/flat-dark.js +1 -1
- package/fesm/themes/flat-light-panelless.js +1 -1
- package/fesm/themes/flat-light.js +1 -1
- package/fesm/themes/index.js +1 -1
- package/fesm/themes/layered-dark-panelless.js +1 -1
- package/fesm/themes/layered-dark.js +1 -1
- package/fesm/themes/layered-light-panelless.js +1 -1
- package/fesm/themes/layered-light.js +1 -1
- package/fesm/themes/plain-dark-panelless.js +1 -1
- package/fesm/themes/plain-dark.js +1 -1
- package/fesm/themes/plain-light-panelless.js +1 -1
- package/fesm/themes/plain-light.js +1 -1
- package/fesm/themes/sharp-dark-panelless.js +1 -1
- package/fesm/themes/sharp-dark.js +1 -1
- package/fesm/themes/sharp-light-panelless.js +1 -1
- package/fesm/themes/sharp-light.js +1 -1
- package/fesm/themes/solid-dark-panelless.js +1 -1
- package/fesm/themes/solid-dark.js +1 -1
- package/fesm/themes/solid-light-panelless.js +1 -1
- package/fesm/themes/solid-light.js +1 -1
- package/fesm/themes/three-dimensional-dark-panelless.js +1 -1
- package/fesm/themes/three-dimensional-dark.js +1 -1
- package/fesm/themes/three-dimensional-light-panelless.js +1 -1
- package/fesm/themes/three-dimensional-light.js +1 -1
- package/i18n/arabic.js +1 -1
- package/i18n/arabic.min.js.LICENSE.txt +1 -1
- package/i18n/basque.js +1 -1
- package/i18n/basque.min.js.LICENSE.txt +1 -1
- package/i18n/bulgarian.js +1 -1
- package/i18n/bulgarian.min.js.LICENSE.txt +1 -1
- package/i18n/burmese.js +1 -1
- package/i18n/burmese.min.js.LICENSE.txt +1 -1
- package/i18n/catalan.js +1 -1
- package/i18n/catalan.min.js.LICENSE.txt +1 -1
- package/i18n/croatian.js +1 -1
- package/i18n/croatian.min.js.LICENSE.txt +1 -1
- package/i18n/czech.js +1 -1
- package/i18n/czech.min.js.LICENSE.txt +1 -1
- package/i18n/danish.js +1 -1
- package/i18n/danish.min.js.LICENSE.txt +1 -1
- package/i18n/dutch.js +1 -1
- package/i18n/dutch.min.js.LICENSE.txt +1 -1
- package/i18n/english.js +1 -1
- package/i18n/english.min.js.LICENSE.txt +1 -1
- package/i18n/estonian.js +1 -1
- package/i18n/estonian.min.js.LICENSE.txt +1 -1
- package/i18n/finnish.js +1 -1
- package/i18n/finnish.min.js.LICENSE.txt +1 -1
- package/i18n/french.js +1 -1
- package/i18n/french.min.js.LICENSE.txt +1 -1
- package/i18n/georgian.js +1 -1
- package/i18n/georgian.min.js.LICENSE.txt +1 -1
- package/i18n/german.js +1 -1
- package/i18n/german.min.js.LICENSE.txt +1 -1
- package/i18n/greek.js +1 -1
- package/i18n/greek.min.js.LICENSE.txt +1 -1
- package/i18n/hebrew.js +1 -1
- package/i18n/hebrew.min.js.LICENSE.txt +1 -1
- package/i18n/hindi.js +1 -1
- package/i18n/hindi.min.js.LICENSE.txt +1 -1
- package/i18n/hungarian.js +1 -1
- package/i18n/hungarian.min.js.LICENSE.txt +1 -1
- package/i18n/icelandic.js +1 -1
- package/i18n/icelandic.min.js.LICENSE.txt +1 -1
- package/i18n/index.js +1 -1
- package/i18n/index.min.js.LICENSE.txt +1 -1
- package/i18n/indonesian.js +1 -1
- package/i18n/indonesian.min.js.LICENSE.txt +1 -1
- package/i18n/italian.js +1 -1
- package/i18n/italian.min.js.LICENSE.txt +1 -1
- package/i18n/japanese.js +1 -1
- package/i18n/japanese.min.js.LICENSE.txt +1 -1
- package/i18n/kazakh.js +1 -1
- package/i18n/kazakh.min.js.LICENSE.txt +1 -1
- package/i18n/korean.js +1 -1
- package/i18n/korean.min.js.LICENSE.txt +1 -1
- package/i18n/latvian.js +1 -1
- package/i18n/latvian.min.js.LICENSE.txt +1 -1
- package/i18n/lithuanian.js +1 -1
- package/i18n/lithuanian.min.js.LICENSE.txt +1 -1
- package/i18n/macedonian.js +1 -1
- package/i18n/macedonian.min.js.LICENSE.txt +1 -1
- package/i18n/malay.js +1 -1
- package/i18n/malay.min.js.LICENSE.txt +1 -1
- package/i18n/nl-BE.js +1 -1
- package/i18n/nl-BE.min.js.LICENSE.txt +1 -1
- package/i18n/norwegian.js +1 -1
- package/i18n/norwegian.min.js.LICENSE.txt +1 -1
- package/i18n/persian.js +1 -1
- package/i18n/persian.min.js.LICENSE.txt +1 -1
- package/i18n/philippines.js +1 -1
- package/i18n/philippines.min.js.LICENSE.txt +1 -1
- package/i18n/polish.js +1 -1
- package/i18n/polish.min.js.LICENSE.txt +1 -1
- package/i18n/portuguese-br.js +1 -1
- package/i18n/portuguese-br.min.js.LICENSE.txt +1 -1
- package/i18n/portuguese.js +1 -1
- package/i18n/portuguese.min.js.LICENSE.txt +1 -1
- package/i18n/romanian.js +1 -1
- package/i18n/romanian.min.js.LICENSE.txt +1 -1
- package/i18n/russian.js +1 -1
- package/i18n/russian.min.js.LICENSE.txt +1 -1
- package/i18n/serbian.js +1 -1
- package/i18n/serbian.min.js.LICENSE.txt +1 -1
- package/i18n/simplified-chinese.js +1 -1
- package/i18n/simplified-chinese.min.js.LICENSE.txt +1 -1
- package/i18n/slovak.js +1 -1
- package/i18n/slovak.min.js.LICENSE.txt +1 -1
- package/i18n/spanish.js +1 -1
- package/i18n/spanish.min.js.LICENSE.txt +1 -1
- package/i18n/swahili.js +1 -1
- package/i18n/swahili.min.js.LICENSE.txt +1 -1
- package/i18n/swedish.js +1 -1
- package/i18n/swedish.min.js.LICENSE.txt +1 -1
- package/i18n/tajik.js +1 -1
- package/i18n/tajik.min.js.LICENSE.txt +1 -1
- package/i18n/telugu.js +1 -1
- package/i18n/telugu.min.js.LICENSE.txt +1 -1
- package/i18n/thai.js +1 -1
- package/i18n/thai.min.js.LICENSE.txt +1 -1
- package/i18n/traditional-chinese.js +1 -1
- package/i18n/traditional-chinese.min.js.LICENSE.txt +1 -1
- package/i18n/turkish.js +1 -1
- package/i18n/turkish.min.js.LICENSE.txt +1 -1
- package/i18n/ukrainian.js +1 -1
- package/i18n/ukrainian.min.js.LICENSE.txt +1 -1
- package/i18n/urdu.js +1 -1
- package/i18n/urdu.min.js.LICENSE.txt +1 -1
- package/i18n/vietnamese.js +1 -1
- package/i18n/vietnamese.min.js.LICENSE.txt +1 -1
- package/i18n/welsh.js +1 -1
- package/i18n/welsh.min.js.LICENSE.txt +1 -1
- package/icons/iconsV1.js +1 -1
- package/icons/iconsV1.min.js.LICENSE.txt +1 -1
- package/icons/iconsV2.js +1 -1
- package/icons/iconsV2.min.js.LICENSE.txt +1 -1
- package/package.json +1 -1
- package/survey-core.css +1 -1
- package/survey-core.fontless.css +1 -1
- package/survey-core.fontless.min.css +1 -1
- package/survey-core.min.css +1 -1
- package/survey.core.js +374 -201
- package/survey.core.js.map +1 -1
- package/survey.core.min.js +1 -1
- package/survey.core.min.js.LICENSE.txt +1 -1
- package/survey.i18n.js +1 -1
- package/survey.i18n.min.js.LICENSE.txt +1 -1
- package/themes/borderless-dark-panelless.js +1 -1
- package/themes/borderless-dark-panelless.min.js.LICENSE.txt +1 -1
- package/themes/borderless-dark.js +1 -1
- package/themes/borderless-dark.min.js.LICENSE.txt +1 -1
- package/themes/borderless-light-panelless.js +1 -1
- package/themes/borderless-light-panelless.min.js.LICENSE.txt +1 -1
- package/themes/borderless-light.js +1 -1
- package/themes/borderless-light.min.js.LICENSE.txt +1 -1
- package/themes/contrast-dark-panelless.js +1 -1
- package/themes/contrast-dark-panelless.min.js.LICENSE.txt +1 -1
- package/themes/contrast-dark.js +1 -1
- package/themes/contrast-dark.min.js.LICENSE.txt +1 -1
- package/themes/contrast-light-panelless.js +1 -1
- package/themes/contrast-light-panelless.min.js.LICENSE.txt +1 -1
- package/themes/contrast-light.js +1 -1
- package/themes/contrast-light.min.js.LICENSE.txt +1 -1
- package/themes/default-dark-panelless.js +1 -1
- package/themes/default-dark-panelless.min.js.LICENSE.txt +1 -1
- package/themes/default-dark.js +1 -1
- package/themes/default-dark.min.js.LICENSE.txt +1 -1
- package/themes/default-light-panelless.js +1 -1
- package/themes/default-light-panelless.min.js.LICENSE.txt +1 -1
- package/themes/default-light.js +1 -1
- package/themes/default-light.min.js.LICENSE.txt +1 -1
- package/themes/doubleborder-dark-panelless.js +1 -1
- package/themes/doubleborder-dark-panelless.min.js.LICENSE.txt +1 -1
- package/themes/doubleborder-dark.js +1 -1
- package/themes/doubleborder-dark.min.js.LICENSE.txt +1 -1
- package/themes/doubleborder-light-panelles.js +1 -1
- package/themes/doubleborder-light-panelles.min.js.LICENSE.txt +1 -1
- package/themes/doubleborder-light.js +1 -1
- package/themes/doubleborder-light.min.js.LICENSE.txt +1 -1
- package/themes/flat-dark-panelless.js +1 -1
- package/themes/flat-dark-panelless.min.js.LICENSE.txt +1 -1
- package/themes/flat-dark.js +1 -1
- package/themes/flat-dark.min.js.LICENSE.txt +1 -1
- package/themes/flat-light-panelless.js +1 -1
- package/themes/flat-light-panelless.min.js.LICENSE.txt +1 -1
- package/themes/flat-light.js +1 -1
- package/themes/flat-light.min.js.LICENSE.txt +1 -1
- package/themes/index.js +1 -1
- package/themes/index.min.js.LICENSE.txt +1 -1
- package/themes/layered-dark-panelless.js +1 -1
- package/themes/layered-dark-panelless.min.js.LICENSE.txt +1 -1
- package/themes/layered-dark.js +1 -1
- package/themes/layered-dark.min.js.LICENSE.txt +1 -1
- package/themes/layered-light-panelless.js +1 -1
- package/themes/layered-light-panelless.min.js.LICENSE.txt +1 -1
- package/themes/layered-light.js +1 -1
- package/themes/layered-light.min.js.LICENSE.txt +1 -1
- package/themes/plain-dark-panelless.js +1 -1
- package/themes/plain-dark-panelless.min.js.LICENSE.txt +1 -1
- package/themes/plain-dark.js +1 -1
- package/themes/plain-dark.min.js.LICENSE.txt +1 -1
- package/themes/plain-light-panelless.js +1 -1
- package/themes/plain-light-panelless.min.js.LICENSE.txt +1 -1
- package/themes/plain-light.js +1 -1
- package/themes/plain-light.min.js.LICENSE.txt +1 -1
- package/themes/sharp-dark-panelless.js +1 -1
- package/themes/sharp-dark-panelless.min.js.LICENSE.txt +1 -1
- package/themes/sharp-dark.js +1 -1
- package/themes/sharp-dark.min.js.LICENSE.txt +1 -1
- package/themes/sharp-light-panelless.js +1 -1
- package/themes/sharp-light-panelless.min.js.LICENSE.txt +1 -1
- package/themes/sharp-light.js +1 -1
- package/themes/sharp-light.min.js.LICENSE.txt +1 -1
- package/themes/solid-dark-panelless.js +1 -1
- package/themes/solid-dark-panelless.min.js.LICENSE.txt +1 -1
- package/themes/solid-dark.js +1 -1
- package/themes/solid-dark.min.js.LICENSE.txt +1 -1
- package/themes/solid-light-panelless.js +1 -1
- package/themes/solid-light-panelless.min.js.LICENSE.txt +1 -1
- package/themes/solid-light.js +1 -1
- package/themes/solid-light.min.js.LICENSE.txt +1 -1
- package/themes/three-dimensional-dark-panelless.js +1 -1
- package/themes/three-dimensional-dark-panelless.min.js.LICENSE.txt +1 -1
- package/themes/three-dimensional-dark.js +1 -1
- package/themes/three-dimensional-dark.min.js.LICENSE.txt +1 -1
- package/themes/three-dimensional-light-panelless.js +1 -1
- package/themes/three-dimensional-light-panelless.min.js.LICENSE.txt +1 -1
- package/themes/three-dimensional-light.js +1 -1
- package/themes/three-dimensional-light.min.js.LICENSE.txt +1 -1
- package/typings/src/base-interfaces.d.ts +1 -0
- package/typings/src/base.d.ts +5 -1
- package/typings/src/itemvalue.d.ts +7 -2
- package/typings/src/jsonobject.d.ts +3 -1
- package/typings/src/localizablestring.d.ts +1 -0
- package/typings/src/progress-buttons.d.ts +2 -0
- package/typings/src/question.d.ts +13 -6
- package/typings/src/question_baseselect.d.ts +7 -3
- package/typings/src/question_dropdown.d.ts +3 -2
- package/typings/src/question_rating.d.ts +2 -2
- package/typings/src/survey-element.d.ts +4 -2
- package/typings/src/survey.d.ts +15 -16
- package/typings/src/svgbundle.d.ts +1 -0
package/fesm/survey-core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v2.0.0-rc.
|
|
2
|
+
* surveyjs - Survey JavaScript library v2.0.0-rc.4
|
|
3
3
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
@@ -1370,8 +1370,10 @@ class JsonObjectProperty {
|
|
|
1370
1370
|
set uniquePropertyName(val) {
|
|
1371
1371
|
this.uniquePropertyValue = val;
|
|
1372
1372
|
}
|
|
1373
|
-
|
|
1374
|
-
|
|
1373
|
+
isPropertySerializable(obj) {
|
|
1374
|
+
if (this.isSerializableFunc)
|
|
1375
|
+
return this.isSerializableFunc(obj);
|
|
1376
|
+
return this.isSerializable;
|
|
1375
1377
|
}
|
|
1376
1378
|
getDefaultValue(obj) {
|
|
1377
1379
|
let result = !!this.defaultValueFunc ? this.defaultValueFunc(obj) : this.defaultValueValue;
|
|
@@ -1945,6 +1947,9 @@ class JsonMetadataClass {
|
|
|
1945
1947
|
if (!Helpers.isValueEmpty(propInfo.isSerializable)) {
|
|
1946
1948
|
prop.isSerializable = propInfo.isSerializable;
|
|
1947
1949
|
}
|
|
1950
|
+
if (!Helpers.isValueEmpty(propInfo.isSerializableFunc)) {
|
|
1951
|
+
prop.isSerializableFunc = propInfo.isSerializableFunc;
|
|
1952
|
+
}
|
|
1948
1953
|
if (!Helpers.isValueEmpty(propInfo.isLightSerializable)) {
|
|
1949
1954
|
prop.isLightSerializable = propInfo.isLightSerializable;
|
|
1950
1955
|
}
|
|
@@ -2158,7 +2163,7 @@ class JsonMetadata {
|
|
|
2158
2163
|
}
|
|
2159
2164
|
}
|
|
2160
2165
|
getObjPropertyValueCore(obj, prop) {
|
|
2161
|
-
if (!prop.
|
|
2166
|
+
if (!prop.isPropertySerializable(obj))
|
|
2162
2167
|
return obj[prop.name];
|
|
2163
2168
|
if (prop.isLocalizable) {
|
|
2164
2169
|
if (prop.isArray)
|
|
@@ -2855,7 +2860,7 @@ class JsonObject {
|
|
|
2855
2860
|
valueToJson(obj, result, prop, options) {
|
|
2856
2861
|
if (!options)
|
|
2857
2862
|
options = {};
|
|
2858
|
-
if (prop.
|
|
2863
|
+
if (!prop.isPropertySerializable(obj) || (prop.isLightSerializable === false && this.lightSerializing))
|
|
2859
2864
|
return;
|
|
2860
2865
|
if (options.version && !prop.isAvailableInVersion(options.version))
|
|
2861
2866
|
return;
|
|
@@ -7709,6 +7714,7 @@ class Bindings {
|
|
|
7709
7714
|
getType() {
|
|
7710
7715
|
return "bindings";
|
|
7711
7716
|
}
|
|
7717
|
+
get isSurveyObj() { return true; }
|
|
7712
7718
|
getNames() {
|
|
7713
7719
|
var res = [];
|
|
7714
7720
|
this.fillProperties();
|
|
@@ -7980,7 +7986,6 @@ class Base {
|
|
|
7980
7986
|
this.supportOnElementRerenderedEvent = true;
|
|
7981
7987
|
this.onElementRerenderedEventEnabled = false;
|
|
7982
7988
|
this._onElementRerendered = new EventBase();
|
|
7983
|
-
this.bindingsValue = new Bindings(this);
|
|
7984
7989
|
CustomPropertiesCollection.createProperties(this);
|
|
7985
7990
|
this.onBaseCreating();
|
|
7986
7991
|
this.isCreating = false;
|
|
@@ -8003,6 +8008,7 @@ class Base {
|
|
|
8003
8008
|
get isDisposed() {
|
|
8004
8009
|
return this.isDisposedValue === true;
|
|
8005
8010
|
}
|
|
8011
|
+
get isSurveyObj() { return true; }
|
|
8006
8012
|
addEvent() {
|
|
8007
8013
|
const res = new EventBase();
|
|
8008
8014
|
this.eventList.push(res);
|
|
@@ -8044,10 +8050,18 @@ class Base {
|
|
|
8044
8050
|
return !!this.getSurvey(true);
|
|
8045
8051
|
}
|
|
8046
8052
|
get bindings() {
|
|
8053
|
+
if (!this.bindingsValue) {
|
|
8054
|
+
this.bindingsValue = new Bindings(this);
|
|
8055
|
+
}
|
|
8047
8056
|
return this.bindingsValue;
|
|
8048
8057
|
}
|
|
8058
|
+
isBindingEmpty() {
|
|
8059
|
+
return !this.bindingsValue || this.bindingsValue.isEmpty();
|
|
8060
|
+
}
|
|
8049
8061
|
checkBindings(valueName, value) { }
|
|
8050
8062
|
updateBindings(propertyName, value) {
|
|
8063
|
+
if (!this.bindingsValue)
|
|
8064
|
+
return;
|
|
8051
8065
|
var valueName = this.bindings.getValueNameByPropertyName(propertyName);
|
|
8052
8066
|
if (!!valueName) {
|
|
8053
8067
|
this.updateBindingValue(valueName, value);
|
|
@@ -8530,6 +8544,11 @@ class Base {
|
|
|
8530
8544
|
locStr.disableLocalization = prop && prop.isLocalizable === false;
|
|
8531
8545
|
return locStr;
|
|
8532
8546
|
}
|
|
8547
|
+
removeLocalizableString(name) {
|
|
8548
|
+
if (this.localizableStrings) {
|
|
8549
|
+
delete this.localizableStrings[name];
|
|
8550
|
+
}
|
|
8551
|
+
}
|
|
8533
8552
|
getLocalizableString(name) {
|
|
8534
8553
|
return !!this.localizableStrings ? this.localizableStrings[name] : null;
|
|
8535
8554
|
}
|
|
@@ -8562,7 +8581,7 @@ class Base {
|
|
|
8562
8581
|
if (!!this.arraysInfo) {
|
|
8563
8582
|
for (let key in this.arraysInfo) {
|
|
8564
8583
|
const prop = this.getPropertyByName(key);
|
|
8565
|
-
if (!prop || !prop.
|
|
8584
|
+
if (!prop || !prop.isPropertySerializable(this))
|
|
8566
8585
|
continue;
|
|
8567
8586
|
let items = this.getPropertyValue(key);
|
|
8568
8587
|
if (!items || !items.length)
|
|
@@ -11085,13 +11104,27 @@ class SurveyElementCore extends Base {
|
|
|
11085
11104
|
setTitleValue(val) {
|
|
11086
11105
|
this.setLocalizableStringText("title", val);
|
|
11087
11106
|
}
|
|
11088
|
-
|
|
11107
|
+
/**
|
|
11108
|
+
* Returns `true` if the survey element has a description.
|
|
11109
|
+
* @see description
|
|
11110
|
+
*/
|
|
11111
|
+
get hasDescription() {
|
|
11112
|
+
return this.getPropertyValue("hasDescription", undefined, () => this.calcDescriptionVisibility());
|
|
11113
|
+
}
|
|
11114
|
+
set hasDescription(val) {
|
|
11115
|
+
this.setPropertyValue("hasDescription", val);
|
|
11116
|
+
}
|
|
11117
|
+
calcDescriptionVisibility() {
|
|
11118
|
+
const newDescription = this.description;
|
|
11089
11119
|
let showPlaceholder = false;
|
|
11090
11120
|
if (this.isDesignMode) {
|
|
11091
11121
|
const property = Serializer.findProperty(this.getType(), "description");
|
|
11092
11122
|
showPlaceholder = !!(property === null || property === void 0 ? void 0 : property.placeholder);
|
|
11093
11123
|
}
|
|
11094
|
-
|
|
11124
|
+
return !!newDescription || (showPlaceholder && this.isDesignMode);
|
|
11125
|
+
}
|
|
11126
|
+
resetDescriptionVisibility() {
|
|
11127
|
+
this.resetPropertyValue("hasDescription");
|
|
11095
11128
|
}
|
|
11096
11129
|
get locDescription() {
|
|
11097
11130
|
return this.getLocalizableString("description");
|
|
@@ -11129,13 +11162,10 @@ class SurveyElementCore extends Base {
|
|
|
11129
11162
|
}
|
|
11130
11163
|
getIsTitleRenderedAsString() { return !this.isTitleOwner; }
|
|
11131
11164
|
}
|
|
11132
|
-
survey_element_decorate([
|
|
11133
|
-
property({})
|
|
11134
|
-
], SurveyElementCore.prototype, "hasDescription", void 0);
|
|
11135
11165
|
survey_element_decorate([
|
|
11136
11166
|
property({
|
|
11137
11167
|
localizable: true, onSet: (newDescription, self) => {
|
|
11138
|
-
self.
|
|
11168
|
+
self.resetDescriptionVisibility();
|
|
11139
11169
|
}
|
|
11140
11170
|
})
|
|
11141
11171
|
], SurveyElementCore.prototype, "description", void 0);
|
|
@@ -11310,7 +11340,7 @@ class SurveyElement extends SurveyElementCore {
|
|
|
11310
11340
|
}
|
|
11311
11341
|
}, () => this.renderedIsExpanded);
|
|
11312
11342
|
this.onAfterRenderElement = this.addEvent();
|
|
11313
|
-
this.name
|
|
11343
|
+
this.setPropertyValueDirectly("name", this.getValidName(name));
|
|
11314
11344
|
this.createNewArray("errors");
|
|
11315
11345
|
this.createNewArray("titleActions");
|
|
11316
11346
|
this.registerPropertyChangedHandlers(["isReadOnly"], () => { this.onReadOnlyChanged(); });
|
|
@@ -11527,8 +11557,8 @@ class SurveyElement extends SurveyElementCore {
|
|
|
11527
11557
|
this.textProcessorValue = this.surveyImplValue.getTextProcessor();
|
|
11528
11558
|
this.onSetData();
|
|
11529
11559
|
}
|
|
11530
|
-
if (!!this.survey
|
|
11531
|
-
this.
|
|
11560
|
+
if (!!this.survey) {
|
|
11561
|
+
this.resetDescriptionVisibility();
|
|
11532
11562
|
this.clearCssClasses();
|
|
11533
11563
|
}
|
|
11534
11564
|
}
|
|
@@ -11774,7 +11804,6 @@ class SurveyElement extends SurveyElementCore {
|
|
|
11774
11804
|
if (!this.survey) {
|
|
11775
11805
|
this.onSurveyLoad();
|
|
11776
11806
|
}
|
|
11777
|
-
this.updateDescriptionVisibility(this.description);
|
|
11778
11807
|
}
|
|
11779
11808
|
setVisibleIndex(index) {
|
|
11780
11809
|
return 0;
|
|
@@ -12149,7 +12178,7 @@ class SurveyElement extends SurveyElementCore {
|
|
|
12149
12178
|
}
|
|
12150
12179
|
localeChanged() {
|
|
12151
12180
|
super.localeChanged();
|
|
12152
|
-
this.
|
|
12181
|
+
this.resetDescriptionVisibility();
|
|
12153
12182
|
if (this.errors.length > 0) {
|
|
12154
12183
|
this.errors.forEach(err => {
|
|
12155
12184
|
err.updateText();
|
|
@@ -12388,6 +12417,8 @@ class LocalizableString {
|
|
|
12388
12417
|
return "";
|
|
12389
12418
|
}
|
|
12390
12419
|
strChanged() {
|
|
12420
|
+
if (!this.isTextRequested)
|
|
12421
|
+
return;
|
|
12391
12422
|
this.searchableText = undefined;
|
|
12392
12423
|
if (this.renderedText === undefined && this.isEmpty && !this.onGetTextCallback && !this.localizationName)
|
|
12393
12424
|
return;
|
|
@@ -12425,6 +12456,7 @@ class LocalizableString {
|
|
|
12425
12456
|
return res;
|
|
12426
12457
|
}
|
|
12427
12458
|
get pureText() {
|
|
12459
|
+
this.isTextRequested = true;
|
|
12428
12460
|
var loc = this.locale;
|
|
12429
12461
|
if (!loc)
|
|
12430
12462
|
loc = this.defaultLoc;
|
|
@@ -15463,12 +15495,6 @@ class TextAreaModel {
|
|
|
15463
15495
|
}
|
|
15464
15496
|
|
|
15465
15497
|
;// ./src/question.ts
|
|
15466
|
-
var question_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
15467
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
15468
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
15469
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
15470
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15471
|
-
};
|
|
15472
15498
|
|
|
15473
15499
|
|
|
15474
15500
|
|
|
@@ -15523,6 +15549,12 @@ class Question extends SurveyElement {
|
|
|
15523
15549
|
this._isMobile = val;
|
|
15524
15550
|
}
|
|
15525
15551
|
themeChanged(theme) { }
|
|
15552
|
+
get _isMobile() { return this.getPropertyValue("_isMobile", false); }
|
|
15553
|
+
set _isMobile(val) { this.setPropertyValue("_isMobile", val); }
|
|
15554
|
+
get forceIsInputReadOnly() { return this.getPropertyValue("forceIsInputReadOnly"); }
|
|
15555
|
+
set forceIsInputReadOnly(val) { this.setPropertyValue("forceIsInputReadOnly", val); }
|
|
15556
|
+
get ariaExpanded() { return this.getPropertyValue("ariaExpanded"); }
|
|
15557
|
+
set ariaExpanded(val) { this.setPropertyValue("ariaExpanded", val); }
|
|
15526
15558
|
constructor(name) {
|
|
15527
15559
|
super(name);
|
|
15528
15560
|
this.customWidgetData = { isNeedRender: true };
|
|
@@ -15546,7 +15578,7 @@ class Question extends SurveyElement {
|
|
|
15546
15578
|
this.isRunningValidatorsValue = false;
|
|
15547
15579
|
this.isValueChangedInSurvey = false;
|
|
15548
15580
|
this.allowNotifyValueChanged = true;
|
|
15549
|
-
this.id
|
|
15581
|
+
this.setPropertyValueDirectly("id", Question.getQuestionId());
|
|
15550
15582
|
this.onCreating();
|
|
15551
15583
|
this.createNewArray("validators", (validator) => {
|
|
15552
15584
|
validator.errorOwner = this;
|
|
@@ -15556,6 +15588,7 @@ class Question extends SurveyElement {
|
|
|
15556
15588
|
this.addExpressionProperty("requiredIf", (obj, res) => { this.isRequired = res === true; });
|
|
15557
15589
|
this.createLocalizableString("commentText", this, true, "otherItemText");
|
|
15558
15590
|
this.createLocalizableString("requiredErrorText", this);
|
|
15591
|
+
this.createLocalizableString("commentPlaceholder", this);
|
|
15559
15592
|
this.addTriggerInfo("resetValueIf", () => !this.isEmpty(), () => {
|
|
15560
15593
|
this.startSetValueOnExpression();
|
|
15561
15594
|
this.clearValue();
|
|
@@ -15583,6 +15616,9 @@ class Question extends SurveyElement {
|
|
|
15583
15616
|
this.registerPropertyChangedHandlers(["showCommentArea", "showOtherItem"], () => {
|
|
15584
15617
|
this.initCommentFromSurvey();
|
|
15585
15618
|
});
|
|
15619
|
+
this.registerPropertyChangedHandlers(["commentPlaceholder"], () => {
|
|
15620
|
+
this.resetRenderedCommentPlaceholder();
|
|
15621
|
+
});
|
|
15586
15622
|
this.registerFunctionOnPropertiesValueChanged(["no", "readOnly", "hasVisibleErrors", "containsErrors"], () => {
|
|
15587
15623
|
this.updateQuestionCss();
|
|
15588
15624
|
});
|
|
@@ -16332,6 +16368,15 @@ class Question extends SurveyElement {
|
|
|
16332
16368
|
get locCommentText() {
|
|
16333
16369
|
return this.getLocalizableString("commentText");
|
|
16334
16370
|
}
|
|
16371
|
+
/**
|
|
16372
|
+
* A placeholder for the comment area. Applies when the `showCommentArea` property is `true`.
|
|
16373
|
+
* @see showCommentArea
|
|
16374
|
+
* @see comment
|
|
16375
|
+
* @see commentText
|
|
16376
|
+
*/
|
|
16377
|
+
get commentPlaceholder() { return this.getLocalizableStringText("commentPlaceholder"); }
|
|
16378
|
+
set commentPlaceholder(val) { this.setLocalizableStringText("commentPlaceholder", val); }
|
|
16379
|
+
get locCommentPlaceholder() { return this.getLocalizableString("commentPlaceholder"); }
|
|
16335
16380
|
get commentPlaceHolder() {
|
|
16336
16381
|
return this.commentPlaceholder;
|
|
16337
16382
|
}
|
|
@@ -17134,7 +17179,7 @@ class Question extends SurveyElement {
|
|
|
17134
17179
|
return false;
|
|
17135
17180
|
if (Array.isArray(val))
|
|
17136
17181
|
return val.length > 0 ? this.isValueSurveyElement(val[0]) : false;
|
|
17137
|
-
return
|
|
17182
|
+
return val.isSurveyObj === true;
|
|
17138
17183
|
}
|
|
17139
17184
|
canClearValueAsInvisible(reason) {
|
|
17140
17185
|
if (reason === "onHiddenContainer" && !this.isParentVisible)
|
|
@@ -18029,6 +18074,10 @@ class Question extends SurveyElement {
|
|
|
18029
18074
|
return (!!this.customWidget ||
|
|
18030
18075
|
this.getComponentName() === "default");
|
|
18031
18076
|
}
|
|
18077
|
+
get renderAs() { return this.getPropertyValue("renderAs"); }
|
|
18078
|
+
set renderAs(val) { this.setPropertyValue("renderAs", val); }
|
|
18079
|
+
get inMatrixMode() { return this.getPropertyValue("inMatrixMode", false); }
|
|
18080
|
+
set inMatrixMode(val) { this.setPropertyValue("inMatrixMode", val); }
|
|
18032
18081
|
//ISurveyErrorOwner
|
|
18033
18082
|
getErrorCustomText(text, error) {
|
|
18034
18083
|
if (!!this.survey)
|
|
@@ -18284,24 +18333,6 @@ Question.TextPreprocessorValuesMap = {
|
|
|
18284
18333
|
require: "requiredMark",
|
|
18285
18334
|
};
|
|
18286
18335
|
Question.questionCounter = 100;
|
|
18287
|
-
question_decorate([
|
|
18288
|
-
property({ defaultValue: false })
|
|
18289
|
-
], Question.prototype, "_isMobile", void 0);
|
|
18290
|
-
question_decorate([
|
|
18291
|
-
property()
|
|
18292
|
-
], Question.prototype, "forceIsInputReadOnly", void 0);
|
|
18293
|
-
question_decorate([
|
|
18294
|
-
property()
|
|
18295
|
-
], Question.prototype, "ariaExpanded", void 0);
|
|
18296
|
-
question_decorate([
|
|
18297
|
-
property({ localizable: true, onSet: (val, target) => target.resetRenderedCommentPlaceholder() })
|
|
18298
|
-
], Question.prototype, "commentPlaceholder", void 0);
|
|
18299
|
-
question_decorate([
|
|
18300
|
-
property()
|
|
18301
|
-
], Question.prototype, "renderAs", void 0);
|
|
18302
|
-
question_decorate([
|
|
18303
|
-
property({ defaultValue: false })
|
|
18304
|
-
], Question.prototype, "inMatrixMode", void 0);
|
|
18305
18336
|
function makeNameValid(str) {
|
|
18306
18337
|
if (!str)
|
|
18307
18338
|
return str;
|
|
@@ -18429,6 +18460,7 @@ Serializer.addClass("question", [
|
|
|
18429
18460
|
{
|
|
18430
18461
|
name: "bindings:bindings",
|
|
18431
18462
|
serializationProperty: "bindings",
|
|
18463
|
+
isSerializableFunc: (obj) => !obj.isBindingEmpty(),
|
|
18432
18464
|
visibleIf: function (obj) {
|
|
18433
18465
|
return obj.bindings.getNames().length > 0;
|
|
18434
18466
|
},
|
|
@@ -18531,7 +18563,7 @@ class ItemValue extends BaseAction {
|
|
|
18531
18563
|
}
|
|
18532
18564
|
static getTextOrHtmlByValue(items, val) {
|
|
18533
18565
|
var item = ItemValue.getItemByValue(items, val);
|
|
18534
|
-
return item !== null ? item.
|
|
18566
|
+
return item !== null ? item.textOrHtml : "";
|
|
18535
18567
|
}
|
|
18536
18568
|
static locStrsChanged(items) {
|
|
18537
18569
|
for (var i = 0; i < items.length; i++) {
|
|
@@ -18602,20 +18634,6 @@ class ItemValue extends BaseAction {
|
|
|
18602
18634
|
super();
|
|
18603
18635
|
this.typeName = typeName;
|
|
18604
18636
|
this.ownerPropertyName = "";
|
|
18605
|
-
this.locTextValue = new LocalizableString(this, true, "text");
|
|
18606
|
-
this.locTextValue.onStrChanged = (oldValue, newValue) => {
|
|
18607
|
-
if (newValue == this.value) {
|
|
18608
|
-
newValue = undefined;
|
|
18609
|
-
}
|
|
18610
|
-
this.propertyValueChanged("text", oldValue, newValue);
|
|
18611
|
-
};
|
|
18612
|
-
this.locTextValue.onGetTextCallback = (txt) => {
|
|
18613
|
-
return txt
|
|
18614
|
-
? txt
|
|
18615
|
-
: !Helpers.isValueEmpty(this.value)
|
|
18616
|
-
? this.value.toString()
|
|
18617
|
-
: null;
|
|
18618
|
-
};
|
|
18619
18637
|
if (text)
|
|
18620
18638
|
this.locText.text = text;
|
|
18621
18639
|
if (!!value && typeof value === "object") {
|
|
@@ -18645,7 +18663,24 @@ class ItemValue extends BaseAction {
|
|
|
18645
18663
|
get isInternal() {
|
|
18646
18664
|
return this.isGhost === true;
|
|
18647
18665
|
}
|
|
18666
|
+
createLocText() {
|
|
18667
|
+
const res = new LocalizableString(this, true, "text");
|
|
18668
|
+
res.onStrChanged = (oldValue, newValue) => {
|
|
18669
|
+
this.propertyValueChanged("text", oldValue, newValue);
|
|
18670
|
+
};
|
|
18671
|
+
res.onGetTextCallback = (txt) => {
|
|
18672
|
+
return txt || this.getValueText();
|
|
18673
|
+
};
|
|
18674
|
+
return res;
|
|
18675
|
+
}
|
|
18676
|
+
getValueText() {
|
|
18677
|
+
const val = this.value;
|
|
18678
|
+
return !Helpers.isValueEmpty(val) ? val.toString() : null;
|
|
18679
|
+
}
|
|
18648
18680
|
get locText() {
|
|
18681
|
+
if (!this.locTextValue) {
|
|
18682
|
+
this.locTextValue = this.createLocText();
|
|
18683
|
+
}
|
|
18649
18684
|
return this.locTextValue;
|
|
18650
18685
|
}
|
|
18651
18686
|
setLocText(locText) {
|
|
@@ -18685,22 +18720,30 @@ class ItemValue extends BaseAction {
|
|
|
18685
18720
|
this.id = this.value;
|
|
18686
18721
|
}
|
|
18687
18722
|
get hasText() {
|
|
18688
|
-
return this.
|
|
18723
|
+
return this.pureText ? true : false;
|
|
18689
18724
|
}
|
|
18690
18725
|
get pureText() {
|
|
18691
|
-
|
|
18726
|
+
var _a;
|
|
18727
|
+
return ((_a = this.locTextValue) === null || _a === void 0 ? void 0 : _a.pureText) || "";
|
|
18692
18728
|
}
|
|
18693
18729
|
set pureText(val) {
|
|
18694
18730
|
this.text = val;
|
|
18695
18731
|
}
|
|
18696
18732
|
get text() {
|
|
18697
|
-
return this.
|
|
18733
|
+
return this.calculatedText; //TODO: it will be correct to use this.locText.text, however it would require a lot of rewriting in Creator
|
|
18698
18734
|
}
|
|
18699
18735
|
set text(newText) {
|
|
18700
18736
|
this.locText.text = newText;
|
|
18701
18737
|
}
|
|
18738
|
+
get textOrHtml() {
|
|
18739
|
+
if (this.locTextValue)
|
|
18740
|
+
return this.locText.textOrHtml;
|
|
18741
|
+
return this.getValueText();
|
|
18742
|
+
}
|
|
18702
18743
|
get calculatedText() {
|
|
18703
|
-
|
|
18744
|
+
if (this.locTextValue)
|
|
18745
|
+
return this.locText.calculatedText;
|
|
18746
|
+
return this.getValueText();
|
|
18704
18747
|
}
|
|
18705
18748
|
get shortcutText() {
|
|
18706
18749
|
return this.text;
|
|
@@ -18736,14 +18779,15 @@ class ItemValue extends BaseAction {
|
|
|
18736
18779
|
var jsoObj = new JsonObject();
|
|
18737
18780
|
for (var i = 0; i < properties.length; i++) {
|
|
18738
18781
|
const prop = properties[i];
|
|
18739
|
-
if (prop.name === "text" && !this.locText.hasNonDefaultText() &&
|
|
18740
|
-
Helpers.isTwoValueEquals(this.value, this.text, false, true, false))
|
|
18782
|
+
if (prop.name === "text" && (!this.locTextValue || !this.locText.hasNonDefaultText() &&
|
|
18783
|
+
Helpers.isTwoValueEquals(this.value, this.text, false, true, false)))
|
|
18741
18784
|
continue;
|
|
18742
18785
|
jsoObj.valueToJson(this, res, prop);
|
|
18743
18786
|
}
|
|
18744
18787
|
return res;
|
|
18745
18788
|
}
|
|
18746
18789
|
setData(value, isNewItem) {
|
|
18790
|
+
var _a;
|
|
18747
18791
|
if (Helpers.isValueEmpty(value))
|
|
18748
18792
|
return;
|
|
18749
18793
|
if (typeof value.value === "undefined" && typeof value.text !== "undefined" && Object.keys(value).length === 1) {
|
|
@@ -18763,7 +18807,7 @@ class ItemValue extends BaseAction {
|
|
|
18763
18807
|
this.setValue(value, isNewItem);
|
|
18764
18808
|
}
|
|
18765
18809
|
if (!isNewItem) {
|
|
18766
|
-
this.
|
|
18810
|
+
(_a = this.locTextValue) === null || _a === void 0 ? void 0 : _a.strChanged();
|
|
18767
18811
|
}
|
|
18768
18812
|
}
|
|
18769
18813
|
get visibleIf() {
|
|
@@ -18793,15 +18837,19 @@ class ItemValue extends BaseAction {
|
|
|
18793
18837
|
this.setPropertyValue("isEnabled", val);
|
|
18794
18838
|
}
|
|
18795
18839
|
addUsedLocales(locales) {
|
|
18796
|
-
|
|
18840
|
+
if (this.locTextValue) {
|
|
18841
|
+
this.AddLocStringToUsedLocales(this.locTextValue, locales);
|
|
18842
|
+
}
|
|
18797
18843
|
}
|
|
18798
18844
|
locStrsChanged() {
|
|
18845
|
+
var _a;
|
|
18799
18846
|
super.locStrsChanged();
|
|
18800
|
-
this.
|
|
18847
|
+
(_a = this.locTextValue) === null || _a === void 0 ? void 0 : _a.strChanged();
|
|
18801
18848
|
}
|
|
18802
18849
|
onPropertyValueChanged(name, oldValue, newValue) {
|
|
18850
|
+
var _a;
|
|
18803
18851
|
if (name === "value" && !this.hasText) {
|
|
18804
|
-
this.
|
|
18852
|
+
(_a = this.locTextValue) === null || _a === void 0 ? void 0 : _a.strChanged();
|
|
18805
18853
|
}
|
|
18806
18854
|
var funcName = "itemValuePropertyChanged";
|
|
18807
18855
|
if (!this.locOwner || !this.locOwner[funcName])
|
|
@@ -18867,6 +18915,8 @@ class ItemValue extends BaseAction {
|
|
|
18867
18915
|
this._visible = val;
|
|
18868
18916
|
}
|
|
18869
18917
|
}
|
|
18918
|
+
get _visible() { return this.getPropertyValue("visible", true); }
|
|
18919
|
+
set _visible(val) { this.setPropertyValue("visible", val); }
|
|
18870
18920
|
getLocTitle() {
|
|
18871
18921
|
return this.locText;
|
|
18872
18922
|
}
|
|
@@ -18875,16 +18925,12 @@ class ItemValue extends BaseAction {
|
|
|
18875
18925
|
}
|
|
18876
18926
|
setLocTitle(val) { }
|
|
18877
18927
|
setTitle(val) { }
|
|
18928
|
+
get icon() { return this.getPropertyValue("icon", ""); }
|
|
18929
|
+
set icon(val) { this.setPropertyValue("icon", val); }
|
|
18878
18930
|
}
|
|
18879
|
-
itemvalue_decorate([
|
|
18880
|
-
property({ defaultValue: true })
|
|
18881
|
-
], ItemValue.prototype, "_visible", void 0);
|
|
18882
18931
|
itemvalue_decorate([
|
|
18883
18932
|
property()
|
|
18884
18933
|
], ItemValue.prototype, "selectedValue", void 0);
|
|
18885
|
-
itemvalue_decorate([
|
|
18886
|
-
property()
|
|
18887
|
-
], ItemValue.prototype, "icon", void 0);
|
|
18888
18934
|
Base.createItemValue = function (source, type) {
|
|
18889
18935
|
var item = null;
|
|
18890
18936
|
if (!!type) {
|
|
@@ -25673,8 +25719,11 @@ class QuestionMatrixDropdownModelBase extends QuestionMatrixBaseModel {
|
|
|
25673
25719
|
var rows = this.generatedVisibleRows;
|
|
25674
25720
|
if (rowIndex >= rows.length)
|
|
25675
25721
|
return null;
|
|
25676
|
-
|
|
25677
|
-
|
|
25722
|
+
const val = this.value;
|
|
25723
|
+
const rowVal = this.getRowValueCore(rows[rowIndex], val);
|
|
25724
|
+
if (this.isValueSurveyElement(val))
|
|
25725
|
+
return rowVal;
|
|
25726
|
+
return Helpers.getUnbindValue(rowVal);
|
|
25678
25727
|
}
|
|
25679
25728
|
checkIfValueInRowDuplicated(checkedRow, cellQuestion) {
|
|
25680
25729
|
if (!this.generatedVisibleRows)
|
|
@@ -30602,7 +30651,7 @@ class PanelModelBase extends SurveyElement {
|
|
|
30602
30651
|
this.createNewArray("rows", (el, index) => { this.onAddRow(el); }, (el) => { this.onRemoveRow(el); });
|
|
30603
30652
|
this.createNewArray("visibleRows");
|
|
30604
30653
|
this.elementsValue = this.createNewArray("elements", this.onAddElement.bind(this), this.onRemoveElement.bind(this));
|
|
30605
|
-
this.id
|
|
30654
|
+
this.setPropertyValueDirectly("id", PanelModelBase.getPanelId());
|
|
30606
30655
|
this.addExpressionProperty("visibleIf", (obj, res) => { this.visible = res === true; }, (obj) => { return !this.areInvisibleElementsShowing; });
|
|
30607
30656
|
this.addExpressionProperty("enableIf", (obj, res) => { this.readOnly = res === false; });
|
|
30608
30657
|
this.addExpressionProperty("requiredIf", (obj, res) => { this.isRequired = res === true; });
|
|
@@ -30637,7 +30686,6 @@ class PanelModelBase extends SurveyElement {
|
|
|
30637
30686
|
}
|
|
30638
30687
|
endLoadingFromJson() {
|
|
30639
30688
|
super.endLoadingFromJson();
|
|
30640
|
-
this.updateDescriptionVisibility(this.description);
|
|
30641
30689
|
this.markQuestionListDirty();
|
|
30642
30690
|
this.onRowsChanged();
|
|
30643
30691
|
this.gridLayoutColumns.forEach(col => {
|
|
@@ -33359,7 +33407,13 @@ class ProgressButtons extends Base {
|
|
|
33359
33407
|
return this.survey.currentPage ? this.survey.currentPage.renderedNavigationTitle : "";
|
|
33360
33408
|
}
|
|
33361
33409
|
get footerText() {
|
|
33362
|
-
return this.
|
|
33410
|
+
return this.progressText;
|
|
33411
|
+
}
|
|
33412
|
+
get progressText() {
|
|
33413
|
+
return this.getPropertyValue("progressText", undefined, () => this.survey.getProgressText());
|
|
33414
|
+
}
|
|
33415
|
+
resetProgressText() {
|
|
33416
|
+
this.resetPropertyValue("progressText");
|
|
33363
33417
|
}
|
|
33364
33418
|
processResponsiveness(width) {
|
|
33365
33419
|
this.onResize.fire(this, { width });
|
|
@@ -34385,7 +34439,6 @@ class SurveyModel extends SurveyElementCore {
|
|
|
34385
34439
|
this.validationAllowComplete = false;
|
|
34386
34440
|
this.isNavigationButtonPressed = false;
|
|
34387
34441
|
this.mouseDownPage = null;
|
|
34388
|
-
this.isCalculatingProgressText = false;
|
|
34389
34442
|
this.isSmoothScrollEnabled = false;
|
|
34390
34443
|
/**
|
|
34391
34444
|
* An event that is raised when the survey's width or height is changed.
|
|
@@ -34481,10 +34534,10 @@ class SurveyModel extends SurveyElementCore {
|
|
|
34481
34534
|
});
|
|
34482
34535
|
this.registerPropertyChangedHandlers(["isLoading", "isCompleted", "isCompletedBefore", "readOnly", "isStartedState", "currentPage", "isShowingPreview"], () => { this.updateState(); });
|
|
34483
34536
|
this.registerPropertyChangedHandlers(["state", "currentPage", "showPreviewBeforeComplete"], () => { this.onStateAndCurrentPageChanged(); });
|
|
34484
|
-
this.registerPropertyChangedHandlers(["logo", "logoPosition"], () => { this.
|
|
34485
|
-
this.registerPropertyChangedHandlers(["backgroundImage"], () => { this.
|
|
34486
|
-
this.registerPropertyChangedHandlers(["
|
|
34487
|
-
this.
|
|
34537
|
+
this.registerPropertyChangedHandlers(["logo", "logoPosition"], () => { this.resetHasLogo(); });
|
|
34538
|
+
this.registerPropertyChangedHandlers(["backgroundImage"], () => { this.resetPropertyValue("renderBackgroundImage"); });
|
|
34539
|
+
this.registerPropertyChangedHandlers(["backgroundImage", "backgroundOpacity", "backgroundImageFit", "fitToContainer", "backgroundImageAttachment"], () => {
|
|
34540
|
+
this.resetPropertyValue("backgroundImageStyle");
|
|
34488
34541
|
});
|
|
34489
34542
|
this.registerPropertyChangedHandlers(["showPrevButton", "showCompleteButton"], () => { this.updateButtonsVisibility(); });
|
|
34490
34543
|
this.onGetQuestionNumber.onCallbacksChanged = () => {
|
|
@@ -34517,8 +34570,7 @@ class SurveyModel extends SurveyElementCore {
|
|
|
34517
34570
|
this.onShowingChoiceItem.onCallbacksChanged = () => {
|
|
34518
34571
|
this.rebuildQuestionChoices();
|
|
34519
34572
|
};
|
|
34520
|
-
this.
|
|
34521
|
-
this.navigationBar.locOwner = this;
|
|
34573
|
+
this.locTitle.onStringChanged.add(() => this.resetPropertyValue("titleIsEmpty"));
|
|
34522
34574
|
this.onBeforeCreating();
|
|
34523
34575
|
if (jsonObj) {
|
|
34524
34576
|
if (typeof jsonObj === "string" || jsonObj instanceof String) {
|
|
@@ -34550,7 +34602,6 @@ class SurveyModel extends SurveyElementCore {
|
|
|
34550
34602
|
this.onScrollCallback = undefined;
|
|
34551
34603
|
}
|
|
34552
34604
|
});
|
|
34553
|
-
this.progressBarValue = new ProgressButtons(this);
|
|
34554
34605
|
if (this.headerView === "advanced") {
|
|
34555
34606
|
this.insertAdvancedHeader(new Cover());
|
|
34556
34607
|
}
|
|
@@ -34563,7 +34614,7 @@ class SurveyModel extends SurveyElementCore {
|
|
|
34563
34614
|
this.layoutElements.push({
|
|
34564
34615
|
id: "progress-buttons",
|
|
34565
34616
|
component: "sv-progress-buttons",
|
|
34566
|
-
|
|
34617
|
+
getData: () => this.progressBar,
|
|
34567
34618
|
processResponsiveness: width => this.progressBar.processResponsiveness && this.progressBar.processResponsiveness(width)
|
|
34568
34619
|
});
|
|
34569
34620
|
this.layoutElements.push({
|
|
@@ -34586,19 +34637,23 @@ class SurveyModel extends SurveyElementCore {
|
|
|
34586
34637
|
component: "sv-progress-requiredquestions",
|
|
34587
34638
|
data: this
|
|
34588
34639
|
});
|
|
34589
|
-
const tocModel = new TOCModel(this);
|
|
34590
34640
|
this.addLayoutElement({
|
|
34591
34641
|
id: "toc-navigation",
|
|
34592
34642
|
component: "sv-navigation-toc",
|
|
34593
|
-
|
|
34594
|
-
processResponsiveness: width => tocModel.updateStickyTOCSize(this.rootElement)
|
|
34643
|
+
getData: () => this.tocModel,
|
|
34644
|
+
processResponsiveness: width => this.tocModel.updateStickyTOCSize(this.rootElement)
|
|
34595
34645
|
});
|
|
34596
34646
|
this.layoutElements.push({
|
|
34597
34647
|
id: "buttons-navigation",
|
|
34598
34648
|
component: "sv-action-bar",
|
|
34599
|
-
|
|
34649
|
+
getData: () => this.navigationBar
|
|
34600
34650
|
});
|
|
34601
|
-
|
|
34651
|
+
}
|
|
34652
|
+
get tocModel() {
|
|
34653
|
+
if (!this.tocModelValue) {
|
|
34654
|
+
this.tocModelValue = new TOCModel(this);
|
|
34655
|
+
}
|
|
34656
|
+
return this.tocModelValue;
|
|
34602
34657
|
}
|
|
34603
34658
|
get sjsVersion() {
|
|
34604
34659
|
return this.getPropertyValue("sjsVersion");
|
|
@@ -35554,7 +35609,9 @@ class SurveyModel extends SurveyElementCore {
|
|
|
35554
35609
|
if (!this.isStartPageActive) {
|
|
35555
35610
|
this.updateProgressText();
|
|
35556
35611
|
}
|
|
35557
|
-
this.
|
|
35612
|
+
if (!!this.navigationBarValue) {
|
|
35613
|
+
this.navigationBar.locStrsChanged();
|
|
35614
|
+
}
|
|
35558
35615
|
}
|
|
35559
35616
|
getMarkdownHtml(text, name) {
|
|
35560
35617
|
return this.getSurveyMarkdownHtml(this, text, name);
|
|
@@ -35706,10 +35763,10 @@ class SurveyModel extends SurveyElementCore {
|
|
|
35706
35763
|
this.setPropertyValue("logoPosition", value);
|
|
35707
35764
|
}
|
|
35708
35765
|
get hasLogo() {
|
|
35709
|
-
return this.getPropertyValue("hasLogo",
|
|
35766
|
+
return this.getPropertyValue("hasLogo", undefined, () => !!this.logo && this.logoPosition !== "none");
|
|
35710
35767
|
}
|
|
35711
|
-
|
|
35712
|
-
this.
|
|
35768
|
+
resetHasLogo() {
|
|
35769
|
+
this.resetPropertyValue("hasLogo");
|
|
35713
35770
|
}
|
|
35714
35771
|
get isLogoBefore() {
|
|
35715
35772
|
if (this.isDesignMode)
|
|
@@ -35733,6 +35790,9 @@ class SurveyModel extends SurveyElementCore {
|
|
|
35733
35790
|
return new CssClassBuilder().append(this.css.logo)
|
|
35734
35791
|
.append(logoClasses[this.logoPosition]).toString();
|
|
35735
35792
|
}
|
|
35793
|
+
get titleIsEmpty() {
|
|
35794
|
+
return this.getPropertyValue("titleIsEmpty", undefined, () => this.locTitle.isEmpty);
|
|
35795
|
+
}
|
|
35736
35796
|
get renderedHasTitle() {
|
|
35737
35797
|
if (this.isDesignMode)
|
|
35738
35798
|
return this.isPropertyVisible("title");
|
|
@@ -35805,9 +35865,8 @@ class SurveyModel extends SurveyElementCore {
|
|
|
35805
35865
|
get titleMaxWidth() {
|
|
35806
35866
|
return "";
|
|
35807
35867
|
}
|
|
35808
|
-
|
|
35809
|
-
|
|
35810
|
-
this.renderBackgroundImage = wrapUrlForBackgroundImage(path);
|
|
35868
|
+
get renderBackgroundImage() {
|
|
35869
|
+
return this.getPropertyValue("renderBackgroundImage", undefined, () => wrapUrlForBackgroundImage(this.backgroundImage));
|
|
35811
35870
|
}
|
|
35812
35871
|
/**
|
|
35813
35872
|
* A value from 0 to 1 that specifies how transparent the [background image](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#backgroundImage) should be: 0 makes the image completely transparent, and 1 makes it opaque.
|
|
@@ -35818,8 +35877,11 @@ class SurveyModel extends SurveyElementCore {
|
|
|
35818
35877
|
set backgroundOpacity(val) {
|
|
35819
35878
|
this.setPropertyValue("backgroundOpacity", val);
|
|
35820
35879
|
}
|
|
35821
|
-
|
|
35822
|
-
this.backgroundImageStyle
|
|
35880
|
+
get backgroundImageStyle() {
|
|
35881
|
+
return this.getPropertyValue("backgroundImageStyle", undefined, () => this.calcBackgroundImageStyle());
|
|
35882
|
+
}
|
|
35883
|
+
calcBackgroundImageStyle() {
|
|
35884
|
+
return {
|
|
35823
35885
|
opacity: this.backgroundOpacity,
|
|
35824
35886
|
backgroundImage: this.renderBackgroundImage,
|
|
35825
35887
|
backgroundSize: this.backgroundImageFit,
|
|
@@ -35953,6 +36015,10 @@ class SurveyModel extends SurveyElementCore {
|
|
|
35953
36015
|
return "<h3>" + this.getLocalizationString("loadingSurvey") + "</h3>";
|
|
35954
36016
|
}
|
|
35955
36017
|
get navigationBar() {
|
|
36018
|
+
if (!this.navigationBarValue) {
|
|
36019
|
+
this.navigationBarValue = this.createNavigationBar();
|
|
36020
|
+
this.updateNavigationCss();
|
|
36021
|
+
}
|
|
35956
36022
|
return this.navigationBarValue;
|
|
35957
36023
|
}
|
|
35958
36024
|
/**
|
|
@@ -36247,6 +36313,9 @@ class SurveyModel extends SurveyElementCore {
|
|
|
36247
36313
|
this.updateVisibleIndexes();
|
|
36248
36314
|
}
|
|
36249
36315
|
get progressBar() {
|
|
36316
|
+
if (!this.progressBarValue) {
|
|
36317
|
+
this.progressBarValue = new ProgressButtons(this);
|
|
36318
|
+
}
|
|
36250
36319
|
return this.progressBarValue;
|
|
36251
36320
|
}
|
|
36252
36321
|
/**
|
|
@@ -37313,15 +37382,6 @@ class SurveyModel extends SurveyElementCore {
|
|
|
37313
37382
|
var index = visPages.indexOf(this.currentPage);
|
|
37314
37383
|
return Math.ceil((index * 100) / visPages.length);
|
|
37315
37384
|
}
|
|
37316
|
-
/**
|
|
37317
|
-
* Returns a percentage value that indicates user progress in the survey.
|
|
37318
|
-
* @see showProgressBar
|
|
37319
|
-
* @see progressBarType
|
|
37320
|
-
* @see progressText
|
|
37321
|
-
*/
|
|
37322
|
-
get progressValue() {
|
|
37323
|
-
return this.getPropertyValue("progressValue", 0);
|
|
37324
|
-
}
|
|
37325
37385
|
get isNavigationButtonsShowing() {
|
|
37326
37386
|
if (this.isDesignMode)
|
|
37327
37387
|
return "none";
|
|
@@ -38502,24 +38562,26 @@ class SurveyModel extends SurveyElementCore {
|
|
|
38502
38562
|
* @see progressBarType
|
|
38503
38563
|
*/
|
|
38504
38564
|
get progressText() {
|
|
38505
|
-
|
|
38506
|
-
|
|
38507
|
-
|
|
38508
|
-
|
|
38509
|
-
|
|
38510
|
-
|
|
38565
|
+
return this.progressBar.progressText;
|
|
38566
|
+
}
|
|
38567
|
+
/**
|
|
38568
|
+
* Returns a percentage value that indicates user progress in the survey.
|
|
38569
|
+
* @see showProgressBar
|
|
38570
|
+
* @see progressBarType
|
|
38571
|
+
* @see progressText
|
|
38572
|
+
*/
|
|
38573
|
+
get progressValue() {
|
|
38574
|
+
return this.getPropertyValue("progressValue", undefined, () => this.getProgress());
|
|
38511
38575
|
}
|
|
38512
38576
|
updateProgressText(onValueChanged = false) {
|
|
38513
|
-
if (this.
|
|
38577
|
+
if (this.isShowingPreview)
|
|
38514
38578
|
return;
|
|
38515
|
-
if (onValueChanged &&
|
|
38516
|
-
this.progressBarType == "pages" &&
|
|
38517
|
-
this.onGetProgressText.isEmpty)
|
|
38579
|
+
if (onValueChanged && this.progressBarType == "pages" && this.onGetProgressText.isEmpty)
|
|
38518
38580
|
return;
|
|
38519
|
-
this.
|
|
38520
|
-
|
|
38521
|
-
|
|
38522
|
-
this.
|
|
38581
|
+
if (this.progressBarValue) {
|
|
38582
|
+
this.progressBarValue.resetProgressText();
|
|
38583
|
+
}
|
|
38584
|
+
this.resetPropertyValue("progressValue");
|
|
38523
38585
|
}
|
|
38524
38586
|
getProgressText() {
|
|
38525
38587
|
if (!this.isDesignMode && this.currentPage == null)
|
|
@@ -39818,27 +39880,21 @@ class SurveyModel extends SurveyElementCore {
|
|
|
39818
39880
|
this.notifyElementsOnAnyValueOrVariableChanged("");
|
|
39819
39881
|
this.isEndLoadingFromJson = null;
|
|
39820
39882
|
this.updateVisibleIndexes();
|
|
39821
|
-
this.updateHasLogo();
|
|
39822
|
-
this.updateRenderBackgroundImage();
|
|
39823
39883
|
this.updateCurrentPage();
|
|
39824
|
-
this.hasDescription = !!this.description;
|
|
39825
|
-
this.titleIsEmpty = this.locTitle.isEmpty;
|
|
39826
39884
|
this.setCalculatedWidthModeUpdater();
|
|
39827
39885
|
}
|
|
39828
39886
|
updateNavigationCss() {
|
|
39829
|
-
|
|
39830
|
-
|
|
39887
|
+
const val = this.navigationBarValue;
|
|
39888
|
+
if (!!val) {
|
|
39889
|
+
val.cssClasses = this.css.actionBar;
|
|
39890
|
+
val.containerCss = this.css.footer;
|
|
39831
39891
|
!!this.updateNavigationItemCssCallback && this.updateNavigationItemCssCallback();
|
|
39832
39892
|
}
|
|
39833
39893
|
}
|
|
39834
|
-
updateNavigationBarCss() {
|
|
39835
|
-
const val = this.navigationBar;
|
|
39836
|
-
val.cssClasses = this.css.actionBar;
|
|
39837
|
-
val.containerCss = this.css.footer;
|
|
39838
|
-
}
|
|
39839
39894
|
createNavigationBar() {
|
|
39840
39895
|
const res = new ActionContainer();
|
|
39841
39896
|
res.setItems(this.createNavigationActions());
|
|
39897
|
+
res.locOwner = this;
|
|
39842
39898
|
return res;
|
|
39843
39899
|
}
|
|
39844
39900
|
createNavigationActions() {
|
|
@@ -41285,7 +41341,7 @@ class SurveyModel extends SurveyElementCore {
|
|
|
41285
41341
|
return layoutElement;
|
|
41286
41342
|
}
|
|
41287
41343
|
getContainerContent(container) {
|
|
41288
|
-
const containerLayoutElements =
|
|
41344
|
+
const containerLayoutElements = new Array();
|
|
41289
41345
|
for (let layoutElement of this.layoutElements) {
|
|
41290
41346
|
if (this.mode !== "display" && isStrCiEqual(layoutElement.id, "timerpanel")) {
|
|
41291
41347
|
if (container === "header") {
|
|
@@ -41367,6 +41423,11 @@ class SurveyModel extends SurveyElementCore {
|
|
|
41367
41423
|
}
|
|
41368
41424
|
}
|
|
41369
41425
|
containerLayoutElements.sort((a, b) => (a.index || 0) - (b.index || 0));
|
|
41426
|
+
containerLayoutElements.forEach(el => {
|
|
41427
|
+
if (!!el.getData) {
|
|
41428
|
+
el.data = el.getData();
|
|
41429
|
+
}
|
|
41430
|
+
});
|
|
41370
41431
|
return containerLayoutElements;
|
|
41371
41432
|
}
|
|
41372
41433
|
processPopupVisiblityChanged(question, popup, visible) {
|
|
@@ -41541,9 +41602,6 @@ survey_decorate([
|
|
|
41541
41602
|
survey_decorate([
|
|
41542
41603
|
property()
|
|
41543
41604
|
], SurveyModel.prototype, "lazyRenderFirstBatchSizeValue", void 0);
|
|
41544
|
-
survey_decorate([
|
|
41545
|
-
property({ defaultValue: true })
|
|
41546
|
-
], SurveyModel.prototype, "titleIsEmpty", void 0);
|
|
41547
41605
|
survey_decorate([
|
|
41548
41606
|
property({ defaultValue: {} })
|
|
41549
41607
|
], SurveyModel.prototype, "cssVariables", void 0);
|
|
@@ -41560,9 +41618,6 @@ survey_decorate([
|
|
|
41560
41618
|
}
|
|
41561
41619
|
})
|
|
41562
41620
|
], SurveyModel.prototype, "backgroundImage", void 0);
|
|
41563
|
-
survey_decorate([
|
|
41564
|
-
property()
|
|
41565
|
-
], SurveyModel.prototype, "renderBackgroundImage", void 0);
|
|
41566
41621
|
survey_decorate([
|
|
41567
41622
|
property()
|
|
41568
41623
|
], SurveyModel.prototype, "backgroundImageFit", void 0);
|
|
@@ -41573,9 +41628,6 @@ survey_decorate([
|
|
|
41573
41628
|
}
|
|
41574
41629
|
})
|
|
41575
41630
|
], SurveyModel.prototype, "backgroundImageAttachment", void 0);
|
|
41576
|
-
survey_decorate([
|
|
41577
|
-
property()
|
|
41578
|
-
], SurveyModel.prototype, "backgroundImageStyle", void 0);
|
|
41579
41631
|
survey_decorate([
|
|
41580
41632
|
property()
|
|
41581
41633
|
], SurveyModel.prototype, "wrapperFormCss", void 0);
|
|
@@ -41972,6 +42024,8 @@ class QuestionSelectBase extends Question {
|
|
|
41972
42024
|
get waitingChoicesByURL() {
|
|
41973
42025
|
return !this.isChoicesLoaded && this.hasChoicesUrl;
|
|
41974
42026
|
}
|
|
42027
|
+
get selectedItemValues() { return this.getPropertyValue("selectedItemValues"); }
|
|
42028
|
+
set selectedItemValues(val) { this.setPropertyValue("selectedItemValues", val); }
|
|
41975
42029
|
constructor(name) {
|
|
41976
42030
|
super(name);
|
|
41977
42031
|
this.otherItemValue = new ItemValue("other");
|
|
@@ -42004,10 +42058,14 @@ class QuestionSelectBase extends Question {
|
|
|
42004
42058
|
this.registerPropertyChangedHandlers(["hideIfChoicesEmpty"], () => {
|
|
42005
42059
|
this.onVisibleChanged();
|
|
42006
42060
|
});
|
|
42061
|
+
this.registerPropertyChangedHandlers(["selecteditemValues"], (newVal) => {
|
|
42062
|
+
this.onSelectedItemValuesChangedHandler(newVal);
|
|
42063
|
+
});
|
|
42007
42064
|
this.createNewArray("visibleChoices", () => this.updateRenderedChoices(), () => this.updateRenderedChoices());
|
|
42008
42065
|
this.setNewRestfulProperty();
|
|
42009
42066
|
var locOtherText = this.createLocalizableString("otherText", this.otherItemValue, true, "otherItemText");
|
|
42010
42067
|
this.createLocalizableString("otherErrorText", this, true, "otherRequiredError");
|
|
42068
|
+
this.createLocalizableString("otherPlaceholder", this, false, true);
|
|
42011
42069
|
this.otherItemValue.locOwner = this;
|
|
42012
42070
|
this.otherItemValue.setLocText(locOtherText);
|
|
42013
42071
|
this.choicesByUrl.createItemValue = (value) => {
|
|
@@ -42887,6 +42945,22 @@ class QuestionSelectBase extends Question {
|
|
|
42887
42945
|
get locOtherText() {
|
|
42888
42946
|
return this.getLocalizableString("otherText");
|
|
42889
42947
|
}
|
|
42948
|
+
/**
|
|
42949
|
+
* Displays the "Select All", "None", and "Other" choices on individual rows.
|
|
42950
|
+
* @see showNoneItem
|
|
42951
|
+
* @see showOtherItem
|
|
42952
|
+
* @see [settings.specialChoicesOrder](https://surveyjs.io/form-library/documentation/api-reference/settings#specialChoicesOrder)
|
|
42953
|
+
*/
|
|
42954
|
+
get separateSpecialChoices() { return this.getPropertyValue("separateSpecialChoices"); }
|
|
42955
|
+
set separateSpecialChoices(val) { this.setPropertyValue("separateSpecialChoices", val); }
|
|
42956
|
+
/**
|
|
42957
|
+
* A placeholder for the comment area. Applies when the `showOtherItem` or `showCommentArea` property is `true`.
|
|
42958
|
+
* @see showOtherItem
|
|
42959
|
+
* @see showCommentArea
|
|
42960
|
+
*/
|
|
42961
|
+
get otherPlaceholder() { return this.getLocalizableStringText("otherPlaceholder"); }
|
|
42962
|
+
set otherPlaceholder(val) { this.setLocalizableStringText("otherPlaceholder", val); }
|
|
42963
|
+
get locOtherPlaceholder() { return this.getLocalizableString("otherPlaceholder"); }
|
|
42890
42964
|
get otherPlaceHolder() {
|
|
42891
42965
|
return this.otherPlaceholder;
|
|
42892
42966
|
}
|
|
@@ -43948,19 +44022,6 @@ class QuestionSelectBase extends Question {
|
|
|
43948
44022
|
this.setPropertyValue("itemComponent", value);
|
|
43949
44023
|
}
|
|
43950
44024
|
}
|
|
43951
|
-
question_baseselect_decorate([
|
|
43952
|
-
property({
|
|
43953
|
-
onSet: (newVal, target) => {
|
|
43954
|
-
target.onSelectedItemValuesChangedHandler(newVal);
|
|
43955
|
-
}
|
|
43956
|
-
})
|
|
43957
|
-
], QuestionSelectBase.prototype, "selectedItemValues", void 0);
|
|
43958
|
-
question_baseselect_decorate([
|
|
43959
|
-
property()
|
|
43960
|
-
], QuestionSelectBase.prototype, "separateSpecialChoices", void 0);
|
|
43961
|
-
question_baseselect_decorate([
|
|
43962
|
-
property({ localizable: true })
|
|
43963
|
-
], QuestionSelectBase.prototype, "otherPlaceholder", void 0);
|
|
43964
44025
|
question_baseselect_decorate([
|
|
43965
44026
|
propertyArray()
|
|
43966
44027
|
], QuestionSelectBase.prototype, "_renderedChoices", void 0);
|
|
@@ -45575,21 +45636,6 @@ var question_dropdown_decorate = (undefined && undefined.__decorate) || function
|
|
|
45575
45636
|
* [View Demo](https://surveyjs.io/form-library/examples/questiontype-dropdown/ (linkStyle))
|
|
45576
45637
|
*/
|
|
45577
45638
|
class QuestionDropdownModel extends QuestionSelectBase {
|
|
45578
|
-
updateReadOnlyText() {
|
|
45579
|
-
let result = !!this.selectedItem ? "" : this.placeholder;
|
|
45580
|
-
if (this.renderAs == "select") {
|
|
45581
|
-
if (this.isOtherSelected) {
|
|
45582
|
-
result = this.otherText;
|
|
45583
|
-
}
|
|
45584
|
-
else if (this.isNoneSelected) {
|
|
45585
|
-
result = this.noneText;
|
|
45586
|
-
}
|
|
45587
|
-
else if (!!this.selectedItem) {
|
|
45588
|
-
result = this.selectedItemText;
|
|
45589
|
-
}
|
|
45590
|
-
}
|
|
45591
|
-
this.readOnlyText = result;
|
|
45592
|
-
}
|
|
45593
45639
|
constructor(name) {
|
|
45594
45640
|
super(name);
|
|
45595
45641
|
this.lastSelectedItemValue = null;
|
|
@@ -45602,13 +45648,13 @@ class QuestionDropdownModel extends QuestionSelectBase {
|
|
|
45602
45648
|
this.onVisibleChoicesChanged();
|
|
45603
45649
|
});
|
|
45604
45650
|
this.registerPropertyChangedHandlers(["value", "renderAs", "showOtherItem", "otherText", "placeholder", "choices", "visibleChoices"], () => {
|
|
45605
|
-
this.
|
|
45651
|
+
this.getSingleSelectedItem();
|
|
45652
|
+
this.resetReadOnlyText();
|
|
45606
45653
|
});
|
|
45607
|
-
this.updateReadOnlyText();
|
|
45608
45654
|
}
|
|
45609
45655
|
locStrsChanged() {
|
|
45610
45656
|
super.locStrsChanged();
|
|
45611
|
-
this.
|
|
45657
|
+
this.resetReadOnlyText();
|
|
45612
45658
|
}
|
|
45613
45659
|
get showOptionsCaption() {
|
|
45614
45660
|
return this.allowClear;
|
|
@@ -45741,6 +45787,23 @@ class QuestionDropdownModel extends QuestionSelectBase {
|
|
|
45741
45787
|
set autocomplete(val) {
|
|
45742
45788
|
this.setPropertyValue("autocomplete", val);
|
|
45743
45789
|
}
|
|
45790
|
+
get readOnlyText() {
|
|
45791
|
+
return this.getPropertyValue("readOnlyText", undefined, () => this.calculateReadOnlyText());
|
|
45792
|
+
}
|
|
45793
|
+
calculateReadOnlyText() {
|
|
45794
|
+
if (this.renderAs == "select") {
|
|
45795
|
+
if (this.isOtherSelected)
|
|
45796
|
+
return this.otherText;
|
|
45797
|
+
if (this.isNoneSelected)
|
|
45798
|
+
return this.noneText;
|
|
45799
|
+
if (!!this.selectedItem)
|
|
45800
|
+
return this.selectedItemText;
|
|
45801
|
+
}
|
|
45802
|
+
return !!this.selectedItem ? "" : this.placeholder;
|
|
45803
|
+
}
|
|
45804
|
+
resetReadOnlyText() {
|
|
45805
|
+
this.resetPropertyValue("readOnlyText");
|
|
45806
|
+
}
|
|
45744
45807
|
getControlClass() {
|
|
45745
45808
|
return new CssClassBuilder()
|
|
45746
45809
|
.append(this.cssClasses.control)
|
|
@@ -45897,9 +45960,6 @@ question_dropdown_decorate([
|
|
|
45897
45960
|
question_dropdown_decorate([
|
|
45898
45961
|
property({ defaultValue: false })
|
|
45899
45962
|
], QuestionDropdownModel.prototype, "inputHasValue", void 0);
|
|
45900
|
-
question_dropdown_decorate([
|
|
45901
|
-
property({ defaultValue: "" })
|
|
45902
|
-
], QuestionDropdownModel.prototype, "readOnlyText", void 0);
|
|
45903
45963
|
question_dropdown_decorate([
|
|
45904
45964
|
property({
|
|
45905
45965
|
onSet: (newValue, target) => {
|
|
@@ -53439,11 +53499,11 @@ class QuestionRatingModel extends Question {
|
|
|
53439
53499
|
});
|
|
53440
53500
|
this.createLocalizableString("minRateDescription", this, true)
|
|
53441
53501
|
.onStringChanged.add((sender, options) => {
|
|
53442
|
-
this.hasMinRateDescription
|
|
53502
|
+
this.setPropertyValue("hasMinRateDescription", !sender.isEmpty);
|
|
53443
53503
|
});
|
|
53444
53504
|
this.createLocalizableString("maxRateDescription", this, true)
|
|
53445
53505
|
.onStringChanged.add((sender, options) => {
|
|
53446
|
-
this.hasMaxRateDescription
|
|
53506
|
+
this.setPropertyValue("hasMaxRateDescription", !sender.isEmpty);
|
|
53447
53507
|
});
|
|
53448
53508
|
this.initPropertyDependencies();
|
|
53449
53509
|
}
|
|
@@ -53846,6 +53906,12 @@ class QuestionRatingModel extends Question {
|
|
|
53846
53906
|
get locMaxRateDescription() {
|
|
53847
53907
|
return this.getLocalizableString("maxRateDescription");
|
|
53848
53908
|
}
|
|
53909
|
+
get hasMinRateDescription() {
|
|
53910
|
+
return this.getPropertyValue("hasMinRateDescription", undefined, () => !!this.minRateDescription);
|
|
53911
|
+
}
|
|
53912
|
+
get hasMaxRateDescription() {
|
|
53913
|
+
return this.getPropertyValue("hasMaxRateDescription", undefined, () => !!this.maxRateDescription);
|
|
53914
|
+
}
|
|
53849
53915
|
get hasMinLabel() {
|
|
53850
53916
|
return !this.displayRateDescriptionsAsExtremeItems && !!this.hasMinRateDescription;
|
|
53851
53917
|
}
|
|
@@ -54223,12 +54289,6 @@ question_rating_decorate([
|
|
|
54223
54289
|
question_rating_decorate([
|
|
54224
54290
|
property()
|
|
54225
54291
|
], QuestionRatingModel.prototype, "rateCount", void 0);
|
|
54226
|
-
question_rating_decorate([
|
|
54227
|
-
property({ defaultValue: false })
|
|
54228
|
-
], QuestionRatingModel.prototype, "hasMinRateDescription", void 0);
|
|
54229
|
-
question_rating_decorate([
|
|
54230
|
-
property({ defaultValue: false })
|
|
54231
|
-
], QuestionRatingModel.prototype, "hasMaxRateDescription", void 0);
|
|
54232
54292
|
question_rating_decorate([
|
|
54233
54293
|
property()
|
|
54234
54294
|
], QuestionRatingModel.prototype, "displayRateDescriptionsAsExtremeItems", void 0);
|
|
@@ -61679,11 +61739,11 @@ var Version;
|
|
|
61679
61739
|
var ReleaseDate;
|
|
61680
61740
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
61681
61741
|
//@ts-ignore
|
|
61682
|
-
Version = `${"2.0.0-rc.
|
|
61742
|
+
Version = `${"2.0.0-rc.4"}`;
|
|
61683
61743
|
settings.version = Version;
|
|
61684
61744
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
61685
61745
|
//@ts-ignore
|
|
61686
|
-
ReleaseDate = `${"2025-02-
|
|
61746
|
+
ReleaseDate = `${"2025-02-13"}`;
|
|
61687
61747
|
function checkLibraryVersion(ver, libraryName) {
|
|
61688
61748
|
if (Version != ver) {
|
|
61689
61749
|
const str = "survey-core has version '" + Version + "' and " + libraryName
|
|
@@ -61921,6 +61981,10 @@ class SvgIconRegistry {
|
|
|
61921
61981
|
}
|
|
61922
61982
|
this.updateMarkup();
|
|
61923
61983
|
}
|
|
61984
|
+
registerIcon(id, svg, iconSetVersion = "v2") {
|
|
61985
|
+
this.registerIconFromSvg(id, svg);
|
|
61986
|
+
addIconsToThemeSet(iconSetVersion, { [id]: svg });
|
|
61987
|
+
}
|
|
61924
61988
|
iconsRenderedHtml() {
|
|
61925
61989
|
return Object.keys(this.icons).map(icon => this.icons[icon]).join("");
|
|
61926
61990
|
}
|