survey-core 1.11.12 → 1.11.13
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/defaultV2.css +8 -8
- package/defaultV2.css.map +1 -1
- package/defaultV2.fontless.css +8 -8
- package/defaultV2.fontless.css.map +1 -1
- package/defaultV2.fontless.min.css +2 -2
- package/defaultV2.min.css +2 -2
- package/i18n/arabic.js +2 -4
- package/i18n/arabic.js.map +1 -1
- package/i18n/arabic.min.js +2 -2
- package/i18n/basque.js +2 -3
- package/i18n/basque.js.map +1 -1
- package/i18n/basque.min.js +2 -2
- package/i18n/bulgarian.js +2 -3
- package/i18n/bulgarian.js.map +1 -1
- package/i18n/bulgarian.min.js +2 -2
- package/i18n/catalan.js +2 -3
- package/i18n/catalan.js.map +1 -1
- package/i18n/catalan.min.js +2 -2
- package/i18n/croatian.js +2 -3
- package/i18n/croatian.js.map +1 -1
- package/i18n/croatian.min.js +2 -2
- package/i18n/czech.js +2 -3
- package/i18n/czech.js.map +1 -1
- package/i18n/czech.min.js +2 -2
- package/i18n/danish.js +2 -3
- package/i18n/danish.js.map +1 -1
- package/i18n/danish.min.js +2 -2
- package/i18n/dutch.js +2 -3
- package/i18n/dutch.js.map +1 -1
- package/i18n/dutch.min.js +2 -2
- package/i18n/english.js +2 -3
- package/i18n/english.js.map +1 -1
- package/i18n/english.min.js +1 -1
- package/i18n/estonian.js +2 -3
- package/i18n/estonian.js.map +1 -1
- package/i18n/estonian.min.js +2 -2
- package/i18n/finnish.js +2 -3
- package/i18n/finnish.js.map +1 -1
- package/i18n/finnish.min.js +2 -2
- package/i18n/french.js +2 -3
- package/i18n/french.js.map +1 -1
- package/i18n/french.min.js +2 -2
- package/i18n/georgian.js +2 -3
- package/i18n/georgian.js.map +1 -1
- package/i18n/georgian.min.js +2 -2
- package/i18n/german.js +2 -3
- package/i18n/german.js.map +1 -1
- package/i18n/german.min.js +2 -2
- package/i18n/greek.js +2 -3
- package/i18n/greek.js.map +1 -1
- package/i18n/greek.min.js +2 -2
- package/i18n/hebrew.js +2 -3
- package/i18n/hebrew.js.map +1 -1
- package/i18n/hebrew.min.js +2 -2
- package/i18n/hindi.js +2 -3
- package/i18n/hindi.js.map +1 -1
- package/i18n/hindi.min.js +2 -2
- package/i18n/hungarian.js +2 -3
- package/i18n/hungarian.js.map +1 -1
- package/i18n/hungarian.min.js +2 -2
- package/i18n/icelandic.js +2 -3
- package/i18n/icelandic.js.map +1 -1
- package/i18n/icelandic.min.js +2 -2
- package/i18n/index.js +51 -102
- package/i18n/index.js.map +1 -1
- package/i18n/index.min.js +2 -2
- package/i18n/indonesian.js +2 -3
- package/i18n/indonesian.js.map +1 -1
- package/i18n/indonesian.min.js +2 -2
- package/i18n/italian.js +2 -3
- package/i18n/italian.js.map +1 -1
- package/i18n/italian.min.js +2 -2
- package/i18n/japanese.js +2 -3
- package/i18n/japanese.js.map +1 -1
- package/i18n/japanese.min.js +2 -2
- package/i18n/kazakh.js +2 -3
- package/i18n/kazakh.js.map +1 -1
- package/i18n/kazakh.min.js +2 -2
- package/i18n/korean.js +2 -3
- package/i18n/korean.js.map +1 -1
- package/i18n/korean.min.js +2 -2
- package/i18n/latvian.js +2 -3
- package/i18n/latvian.js.map +1 -1
- package/i18n/latvian.min.js +2 -2
- package/i18n/lithuanian.js +2 -3
- package/i18n/lithuanian.js.map +1 -1
- package/i18n/lithuanian.min.js +2 -2
- package/i18n/macedonian.js +2 -3
- package/i18n/macedonian.js.map +1 -1
- package/i18n/macedonian.min.js +2 -2
- package/i18n/malay.js +2 -3
- package/i18n/malay.js.map +1 -1
- package/i18n/malay.min.js +2 -2
- package/i18n/nl-BE.js +3 -5
- package/i18n/nl-BE.js.map +1 -1
- package/i18n/nl-BE.min.js +2 -2
- package/i18n/norwegian.js +2 -3
- package/i18n/norwegian.js.map +1 -1
- package/i18n/norwegian.min.js +2 -2
- package/i18n/persian.js +2 -3
- package/i18n/persian.js.map +1 -1
- package/i18n/persian.min.js +2 -2
- package/i18n/philippines.js +2 -3
- package/i18n/philippines.js.map +1 -1
- package/i18n/philippines.min.js +2 -2
- package/i18n/polish.js +2 -3
- package/i18n/polish.js.map +1 -1
- package/i18n/polish.min.js +2 -2
- package/i18n/portuguese-br.js +2 -3
- package/i18n/portuguese-br.js.map +1 -1
- package/i18n/portuguese-br.min.js +2 -2
- package/i18n/portuguese.js +2 -3
- package/i18n/portuguese.js.map +1 -1
- package/i18n/portuguese.min.js +2 -2
- package/i18n/romanian.js +2 -3
- package/i18n/romanian.js.map +1 -1
- package/i18n/romanian.min.js +2 -2
- package/i18n/russian.js +2 -3
- package/i18n/russian.js.map +1 -1
- package/i18n/russian.min.js +2 -2
- package/i18n/serbian.js +2 -3
- package/i18n/serbian.js.map +1 -1
- package/i18n/serbian.min.js +2 -2
- package/i18n/simplified-chinese.js +2 -3
- package/i18n/simplified-chinese.js.map +1 -1
- package/i18n/simplified-chinese.min.js +2 -2
- package/i18n/slovak.js +2 -3
- package/i18n/slovak.js.map +1 -1
- package/i18n/slovak.min.js +2 -2
- package/i18n/spanish.js +2 -3
- package/i18n/spanish.js.map +1 -1
- package/i18n/spanish.min.js +2 -2
- package/i18n/swahili.js +2 -3
- package/i18n/swahili.js.map +1 -1
- package/i18n/swahili.min.js +2 -2
- package/i18n/swedish.js +2 -3
- package/i18n/swedish.js.map +1 -1
- package/i18n/swedish.min.js +2 -2
- package/i18n/tajik.js +2 -3
- package/i18n/tajik.js.map +1 -1
- package/i18n/tajik.min.js +2 -2
- package/i18n/telugu.js +2 -3
- package/i18n/telugu.js.map +1 -1
- package/i18n/telugu.min.js +2 -2
- package/i18n/thai.js +2 -3
- package/i18n/thai.js.map +1 -1
- package/i18n/thai.min.js +2 -2
- package/i18n/traditional-chinese.js +2 -3
- package/i18n/traditional-chinese.js.map +1 -1
- package/i18n/traditional-chinese.min.js +2 -2
- package/i18n/turkish.js +2 -3
- package/i18n/turkish.js.map +1 -1
- package/i18n/turkish.min.js +2 -2
- package/i18n/ukrainian.js +2 -3
- package/i18n/ukrainian.js.map +1 -1
- package/i18n/ukrainian.min.js +2 -2
- package/i18n/urdu.js +2 -3
- package/i18n/urdu.js.map +1 -1
- package/i18n/urdu.min.js +2 -2
- package/i18n/vietnamese.js +2 -3
- package/i18n/vietnamese.js.map +1 -1
- package/i18n/vietnamese.min.js +2 -2
- package/i18n/welsh.js +2 -3
- package/i18n/welsh.js.map +1 -1
- package/i18n/welsh.min.js +2 -2
- package/modern.css +1 -1
- package/modern.fontless.css +1 -1
- package/modern.fontless.min.css +1 -1
- package/modern.min.css +1 -1
- package/package.json +1 -1
- package/plugins/bootstrap-integration/index.js +1 -1
- package/plugins/bootstrap-integration/index.min.js +1 -1
- package/plugins/bootstrap-material-integration/index.js +1 -1
- package/plugins/bootstrap-material-integration/index.min.js +1 -1
- package/survey.core.js +252 -120
- package/survey.core.js.map +1 -1
- package/survey.core.min.js +3 -3
- package/survey.css +1 -1
- package/survey.i18n.js +51 -102
- package/survey.i18n.js.map +1 -1
- package/survey.i18n.min.js +2 -2
- package/survey.min.css +1 -1
- package/themes/borderless-dark-panelless.js +1 -1
- package/themes/borderless-dark-panelless.min.js +1 -1
- package/themes/borderless-dark.js +1 -1
- package/themes/borderless-dark.min.js +1 -1
- package/themes/borderless-light-panelless..js +1 -1
- package/themes/borderless-light-panelless..min.js +1 -1
- package/themes/borderless-light.js +1 -1
- package/themes/borderless-light.min.js +1 -1
- package/themes/contrast-dark-panelless.js +1 -1
- package/themes/contrast-dark-panelless.min.js +1 -1
- package/themes/contrast-dark.js +1 -1
- package/themes/contrast-dark.min.js +1 -1
- package/themes/contrast-light-panelless.js +1 -1
- package/themes/contrast-light-panelless.min.js +1 -1
- package/themes/contrast-light.js +1 -1
- package/themes/contrast-light.min.js +1 -1
- package/themes/default-dark-panelless.js +1 -1
- package/themes/default-dark-panelless.min.js +1 -1
- package/themes/default-dark.js +1 -1
- package/themes/default-dark.min.js +1 -1
- package/themes/default-light-panelless.js +1 -1
- package/themes/default-light-panelless.min.js +1 -1
- package/themes/default-light.js +1 -1
- package/themes/default-light.min.js +1 -1
- package/themes/doubleborder-dark-panelless.js +1 -1
- package/themes/doubleborder-dark-panelless.min.js +1 -1
- package/themes/doubleborder-dark.js +1 -1
- package/themes/doubleborder-dark.min.js +1 -1
- package/themes/doubleborder-light-panelles.js +1 -1
- package/themes/doubleborder-light-panelles.min.js +1 -1
- package/themes/doubleborder-light.js +1 -1
- package/themes/doubleborder-light.min.js +1 -1
- package/themes/flat-dark-panelless.js +1 -1
- package/themes/flat-dark-panelless.min.js +1 -1
- package/themes/flat-dark.js +1 -1
- package/themes/flat-dark.min.js +1 -1
- package/themes/flat-light-panelless.js +1 -1
- package/themes/flat-light-panelless.min.js +1 -1
- package/themes/flat-light.js +1 -1
- package/themes/flat-light.min.js +1 -1
- package/themes/index.js +1 -1
- package/themes/index.min.js +1 -1
- package/themes/layered-dark-panelless.js +1 -1
- package/themes/layered-dark-panelless.min.js +1 -1
- package/themes/layered-dark.js +1 -1
- package/themes/layered-dark.min.js +1 -1
- package/themes/layered-light-panelless.js +1 -1
- package/themes/layered-light-panelless.min.js +1 -1
- package/themes/layered-light.js +1 -1
- package/themes/layered-light.min.js +1 -1
- package/themes/plain-dark-panelless.js +1 -1
- package/themes/plain-dark-panelless.min.js +1 -1
- package/themes/plain-dark.js +1 -1
- package/themes/plain-dark.min.js +1 -1
- package/themes/plain-light-panelless.js +1 -1
- package/themes/plain-light-panelless.min.js +1 -1
- package/themes/plain-light.js +1 -1
- package/themes/plain-light.min.js +1 -1
- package/themes/sharp-dark-panelless.js +1 -1
- package/themes/sharp-dark-panelless.min.js +1 -1
- package/themes/sharp-dark.js +1 -1
- package/themes/sharp-dark.min.js +1 -1
- package/themes/sharp-light-panelless.js +1 -1
- package/themes/sharp-light-panelless.min.js +1 -1
- package/themes/sharp-light.js +1 -1
- package/themes/sharp-light.min.js +1 -1
- package/themes/solid-dark-panelless.js +1 -1
- package/themes/solid-dark-panelless.min.js +1 -1
- package/themes/solid-dark.js +1 -1
- package/themes/solid-dark.min.js +1 -1
- package/themes/solid-light-panelless.js +1 -1
- package/themes/solid-light-panelless.min.js +1 -1
- package/themes/solid-light.js +1 -1
- package/themes/solid-light.min.js +1 -1
- package/themes/three-dimensional-dark-panelless.js +1 -1
- package/themes/three-dimensional-dark-panelless.min.js +1 -1
- package/themes/three-dimensional-dark.js +1 -1
- package/themes/three-dimensional-dark.min.js +1 -1
- package/themes/three-dimensional-light-panelless.js +1 -1
- package/themes/three-dimensional-light-panelless.min.js +1 -1
- package/themes/three-dimensional-light.js +1 -1
- package/themes/three-dimensional-light.min.js +1 -1
- package/ts3.4/typings/packages/survey-core/src/conditions.d.ts +4 -0
- package/ts3.4/typings/packages/survey-core/src/expressions/expressions.d.ts +11 -5
- package/ts3.4/typings/packages/survey-core/src/question_baseselect.d.ts +0 -3
- package/ts3.4/typings/packages/survey-core/src/question_file.d.ts +1 -0
- package/ts3.4/typings/packages/survey-core/src/question_matrixdropdownrendered.d.ts +1 -0
- package/ts3.4/typings/packages/survey-core/src/question_multipletext.d.ts +9 -0
- package/ts3.4/typings/packages/survey-core/src/question_paneldynamic.d.ts +50 -37
- package/ts3.4/typings/packages/survey-core/src/question_text.d.ts +9 -0
- package/ts3.4/typings/packages/survey-core/src/surveyStrings.d.ts +7 -0
- package/ts3.4/typings/packages/survey-core/src/utils/camera.d.ts +2 -2
- package/typings/packages/survey-core/src/conditions.d.ts +4 -0
- package/typings/packages/survey-core/src/expressions/expressions.d.ts +11 -5
- package/typings/packages/survey-core/src/question_baseselect.d.ts +0 -3
- package/typings/packages/survey-core/src/question_file.d.ts +1 -0
- package/typings/packages/survey-core/src/question_matrixdropdownrendered.d.ts +1 -0
- package/typings/packages/survey-core/src/question_multipletext.d.ts +9 -0
- package/typings/packages/survey-core/src/question_paneldynamic.d.ts +49 -36
- package/typings/packages/survey-core/src/question_text.d.ts +9 -0
- package/typings/packages/survey-core/src/surveyStrings.d.ts +7 -0
- package/typings/packages/survey-core/src/utils/camera.d.ts +2 -2
package/survey.core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.11.
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.11.13
|
|
3
3
|
* Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
@@ -1927,8 +1927,7 @@ var englishStrings = {
|
|
|
1927
1927
|
// Uncomment the lines below if you create a custom dictionary.
|
|
1928
1928
|
// Replace "en" with a custom locale code (for example, "fr" or "de"),
|
|
1929
1929
|
// Replace `englishStrings` with the name of the variable that contains the custom dictionary.
|
|
1930
|
-
//
|
|
1931
|
-
// surveyLocalization.localeNames["en"] = "English";
|
|
1930
|
+
//surveyLocalization.setupLocale("en", englishStrings, "English", "English");
|
|
1932
1931
|
|
|
1933
1932
|
// CONCATENATED MODULE: ./packages/survey-core/src/surveyStrings.ts
|
|
1934
1933
|
|
|
@@ -1937,8 +1936,21 @@ var surveyLocalization = {
|
|
|
1937
1936
|
defaultLocaleValue: "en",
|
|
1938
1937
|
locales: {},
|
|
1939
1938
|
localeNames: {},
|
|
1939
|
+
localeNamesInEnglish: {},
|
|
1940
1940
|
localeDirections: {},
|
|
1941
1941
|
supportedLocales: [],
|
|
1942
|
+
useEnglishNames: false,
|
|
1943
|
+
//TODO remove on next week
|
|
1944
|
+
get showNamesInEnglish() { return this.useEnglishNames; },
|
|
1945
|
+
set showNamesInEnglish(val) { this.useEnglishNames = val; },
|
|
1946
|
+
setupLocale: function (loc, strings, name, nameInEngish, direction) {
|
|
1947
|
+
this.locales[loc] = strings;
|
|
1948
|
+
this.localeNames[loc] = name;
|
|
1949
|
+
this.localeNamesInEnglish[loc] = nameInEngish;
|
|
1950
|
+
if (direction !== undefined) {
|
|
1951
|
+
this.localeDirections[loc] = direction;
|
|
1952
|
+
}
|
|
1953
|
+
},
|
|
1942
1954
|
get currentLocale() {
|
|
1943
1955
|
return this.currentLocaleValue === this.defaultLocaleValue ? "" : this.currentLocaleValue;
|
|
1944
1956
|
},
|
|
@@ -1990,7 +2002,17 @@ var surveyLocalization = {
|
|
|
1990
2002
|
}
|
|
1991
2003
|
return this.onGetExternalString(strName, locale);
|
|
1992
2004
|
},
|
|
2005
|
+
getLocaleName: function (loc, inEnglish) {
|
|
2006
|
+
if (!loc)
|
|
2007
|
+
return "";
|
|
2008
|
+
if (inEnglish === undefined)
|
|
2009
|
+
inEnglish = this.showNamesInEnglish;
|
|
2010
|
+
var firstNames = inEnglish ? this.localeNamesInEnglish : this.localeNames;
|
|
2011
|
+
var secondNames = inEnglish ? this.localeNames : this.localeNamesInEnglish;
|
|
2012
|
+
return firstNames[loc] || secondNames[loc] || loc;
|
|
2013
|
+
},
|
|
1993
2014
|
getLocales: function (removeDefaultLoc) {
|
|
2015
|
+
var _this = this;
|
|
1994
2016
|
if (removeDefaultLoc === void 0) { removeDefaultLoc = false; }
|
|
1995
2017
|
var res = [];
|
|
1996
2018
|
res.push("");
|
|
@@ -2007,12 +2029,7 @@ var surveyLocalization = {
|
|
|
2007
2029
|
res.push(key);
|
|
2008
2030
|
}
|
|
2009
2031
|
var locName = function (loc) {
|
|
2010
|
-
|
|
2011
|
-
return "";
|
|
2012
|
-
var res = surveyLocalization.localeNames[loc];
|
|
2013
|
-
if (!res)
|
|
2014
|
-
res = loc;
|
|
2015
|
-
return res.toLowerCase();
|
|
2032
|
+
return _this.getLocaleName(loc).toLowerCase();
|
|
2016
2033
|
};
|
|
2017
2034
|
res.sort(function (a, b) {
|
|
2018
2035
|
var str1 = locName(a);
|
|
@@ -5267,11 +5284,27 @@ var expressions_FunctionOperand = /** @class */ (function (_super) {
|
|
|
5267
5284
|
return true;
|
|
5268
5285
|
};
|
|
5269
5286
|
FunctionOperand.prototype.hasAsyncFunction = function () {
|
|
5287
|
+
return this.isAsyncFunction() || this.parameters.hasAsyncFunction();
|
|
5288
|
+
};
|
|
5289
|
+
FunctionOperand.prototype.isAsyncFunction = function () {
|
|
5270
5290
|
return functionsfactory_FunctionFactory.Instance.isAsyncFunction(this.originalValue);
|
|
5271
5291
|
};
|
|
5272
5292
|
FunctionOperand.prototype.addToAsyncList = function (list) {
|
|
5273
|
-
|
|
5274
|
-
|
|
5293
|
+
var item = undefined;
|
|
5294
|
+
if (this.isAsyncFunction()) {
|
|
5295
|
+
item = { operand: this };
|
|
5296
|
+
}
|
|
5297
|
+
if (this.parameters.hasAsyncFunction()) {
|
|
5298
|
+
var children = new Array();
|
|
5299
|
+
this.parameters.addToAsyncList(children);
|
|
5300
|
+
children.forEach(function (child) { return child.parent = item; });
|
|
5301
|
+
if (!item) {
|
|
5302
|
+
item = {};
|
|
5303
|
+
}
|
|
5304
|
+
item.children = children;
|
|
5305
|
+
}
|
|
5306
|
+
if (item) {
|
|
5307
|
+
list.push(item);
|
|
5275
5308
|
}
|
|
5276
5309
|
};
|
|
5277
5310
|
FunctionOperand.prototype.isContentEqual = function (op) {
|
|
@@ -8630,7 +8663,6 @@ var conditions_ExpressionExecutor = /** @class */ (function () {
|
|
|
8630
8663
|
return !!this.operand;
|
|
8631
8664
|
};
|
|
8632
8665
|
ExpressionExecutor.prototype.run = function (values, properties) {
|
|
8633
|
-
var _this = this;
|
|
8634
8666
|
if (properties === void 0) { properties = null; }
|
|
8635
8667
|
if (!this.operand) {
|
|
8636
8668
|
if (!!this.expression) {
|
|
@@ -8642,25 +8674,57 @@ var conditions_ExpressionExecutor = /** @class */ (function () {
|
|
|
8642
8674
|
this.processValue.properties = properties;
|
|
8643
8675
|
if (!this.isAsync)
|
|
8644
8676
|
return this.runValues();
|
|
8645
|
-
this.asyncFuncList =
|
|
8677
|
+
this.asyncFuncList = new Array();
|
|
8646
8678
|
this.operand.addToAsyncList(this.asyncFuncList);
|
|
8647
8679
|
for (var i = 0; i < this.asyncFuncList.length; i++) {
|
|
8648
|
-
this.asyncFuncList[i]
|
|
8649
|
-
_this.doAsyncFunctionReady();
|
|
8650
|
-
};
|
|
8651
|
-
}
|
|
8652
|
-
for (var i = 0; i < this.asyncFuncList.length; i++) {
|
|
8653
|
-
this.asyncFuncList[i].evaluateAsync(this.processValue);
|
|
8680
|
+
this.runAsyncItem(this.asyncFuncList[i]);
|
|
8654
8681
|
}
|
|
8655
8682
|
return false;
|
|
8656
8683
|
};
|
|
8657
|
-
ExpressionExecutor.prototype.
|
|
8684
|
+
ExpressionExecutor.prototype.runAsyncItem = function (item) {
|
|
8685
|
+
var _this = this;
|
|
8686
|
+
if (item.children) {
|
|
8687
|
+
item.children.forEach(function (child) { return _this.runAsyncItem(child); });
|
|
8688
|
+
}
|
|
8689
|
+
else {
|
|
8690
|
+
this.runAsyncItemCore(item);
|
|
8691
|
+
}
|
|
8692
|
+
};
|
|
8693
|
+
ExpressionExecutor.prototype.runAsyncItemCore = function (item) {
|
|
8694
|
+
var _this = this;
|
|
8695
|
+
if (item.operand) {
|
|
8696
|
+
item.operand.onAsyncReady = function () { return _this.doAsyncFunctionReady(item); };
|
|
8697
|
+
item.operand.evaluateAsync(this.processValue);
|
|
8698
|
+
}
|
|
8699
|
+
else {
|
|
8700
|
+
this.doAsyncFunctionReady(item);
|
|
8701
|
+
}
|
|
8702
|
+
};
|
|
8703
|
+
ExpressionExecutor.prototype.doAsyncFunctionReady = function (item) {
|
|
8704
|
+
if (item.parent && this.isAsyncChildrenReady(item)) {
|
|
8705
|
+
this.runAsyncItemCore(item.parent);
|
|
8706
|
+
return;
|
|
8707
|
+
}
|
|
8658
8708
|
for (var i = 0; i < this.asyncFuncList.length; i++) {
|
|
8659
|
-
if (!this.asyncFuncList[i]
|
|
8709
|
+
if (!this.isAsyncFuncReady(this.asyncFuncList[i]))
|
|
8660
8710
|
return;
|
|
8661
8711
|
}
|
|
8662
8712
|
this.runValues();
|
|
8663
8713
|
};
|
|
8714
|
+
ExpressionExecutor.prototype.isAsyncFuncReady = function (item) {
|
|
8715
|
+
if (item.operand && !item.operand.isReady)
|
|
8716
|
+
return false;
|
|
8717
|
+
return this.isAsyncChildrenReady(item);
|
|
8718
|
+
};
|
|
8719
|
+
ExpressionExecutor.prototype.isAsyncChildrenReady = function (item) {
|
|
8720
|
+
if (item.children) {
|
|
8721
|
+
for (var i = 0; i < item.children.length; i++) {
|
|
8722
|
+
if (!this.isAsyncFuncReady(item.children[i]))
|
|
8723
|
+
return false;
|
|
8724
|
+
}
|
|
8725
|
+
}
|
|
8726
|
+
return true;
|
|
8727
|
+
};
|
|
8664
8728
|
ExpressionExecutor.prototype.runValues = function () {
|
|
8665
8729
|
var res = this.operand.evaluate(this.processValue);
|
|
8666
8730
|
if (!!this.onComplete) {
|
|
@@ -25854,6 +25918,14 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedCell = /** @cl
|
|
|
25854
25918
|
enumerable: false,
|
|
25855
25919
|
configurable: true
|
|
25856
25920
|
});
|
|
25921
|
+
Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "isVisible", {
|
|
25922
|
+
get: function () {
|
|
25923
|
+
var _a;
|
|
25924
|
+
return (!this.hasQuestion && !this.isErrorsCell) || !((_a = this.matrix) === null || _a === void 0 ? void 0 : _a.isMobile) || this.question.isVisible;
|
|
25925
|
+
},
|
|
25926
|
+
enumerable: false,
|
|
25927
|
+
configurable: true
|
|
25928
|
+
});
|
|
25857
25929
|
Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "showResponsiveTitle", {
|
|
25858
25930
|
get: function () {
|
|
25859
25931
|
var _a;
|
|
@@ -26899,9 +26971,6 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable = /** @c
|
|
|
26899
26971
|
QuestionMatrixDropdownRenderedTable.prototype.createTextCell = function (locTitle) {
|
|
26900
26972
|
var cell = new question_matrixdropdownrendered_QuestionMatrixDropdownRenderedCell();
|
|
26901
26973
|
cell.locTitle = locTitle;
|
|
26902
|
-
if (!!locTitle) {
|
|
26903
|
-
locTitle.strChanged();
|
|
26904
|
-
}
|
|
26905
26974
|
if (!!this.cssClasses.cell) {
|
|
26906
26975
|
cell.className = this.cssClasses.cell;
|
|
26907
26976
|
}
|
|
@@ -38389,14 +38458,6 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
38389
38458
|
_this._isMobile = false;
|
|
38390
38459
|
_this._isCompact = false;
|
|
38391
38460
|
_this._isDesignMode = false;
|
|
38392
|
-
/**
|
|
38393
|
-
* Specifies whether data validation is enabled.
|
|
38394
|
-
*
|
|
38395
|
-
* Default value: `true`
|
|
38396
|
-
* @see checkErrorsMode
|
|
38397
|
-
* @see hideRequiredErrors
|
|
38398
|
-
*/
|
|
38399
|
-
_this.validationEnabled = true;
|
|
38400
38461
|
/**
|
|
38401
38462
|
* Specifies whether respondents can switch the current page even if it contains validation errors.
|
|
38402
38463
|
*
|
|
@@ -46116,6 +46177,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
46116
46177
|
survey_decorate([
|
|
46117
46178
|
jsonobject_property()
|
|
46118
46179
|
], SurveyModel.prototype, "progressBarInheritWidthFrom", void 0);
|
|
46180
|
+
survey_decorate([
|
|
46181
|
+
jsonobject_property({ defaultValue: true })
|
|
46182
|
+
], SurveyModel.prototype, "validationEnabled", void 0);
|
|
46119
46183
|
survey_decorate([
|
|
46120
46184
|
jsonobject_property()
|
|
46121
46185
|
], SurveyModel.prototype, "rootCss", void 0);
|
|
@@ -53025,7 +53089,7 @@ Serializer.addClass("text", [
|
|
|
53025
53089
|
return isMinMaxType(obj);
|
|
53026
53090
|
},
|
|
53027
53091
|
},
|
|
53028
|
-
{ name: "inputTextAlignment", default: "auto", choices: ["left", "right", "auto"]
|
|
53092
|
+
{ name: "inputTextAlignment", default: "auto", choices: ["left", "right", "auto"] },
|
|
53029
53093
|
{
|
|
53030
53094
|
name: "maskType",
|
|
53031
53095
|
default: "none",
|
|
@@ -53516,6 +53580,15 @@ var question_multipletext_MultipleTextItemModel = /** @class */ (function (_supe
|
|
|
53516
53580
|
configurable: true
|
|
53517
53581
|
});
|
|
53518
53582
|
Object.defineProperty(MultipleTextItemModel.prototype, "inputTextAlignment", {
|
|
53583
|
+
/**
|
|
53584
|
+
* Specifies text alignment within the input field.
|
|
53585
|
+
*
|
|
53586
|
+
* Possible values:
|
|
53587
|
+
*
|
|
53588
|
+
* - `"left"` - Aligns input text to the left side.
|
|
53589
|
+
* - `"right"` - Aligns input text to the right side.
|
|
53590
|
+
* - `"auto"` (default) - Applies right alignment if a [numeric or currency input mask](https://surveyjs.io/form-library/documentation/api-reference/multipletextitemmodel#maskType) is specified. Otherwise, applies left alignment.
|
|
53591
|
+
*/
|
|
53519
53592
|
get: function () {
|
|
53520
53593
|
return this.editor.inputTextAlignment;
|
|
53521
53594
|
},
|
|
@@ -54261,7 +54334,7 @@ Serializer.addClass("multipletextitem", [
|
|
|
54261
54334
|
obj.maskSettings.setData(value);
|
|
54262
54335
|
},
|
|
54263
54336
|
},
|
|
54264
|
-
{ name: "inputTextAlignment", default: "auto", choices: ["left", "right", "auto"]
|
|
54337
|
+
{ name: "inputTextAlignment", default: "auto", choices: ["left", "right", "auto"] },
|
|
54265
54338
|
{ name: "title", serializationProperty: "locTitle" },
|
|
54266
54339
|
{ name: "maxLength:number", default: -1 },
|
|
54267
54340
|
{ name: "size:number", minValue: 0 },
|
|
@@ -57580,7 +57653,6 @@ questionfactory_QuestionFactory.Instance.registerQuestion("comment", function (n
|
|
|
57580
57653
|
|
|
57581
57654
|
// CONCATENATED MODULE: ./packages/survey-core/src/utils/camera.ts
|
|
57582
57655
|
|
|
57583
|
-
|
|
57584
57656
|
var camera_Camera = /** @class */ (function () {
|
|
57585
57657
|
function Camera() {
|
|
57586
57658
|
this.canFlipValue = undefined;
|
|
@@ -57683,27 +57755,25 @@ var camera_Camera = /** @class */ (function () {
|
|
|
57683
57755
|
audio: false
|
|
57684
57756
|
};
|
|
57685
57757
|
};
|
|
57686
|
-
Camera.prototype.startVideo = function (
|
|
57758
|
+
Camera.prototype.startVideo = function (videoElement, callback, imageWidth, imageHeight) {
|
|
57687
57759
|
var _this = this;
|
|
57688
|
-
|
|
57689
|
-
var videoEl = (_a = settings.environment.root) === null || _a === void 0 ? void 0 : _a.getElementById(videoElementId);
|
|
57690
|
-
if (!videoEl) {
|
|
57760
|
+
if (!videoElement) {
|
|
57691
57761
|
callback(undefined);
|
|
57692
57762
|
return;
|
|
57693
57763
|
}
|
|
57694
|
-
|
|
57695
|
-
|
|
57696
|
-
|
|
57697
|
-
|
|
57764
|
+
videoElement.style.width = "100%";
|
|
57765
|
+
videoElement.style.height = "auto";
|
|
57766
|
+
videoElement.style.height = "100%";
|
|
57767
|
+
videoElement.style.objectFit = "contain";
|
|
57698
57768
|
var mediaConstraints = this.getMediaConstraints({ width: imageWidth, height: imageHeight });
|
|
57699
57769
|
navigator.mediaDevices.getUserMedia(mediaConstraints).then(function (stream) {
|
|
57700
57770
|
var _a;
|
|
57701
|
-
|
|
57771
|
+
videoElement.srcObject = stream;
|
|
57702
57772
|
if (!((_a = Camera.cameraList[Camera.cameraIndex]) === null || _a === void 0 ? void 0 : _a.deviceId) && !!stream.getTracks()[0].getCapabilities().facingMode) {
|
|
57703
57773
|
Camera.canSwitchFacingMode = true;
|
|
57704
57774
|
_this.updateCanFlipValue();
|
|
57705
57775
|
}
|
|
57706
|
-
|
|
57776
|
+
videoElement.play();
|
|
57707
57777
|
callback(stream);
|
|
57708
57778
|
})
|
|
57709
57779
|
.catch(function (error) {
|
|
@@ -57713,15 +57783,14 @@ var camera_Camera = /** @class */ (function () {
|
|
|
57713
57783
|
Camera.prototype.getImageSize = function (videoEl) {
|
|
57714
57784
|
return { width: videoEl.videoWidth, height: videoEl.videoHeight };
|
|
57715
57785
|
};
|
|
57716
|
-
Camera.prototype.snap = function (
|
|
57786
|
+
Camera.prototype.snap = function (videoElement, callback) {
|
|
57787
|
+
if (!videoElement)
|
|
57788
|
+
return false;
|
|
57717
57789
|
if (!DomDocumentHelper.isAvailable())
|
|
57718
57790
|
return false;
|
|
57719
57791
|
var root = DomDocumentHelper.getDocument();
|
|
57720
|
-
var videoEl = root === null || root === void 0 ? void 0 : root.getElementById(videoElementId);
|
|
57721
|
-
if (!videoEl)
|
|
57722
|
-
return false;
|
|
57723
57792
|
var canvasEl = root.createElement("canvas");
|
|
57724
|
-
var imageSize = this.getImageSize(
|
|
57793
|
+
var imageSize = this.getImageSize(videoElement);
|
|
57725
57794
|
canvasEl.height = imageSize.height;
|
|
57726
57795
|
canvasEl.width = imageSize.width;
|
|
57727
57796
|
var context = canvasEl.getContext("2d");
|
|
@@ -57732,7 +57801,7 @@ var camera_Camera = /** @class */ (function () {
|
|
|
57732
57801
|
}
|
|
57733
57802
|
*/
|
|
57734
57803
|
context.clearRect(0, 0, canvasEl.width, canvasEl.height);
|
|
57735
|
-
context.drawImage(
|
|
57804
|
+
context.drawImage(videoElement, 0, 0, canvasEl.width, canvasEl.height);
|
|
57736
57805
|
canvasEl.toBlob(callback, "image/png");
|
|
57737
57806
|
return true;
|
|
57738
57807
|
};
|
|
@@ -58195,9 +58264,17 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
|
|
|
58195
58264
|
_this.startVideoInCamera();
|
|
58196
58265
|
}, 0);
|
|
58197
58266
|
};
|
|
58267
|
+
Object.defineProperty(QuestionFileModel.prototype, "videoHtmlElement", {
|
|
58268
|
+
get: function () {
|
|
58269
|
+
var _a;
|
|
58270
|
+
return (_a = this.rootElement) === null || _a === void 0 ? void 0 : _a.querySelector("#" + this.videoId);
|
|
58271
|
+
},
|
|
58272
|
+
enumerable: false,
|
|
58273
|
+
configurable: true
|
|
58274
|
+
});
|
|
58198
58275
|
QuestionFileModel.prototype.startVideoInCamera = function () {
|
|
58199
58276
|
var _this = this;
|
|
58200
|
-
this.camera.startVideo(this.
|
|
58277
|
+
this.camera.startVideo(this.videoHtmlElement, function (stream) {
|
|
58201
58278
|
_this.videoStream = stream;
|
|
58202
58279
|
if (!stream) {
|
|
58203
58280
|
_this.stopVideo();
|
|
@@ -58218,7 +58295,7 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
|
|
|
58218
58295
|
_this.loadFiles([file]);
|
|
58219
58296
|
}
|
|
58220
58297
|
};
|
|
58221
|
-
this.camera.snap(this.
|
|
58298
|
+
this.camera.snap(this.videoHtmlElement, blobCallback);
|
|
58222
58299
|
this.stopVideo();
|
|
58223
58300
|
};
|
|
58224
58301
|
QuestionFileModel.prototype.canFlipCamera = function () {
|
|
@@ -59989,7 +60066,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
59989
60066
|
QuestionRatingModel.prototype.setValueFromClick = function (value) {
|
|
59990
60067
|
if (this.isReadOnlyAttr)
|
|
59991
60068
|
return;
|
|
59992
|
-
if (this.value === parseFloat(value)) {
|
|
60069
|
+
if (this.value === ((typeof (this.value) === "string") ? value : parseFloat(value))) {
|
|
59993
60070
|
this.clearValue(true);
|
|
59994
60071
|
}
|
|
59995
60072
|
else {
|
|
@@ -63333,7 +63410,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
63333
63410
|
_this.registerPropertyChangedHandlers(["panelsState"], function () {
|
|
63334
63411
|
_this.setPanelsState();
|
|
63335
63412
|
});
|
|
63336
|
-
_this.registerPropertyChangedHandlers(["isMobile", "newPanelPosition", "
|
|
63413
|
+
_this.registerPropertyChangedHandlers(["isMobile", "newPanelPosition", "displayMode", "showProgressBar"], function () {
|
|
63337
63414
|
_this.updateFooterActions();
|
|
63338
63415
|
});
|
|
63339
63416
|
_this.registerPropertyChangedHandlers(["allowAddPanel"], function () { _this.updateNoEntriesTextDefaultLoc(); });
|
|
@@ -63489,7 +63566,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
63489
63566
|
});
|
|
63490
63567
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "templateTabTitle", {
|
|
63491
63568
|
/**
|
|
63492
|
-
* A template for tab titles. Applies when [`
|
|
63569
|
+
* A template for tab titles. Applies when [`displayMode`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#displayMode) is `"tab"`.
|
|
63493
63570
|
*
|
|
63494
63571
|
* The template can contain the following placeholders:
|
|
63495
63572
|
*
|
|
@@ -63501,7 +63578,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
63501
63578
|
* [View Demo](https://surveyjs.io/form-library/examples/tabbed-interface-for-duplicate-group-option/ (linkStyle))
|
|
63502
63579
|
* @see templateTitle
|
|
63503
63580
|
* @see tabTitlePlaceholder
|
|
63504
|
-
* @see
|
|
63581
|
+
* @see displayMode
|
|
63505
63582
|
*/
|
|
63506
63583
|
get: function () {
|
|
63507
63584
|
return this.locTemplateTabTitle.text;
|
|
@@ -63681,11 +63758,11 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
63681
63758
|
/**
|
|
63682
63759
|
* A zero-based index of the currently displayed panel.
|
|
63683
63760
|
*
|
|
63684
|
-
* When `
|
|
63761
|
+
* When `displayMode` is `"list"` or Dynamic Panel is empty (`panelCount` is 0), this property contains -1.
|
|
63685
63762
|
* @see currentPanel
|
|
63686
63763
|
* @see panels
|
|
63687
63764
|
* @see panelCount
|
|
63688
|
-
* @see
|
|
63765
|
+
* @see displayMode
|
|
63689
63766
|
*/
|
|
63690
63767
|
get: function () {
|
|
63691
63768
|
if (this.isRenderModeList)
|
|
@@ -63708,11 +63785,11 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
63708
63785
|
/**
|
|
63709
63786
|
* A `PanelModel` object that is the currently displayed panel.
|
|
63710
63787
|
*
|
|
63711
|
-
* When `
|
|
63788
|
+
* When `displayMode` is `"list"` or Dynamic Panel is empty (`panelCount` is 0), this property contains `null`.
|
|
63712
63789
|
* @see currentIndex
|
|
63713
63790
|
* @see panels
|
|
63714
63791
|
* @see panelCount
|
|
63715
|
-
* @see
|
|
63792
|
+
* @see displayMode
|
|
63716
63793
|
*/
|
|
63717
63794
|
get: function () {
|
|
63718
63795
|
if (this.isDesignMode)
|
|
@@ -63962,8 +64039,8 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
63962
64039
|
});
|
|
63963
64040
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "panelPrevText", {
|
|
63964
64041
|
/**
|
|
63965
|
-
* A caption for the Previous button. Applies only if `
|
|
63966
|
-
* @see
|
|
64042
|
+
* A caption for the Previous button. Applies only if `displayMode` is different from `"list"`.
|
|
64043
|
+
* @see displayMode
|
|
63967
64044
|
* @see isPrevButtonVisible
|
|
63968
64045
|
*/
|
|
63969
64046
|
get: function () {
|
|
@@ -63984,8 +64061,8 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
63984
64061
|
});
|
|
63985
64062
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "panelNextText", {
|
|
63986
64063
|
/**
|
|
63987
|
-
* A caption for the Next button. Applies only if `
|
|
63988
|
-
* @see
|
|
64064
|
+
* A caption for the Next button. Applies only if `displayMode` is different from `"list"`.
|
|
64065
|
+
* @see displayMode
|
|
63989
64066
|
* @see isNextButtonVisible
|
|
63990
64067
|
*/
|
|
63991
64068
|
get: function () {
|
|
@@ -64046,21 +64123,15 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
64046
64123
|
configurable: true
|
|
64047
64124
|
});
|
|
64048
64125
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "isProgressTopShowing", {
|
|
64049
|
-
/**
|
|
64050
|
-
* Returns true when the renderMode equals to "progressTop" or "progressTopBottom"
|
|
64051
|
-
*/
|
|
64052
64126
|
get: function () {
|
|
64053
|
-
return this.
|
|
64127
|
+
return this.displayMode == "carousel" && (this.progressBarLocation === "top" || this.progressBarLocation === "topBottom");
|
|
64054
64128
|
},
|
|
64055
64129
|
enumerable: false,
|
|
64056
64130
|
configurable: true
|
|
64057
64131
|
});
|
|
64058
64132
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "isProgressBottomShowing", {
|
|
64059
|
-
/**
|
|
64060
|
-
* Returns true when the renderMode equals to "progressBottom" or "progressTopBottom"
|
|
64061
|
-
*/
|
|
64062
64133
|
get: function () {
|
|
64063
|
-
return this.
|
|
64134
|
+
return this.displayMode == "carousel" && (this.progressBarLocation === "bottom" || this.progressBarLocation === "topBottom");
|
|
64064
64135
|
},
|
|
64065
64136
|
enumerable: false,
|
|
64066
64137
|
configurable: true
|
|
@@ -64100,9 +64171,6 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
64100
64171
|
configurable: true
|
|
64101
64172
|
});
|
|
64102
64173
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "isRangeShowing", {
|
|
64103
|
-
/**
|
|
64104
|
-
* Returns true when showRangeInProgress equals to true, renderMode doesn't equal to "list" and visiblePanelCount is >= 2.
|
|
64105
|
-
*/
|
|
64106
64174
|
get: function () {
|
|
64107
64175
|
return (this.showRangeInProgress && this.currentIndex >= 0 && this.visiblePanelCount > 1);
|
|
64108
64176
|
},
|
|
@@ -64179,7 +64247,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
64179
64247
|
for (var i = this.panelCount; i < val; i++) {
|
|
64180
64248
|
var panel = this.createNewPanel();
|
|
64181
64249
|
this.panelsCore.push(panel);
|
|
64182
|
-
if (this.
|
|
64250
|
+
if (this.displayMode == "list" && this.panelsState != "default") {
|
|
64183
64251
|
if (this.panelsState === "expanded") {
|
|
64184
64252
|
panel.expand();
|
|
64185
64253
|
}
|
|
@@ -64215,7 +64283,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
64215
64283
|
});
|
|
64216
64284
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "panelsState", {
|
|
64217
64285
|
/**
|
|
64218
|
-
* Specifies whether users can expand and collapse panels. Applies if `
|
|
64286
|
+
* Specifies whether users can expand and collapse panels. Applies if `displayMode` is `"list"` and the `templateTitle` property is specified.
|
|
64219
64287
|
*
|
|
64220
64288
|
* Possible values:
|
|
64221
64289
|
*
|
|
@@ -64223,7 +64291,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
64223
64291
|
* - `"expanded"` - All panels are displayed in full and can be collapsed in the UI.
|
|
64224
64292
|
* - `"collapsed"` - All panels display only their titles and descriptions and can be expanded in the UI.
|
|
64225
64293
|
* - `"firstExpanded"` - Only the first panel is displayed in full; other panels are collapsed and can be expanded in the UI.
|
|
64226
|
-
* @see
|
|
64294
|
+
* @see displayMode
|
|
64227
64295
|
* @see templateTitle
|
|
64228
64296
|
*/
|
|
64229
64297
|
get: function () {
|
|
@@ -64249,7 +64317,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
64249
64317
|
}
|
|
64250
64318
|
};
|
|
64251
64319
|
QuestionPanelDynamicModel.prototype.setPanelsState = function () {
|
|
64252
|
-
if (this.useTemplatePanel || this.
|
|
64320
|
+
if (this.useTemplatePanel || this.displayMode != "list" || !this.templateTitle)
|
|
64253
64321
|
return;
|
|
64254
64322
|
for (var i = 0; i < this.panelsCore.length; i++) {
|
|
64255
64323
|
var state = this.panelsState;
|
|
@@ -64462,46 +64530,68 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
64462
64530
|
});
|
|
64463
64531
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "showRangeInProgress", {
|
|
64464
64532
|
/**
|
|
64465
|
-
*
|
|
64466
|
-
* @
|
|
64467
|
-
* @see renderMode
|
|
64533
|
+
* Obsolete. Use the [`showProgressBar`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#showProgressBar) property instead.
|
|
64534
|
+
* @deprecated
|
|
64468
64535
|
*/
|
|
64469
64536
|
get: function () {
|
|
64470
|
-
return this.
|
|
64537
|
+
return this.showProgressBar;
|
|
64538
|
+
// return this.getPropertyValue("showRangeInProgress");
|
|
64471
64539
|
},
|
|
64472
64540
|
set: function (val) {
|
|
64473
|
-
this.
|
|
64474
|
-
this.
|
|
64541
|
+
this.showProgressBar = val;
|
|
64542
|
+
// this.setPropertyValue("showRangeInProgress", val);
|
|
64475
64543
|
},
|
|
64476
64544
|
enumerable: false,
|
|
64477
64545
|
configurable: true
|
|
64478
64546
|
});
|
|
64479
64547
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "renderMode", {
|
|
64480
64548
|
/**
|
|
64481
|
-
*
|
|
64482
|
-
*
|
|
64483
|
-
* Possible values:
|
|
64484
|
-
*
|
|
64485
|
-
* - `"list"` (default) - Renders panels one under the other. [View Demo](https://surveyjs.io/form-library/examples/how-to-use-expressions-in-dynamic-panel/)
|
|
64486
|
-
* - `"progressTop"` - Renders each panel as a card and displays a progress bar at the top. [View Demo](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/)
|
|
64487
|
-
* - `"progressBottom"` - Renders each panel panel as a card and displays a progress bar at the bottom.
|
|
64488
|
-
* - `"progressTopBottom"` - Renders each panel as a card and displays a progress bar at the top and bottom.
|
|
64489
|
-
* - `"tab"` - Renders each panel within a tab. Use the [`templateTabTitle`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#templateTabTitle) to specify a template for tab titles. [View Demo](https://surveyjs.io/form-library/examples/tabbed-interface-for-duplicate-group-option/)
|
|
64549
|
+
* Obsolete. Use the [`displayMode`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#displayMode) property instead.
|
|
64550
|
+
* @deprecated
|
|
64490
64551
|
*/
|
|
64491
64552
|
get: function () {
|
|
64492
|
-
|
|
64553
|
+
var displayMode = this.displayMode;
|
|
64554
|
+
if (displayMode == "carousel") {
|
|
64555
|
+
var progressBarLocation = this.progressBarLocation;
|
|
64556
|
+
if (progressBarLocation == "top") {
|
|
64557
|
+
return "progressTop";
|
|
64558
|
+
}
|
|
64559
|
+
else if (progressBarLocation == "bottom") {
|
|
64560
|
+
return "progressBottom";
|
|
64561
|
+
}
|
|
64562
|
+
else if (progressBarLocation == "topBottom") {
|
|
64563
|
+
return "progressTopBottom";
|
|
64564
|
+
}
|
|
64565
|
+
}
|
|
64566
|
+
return displayMode;
|
|
64493
64567
|
},
|
|
64494
64568
|
set: function (val) {
|
|
64495
|
-
|
|
64496
|
-
|
|
64497
|
-
|
|
64498
|
-
|
|
64499
|
-
|
|
64500
|
-
|
|
64569
|
+
if ((val || "").startsWith("progress")) {
|
|
64570
|
+
if (val == "progressTop") {
|
|
64571
|
+
this.progressBarLocation = "top";
|
|
64572
|
+
}
|
|
64573
|
+
else if (val == "progressBottom") {
|
|
64574
|
+
this.progressBarLocation = "bottom";
|
|
64575
|
+
}
|
|
64576
|
+
else if (val == "progressTopBottom") {
|
|
64577
|
+
this.progressBarLocation = "topBottom";
|
|
64578
|
+
}
|
|
64579
|
+
this.displayMode = "carousel";
|
|
64580
|
+
}
|
|
64581
|
+
else {
|
|
64582
|
+
this.displayMode = val;
|
|
64583
|
+
}
|
|
64584
|
+
// this.updatePanelView();
|
|
64501
64585
|
},
|
|
64502
64586
|
enumerable: false,
|
|
64503
64587
|
configurable: true
|
|
64504
64588
|
});
|
|
64589
|
+
QuestionPanelDynamicModel.prototype.updatePanelView = function () {
|
|
64590
|
+
this.blockAnimations();
|
|
64591
|
+
this.updateRenderedPanels();
|
|
64592
|
+
this.releaseAnimations();
|
|
64593
|
+
this.updatePanelsAnimation();
|
|
64594
|
+
};
|
|
64505
64595
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "tabAlign", {
|
|
64506
64596
|
get: function () {
|
|
64507
64597
|
return this.getPropertyValue("tabAlign");
|
|
@@ -64517,14 +64607,14 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
64517
64607
|
});
|
|
64518
64608
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "isRenderModeList", {
|
|
64519
64609
|
get: function () {
|
|
64520
|
-
return this.
|
|
64610
|
+
return this.displayMode === "list";
|
|
64521
64611
|
},
|
|
64522
64612
|
enumerable: false,
|
|
64523
64613
|
configurable: true
|
|
64524
64614
|
});
|
|
64525
64615
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "isRenderModeTab", {
|
|
64526
64616
|
get: function () {
|
|
64527
|
-
return this.
|
|
64617
|
+
return this.displayMode === "tab";
|
|
64528
64618
|
},
|
|
64529
64619
|
enumerable: false,
|
|
64530
64620
|
configurable: true
|
|
@@ -64716,7 +64806,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
64716
64806
|
};
|
|
64717
64807
|
/**
|
|
64718
64808
|
* Add a new dynamic panel based on the template Panel. It checks if canAddPanel returns true and then calls addPanel method.
|
|
64719
|
-
* If a
|
|
64809
|
+
* If a displayMode is different from "list" and the current panel has erros, then
|
|
64720
64810
|
* @see template
|
|
64721
64811
|
* @see panelCount
|
|
64722
64812
|
* @see panels
|
|
@@ -64728,7 +64818,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
64728
64818
|
if (!this.canLeaveCurrentPanel())
|
|
64729
64819
|
return null;
|
|
64730
64820
|
var newPanel = this.addPanel();
|
|
64731
|
-
if (this.
|
|
64821
|
+
if (this.displayMode === "list" && this.panelsState !== "default") {
|
|
64732
64822
|
newPanel.expand();
|
|
64733
64823
|
}
|
|
64734
64824
|
this.focusNewPanelCallback = function () {
|
|
@@ -64747,7 +64837,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
64747
64837
|
};
|
|
64748
64838
|
/**
|
|
64749
64839
|
* Adds a new panel based on the [template](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#template).
|
|
64750
|
-
* @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 [`
|
|
64840
|
+
* @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 [`displayMode`](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 `displayMode` value.
|
|
64751
64841
|
* @see panelCount
|
|
64752
64842
|
* @see panels
|
|
64753
64843
|
* @see allowAddPanel
|
|
@@ -64796,7 +64886,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
64796
64886
|
}
|
|
64797
64887
|
};
|
|
64798
64888
|
QuestionPanelDynamicModel.prototype.canLeaveCurrentPanel = function () {
|
|
64799
|
-
return !(this.
|
|
64889
|
+
return !(this.displayMode !== "list" && this.currentPanel && this.currentPanel.hasErrors(true, true));
|
|
64800
64890
|
};
|
|
64801
64891
|
QuestionPanelDynamicModel.prototype.copyValue = function (dest, src) {
|
|
64802
64892
|
for (var key in src) {
|
|
@@ -64834,8 +64924,8 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
64834
64924
|
(this.isValueEmpty(this.defaultPanelValue) || !this.isTwoValueEquals(panelValue, this.defaultPanelValue));
|
|
64835
64925
|
};
|
|
64836
64926
|
/**
|
|
64837
|
-
* Switches Dynamic Panel to the next panel. Returns `true` in case of success, or `false` if `
|
|
64838
|
-
* @see
|
|
64927
|
+
* Switches Dynamic Panel to the next panel. Returns `true` in case of success, or `false` if `displayMode` is `"list"` or the current panel contains validation errors.
|
|
64928
|
+
* @see displayMode
|
|
64839
64929
|
*/
|
|
64840
64930
|
QuestionPanelDynamicModel.prototype.goToNextPanel = function () {
|
|
64841
64931
|
if (this.currentIndex < 0)
|
|
@@ -65649,7 +65739,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
65649
65739
|
return new CssClassBuilder()
|
|
65650
65740
|
.append(this.cssClasses.button)
|
|
65651
65741
|
.append(this.cssClasses.buttonAdd)
|
|
65652
|
-
.append(this.cssClasses.buttonAdd + "--list-mode", this.
|
|
65742
|
+
.append(this.cssClasses.buttonAdd + "--list-mode", this.displayMode === "list")
|
|
65653
65743
|
.toString();
|
|
65654
65744
|
};
|
|
65655
65745
|
QuestionPanelDynamicModel.prototype.getPrevButtonCss = function () {
|
|
@@ -65908,6 +65998,28 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
65908
65998
|
question_paneldynamic_decorate([
|
|
65909
65999
|
propertyArray({})
|
|
65910
66000
|
], QuestionPanelDynamicModel.prototype, "_renderedPanels", void 0);
|
|
66001
|
+
question_paneldynamic_decorate([
|
|
66002
|
+
jsonobject_property({
|
|
66003
|
+
onSet: function (val, target) {
|
|
66004
|
+
target.fireCallback(target.renderModeChangedCallback);
|
|
66005
|
+
target.updatePanelView();
|
|
66006
|
+
}
|
|
66007
|
+
})
|
|
66008
|
+
], QuestionPanelDynamicModel.prototype, "displayMode", void 0);
|
|
66009
|
+
question_paneldynamic_decorate([
|
|
66010
|
+
jsonobject_property({
|
|
66011
|
+
onSet: function (val, target) {
|
|
66012
|
+
target.fireCallback(target.currentIndexChangedCallback);
|
|
66013
|
+
}
|
|
66014
|
+
})
|
|
66015
|
+
], QuestionPanelDynamicModel.prototype, "showProgressBar", void 0);
|
|
66016
|
+
question_paneldynamic_decorate([
|
|
66017
|
+
jsonobject_property({
|
|
66018
|
+
onSet: function (val, target) {
|
|
66019
|
+
// target.updatePanelView();
|
|
66020
|
+
}
|
|
66021
|
+
})
|
|
66022
|
+
], QuestionPanelDynamicModel.prototype, "progressBarLocation", void 0);
|
|
65911
66023
|
question_paneldynamic_decorate([
|
|
65912
66024
|
jsonobject_property({ defaultValue: false, onSet: function (_, target) { target.updateFooterActions(); } })
|
|
65913
66025
|
], QuestionPanelDynamicModel.prototype, "legacyNavigation", void 0);
|
|
@@ -65924,8 +66036,14 @@ Serializer.addClass("paneldynamic", [
|
|
|
65924
66036
|
isLightSerializable: false
|
|
65925
66037
|
},
|
|
65926
66038
|
{ name: "templateTitle:text", serializationProperty: "locTemplateTitle" },
|
|
65927
|
-
{
|
|
65928
|
-
|
|
66039
|
+
{
|
|
66040
|
+
name: "templateTabTitle", serializationProperty: "locTemplateTabTitle",
|
|
66041
|
+
visibleIf: function (obj) { return obj.displayMode === "tab"; }
|
|
66042
|
+
},
|
|
66043
|
+
{
|
|
66044
|
+
name: "tabTitlePlaceholder", serializationProperty: "locTabTitlePlaceholder",
|
|
66045
|
+
visibleIf: function (obj) { return obj.displayMode === "tab"; }
|
|
66046
|
+
},
|
|
65929
66047
|
{
|
|
65930
66048
|
name: "templateDescription:text",
|
|
65931
66049
|
serializationProperty: "locTemplateDescription",
|
|
@@ -65952,7 +66070,7 @@ Serializer.addClass("paneldynamic", [
|
|
|
65952
66070
|
name: "panelsState",
|
|
65953
66071
|
default: "default",
|
|
65954
66072
|
choices: ["default", "collapsed", "expanded", "firstExpanded"],
|
|
65955
|
-
visibleIf: function (obj) { return obj.
|
|
66073
|
+
visibleIf: function (obj) { return obj.displayMode === "list"; }
|
|
65956
66074
|
},
|
|
65957
66075
|
{ name: "keyName" },
|
|
65958
66076
|
{
|
|
@@ -65978,12 +66096,12 @@ Serializer.addClass("paneldynamic", [
|
|
|
65978
66096
|
{
|
|
65979
66097
|
name: "panelPrevText",
|
|
65980
66098
|
serializationProperty: "locPanelPrevText",
|
|
65981
|
-
visibleIf: function (obj) { return obj.
|
|
66099
|
+
visibleIf: function (obj) { return obj.displayMode !== "list"; }
|
|
65982
66100
|
},
|
|
65983
66101
|
{
|
|
65984
66102
|
name: "panelNextText",
|
|
65985
66103
|
serializationProperty: "locPanelNextText",
|
|
65986
|
-
visibleIf: function (obj) { return obj.
|
|
66104
|
+
visibleIf: function (obj) { return obj.displayMode !== "list"; }
|
|
65987
66105
|
},
|
|
65988
66106
|
{
|
|
65989
66107
|
name: "showQuestionNumbers",
|
|
@@ -65993,16 +66111,30 @@ Serializer.addClass("paneldynamic", [
|
|
|
65993
66111
|
{
|
|
65994
66112
|
name: "showRangeInProgress:boolean",
|
|
65995
66113
|
default: true,
|
|
65996
|
-
|
|
66114
|
+
visible: false
|
|
66115
|
+
// visibleIf: (obj: any) => { return obj.displayMode !== "list"; }
|
|
65997
66116
|
},
|
|
65998
66117
|
{
|
|
65999
66118
|
name: "renderMode",
|
|
66000
66119
|
default: "list",
|
|
66001
66120
|
choices: ["list", "progressTop", "progressBottom", "progressTopBottom", "tab"],
|
|
66121
|
+
visible: false,
|
|
66122
|
+
},
|
|
66123
|
+
{ name: "displayMode", default: "list", choices: ["list", "carousel", "tab"] },
|
|
66124
|
+
{
|
|
66125
|
+
name: "showProgressBar:boolean",
|
|
66126
|
+
default: true,
|
|
66127
|
+
visibleIf: function (obj) { return obj.displayMode === "carousel"; }
|
|
66128
|
+
},
|
|
66129
|
+
{
|
|
66130
|
+
name: "progressBarLocation",
|
|
66131
|
+
default: "top",
|
|
66132
|
+
choices: ["top", "bottom", "topBottom"],
|
|
66133
|
+
visibleIf: function (obj) { return obj.showProgressBar; }
|
|
66002
66134
|
},
|
|
66003
66135
|
{
|
|
66004
66136
|
name: "tabAlign", default: "center", choices: ["left", "center", "right"],
|
|
66005
|
-
visibleIf: function (obj) { return obj.
|
|
66137
|
+
visibleIf: function (obj) { return obj.displayMode === "tab"; }
|
|
66006
66138
|
},
|
|
66007
66139
|
{
|
|
66008
66140
|
name: "templateTitleLocation",
|
|
@@ -68894,8 +69026,8 @@ Serializer.addClass("currencymask", [
|
|
|
68894
69026
|
|
|
68895
69027
|
var Version;
|
|
68896
69028
|
var ReleaseDate;
|
|
68897
|
-
Version = "" + "1.11.
|
|
68898
|
-
ReleaseDate = "" + "2024-08-
|
|
69029
|
+
Version = "" + "1.11.13";
|
|
69030
|
+
ReleaseDate = "" + "2024-08-27";
|
|
68899
69031
|
function checkLibraryVersion(ver, libraryName) {
|
|
68900
69032
|
if (Version != ver) {
|
|
68901
69033
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|