survey-core 1.11.12 → 1.11.14
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 +209 -210
- package/defaultV2.css.map +1 -1
- package/defaultV2.fontless.css +209 -210
- 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 +3 -3
- package/i18n/english.js.map +1 -1
- package/i18n/english.min.js +2 -2
- 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 +454 -219
- 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/actions/action.d.ts +1 -1
- package/ts3.4/typings/packages/survey-core/src/conditions.d.ts +4 -0
- package/ts3.4/typings/packages/survey-core/src/defaultCss/defaultV2Css.d.ts +1 -0
- package/ts3.4/typings/packages/survey-core/src/expressions/expressions.d.ts +11 -5
- package/ts3.4/typings/packages/survey-core/src/jsonobject.d.ts +1 -0
- package/ts3.4/typings/packages/survey-core/src/list.d.ts +1 -0
- package/ts3.4/typings/packages/survey-core/src/localization/english.d.ts +1 -0
- package/ts3.4/typings/packages/survey-core/src/martixBase.d.ts +11 -0
- package/ts3.4/typings/packages/survey-core/src/question.d.ts +6 -3
- package/ts3.4/typings/packages/survey-core/src/question_baseselect.d.ts +0 -3
- package/ts3.4/typings/packages/survey-core/src/question_checkbox.d.ts +2 -0
- package/ts3.4/typings/packages/survey-core/src/question_file.d.ts +1 -0
- package/ts3.4/typings/packages/survey-core/src/question_matrixdropdownbase.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 +61 -51
- package/ts3.4/typings/packages/survey-core/src/question_tagbox.d.ts +3 -0
- package/ts3.4/typings/packages/survey-core/src/question_text.d.ts +9 -0
- package/ts3.4/typings/packages/survey-core/src/settings.d.ts +1 -1
- package/ts3.4/typings/packages/survey-core/src/survey-events-api.d.ts +22 -12
- package/ts3.4/typings/packages/survey-core/src/survey.d.ts +11 -36
- package/ts3.4/typings/packages/survey-core/src/surveyStrings.d.ts +8 -0
- package/ts3.4/typings/packages/survey-core/src/utils/camera.d.ts +2 -2
- package/typings/packages/survey-core/src/actions/action.d.ts +1 -1
- package/typings/packages/survey-core/src/conditions.d.ts +4 -0
- package/typings/packages/survey-core/src/defaultCss/defaultV2Css.d.ts +1 -0
- package/typings/packages/survey-core/src/expressions/expressions.d.ts +11 -5
- package/typings/packages/survey-core/src/jsonobject.d.ts +1 -0
- package/typings/packages/survey-core/src/list.d.ts +1 -0
- package/typings/packages/survey-core/src/localization/english.d.ts +1 -0
- package/typings/packages/survey-core/src/martixBase.d.ts +12 -0
- package/typings/packages/survey-core/src/question.d.ts +7 -3
- package/typings/packages/survey-core/src/question_baseselect.d.ts +0 -3
- package/typings/packages/survey-core/src/question_checkbox.d.ts +2 -0
- package/typings/packages/survey-core/src/question_file.d.ts +1 -0
- package/typings/packages/survey-core/src/question_matrixdropdownbase.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 +60 -50
- package/typings/packages/survey-core/src/question_tagbox.d.ts +3 -0
- package/typings/packages/survey-core/src/question_text.d.ts +9 -0
- package/typings/packages/survey-core/src/settings.d.ts +1 -1
- package/typings/packages/survey-core/src/survey-events-api.d.ts +22 -12
- package/typings/packages/survey-core/src/survey.d.ts +11 -36
- package/typings/packages/survey-core/src/surveyStrings.d.ts +8 -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.14
|
|
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
|
*/
|
|
@@ -1829,6 +1829,7 @@ var englishStrings = {
|
|
|
1829
1829
|
refuseItemText: "Refuse to answer",
|
|
1830
1830
|
dontKnowItemText: "Don't know",
|
|
1831
1831
|
selectAllItemText: "Select All",
|
|
1832
|
+
deselectAllItemText: "Deselect all",
|
|
1832
1833
|
progressText: "Page {0} of {1}",
|
|
1833
1834
|
indexText: "{0} of {1}",
|
|
1834
1835
|
panelDynamicProgressText: "{0} of {1}",
|
|
@@ -1927,8 +1928,7 @@ var englishStrings = {
|
|
|
1927
1928
|
// Uncomment the lines below if you create a custom dictionary.
|
|
1928
1929
|
// Replace "en" with a custom locale code (for example, "fr" or "de"),
|
|
1929
1930
|
// Replace `englishStrings` with the name of the variable that contains the custom dictionary.
|
|
1930
|
-
//
|
|
1931
|
-
// surveyLocalization.localeNames["en"] = "English";
|
|
1931
|
+
//surveyLocalization.setupLocale("en", englishStrings, "English", "English");
|
|
1932
1932
|
|
|
1933
1933
|
// CONCATENATED MODULE: ./packages/survey-core/src/surveyStrings.ts
|
|
1934
1934
|
|
|
@@ -1937,8 +1937,21 @@ var surveyLocalization = {
|
|
|
1937
1937
|
defaultLocaleValue: "en",
|
|
1938
1938
|
locales: {},
|
|
1939
1939
|
localeNames: {},
|
|
1940
|
+
localeNamesInEnglish: {},
|
|
1940
1941
|
localeDirections: {},
|
|
1941
1942
|
supportedLocales: [],
|
|
1943
|
+
useEnglishNames: false,
|
|
1944
|
+
//TODO remove on next week
|
|
1945
|
+
get showNamesInEnglish() { return this.useEnglishNames; },
|
|
1946
|
+
set showNamesInEnglish(val) { this.useEnglishNames = val; },
|
|
1947
|
+
setupLocale: function (loc, strings, name, nameInEngish, direction) {
|
|
1948
|
+
this.locales[loc] = strings;
|
|
1949
|
+
this.localeNames[loc] = name;
|
|
1950
|
+
this.localeNamesInEnglish[loc] = nameInEngish;
|
|
1951
|
+
if (direction !== undefined) {
|
|
1952
|
+
this.localeDirections[loc] = direction;
|
|
1953
|
+
}
|
|
1954
|
+
},
|
|
1942
1955
|
get currentLocale() {
|
|
1943
1956
|
return this.currentLocaleValue === this.defaultLocaleValue ? "" : this.currentLocaleValue;
|
|
1944
1957
|
},
|
|
@@ -1990,7 +2003,17 @@ var surveyLocalization = {
|
|
|
1990
2003
|
}
|
|
1991
2004
|
return this.onGetExternalString(strName, locale);
|
|
1992
2005
|
},
|
|
2006
|
+
getLocaleName: function (loc, inEnglish) {
|
|
2007
|
+
if (!loc)
|
|
2008
|
+
return "";
|
|
2009
|
+
if (inEnglish === undefined)
|
|
2010
|
+
inEnglish = this.showNamesInEnglish;
|
|
2011
|
+
var firstNames = inEnglish ? this.localeNamesInEnglish : this.localeNames;
|
|
2012
|
+
var secondNames = inEnglish ? this.localeNames : this.localeNamesInEnglish;
|
|
2013
|
+
return firstNames[loc] || secondNames[loc] || loc;
|
|
2014
|
+
},
|
|
1993
2015
|
getLocales: function (removeDefaultLoc) {
|
|
2016
|
+
var _this = this;
|
|
1994
2017
|
if (removeDefaultLoc === void 0) { removeDefaultLoc = false; }
|
|
1995
2018
|
var res = [];
|
|
1996
2019
|
res.push("");
|
|
@@ -2007,12 +2030,7 @@ var surveyLocalization = {
|
|
|
2007
2030
|
res.push(key);
|
|
2008
2031
|
}
|
|
2009
2032
|
var locName = function (loc) {
|
|
2010
|
-
|
|
2011
|
-
return "";
|
|
2012
|
-
var res = surveyLocalization.localeNames[loc];
|
|
2013
|
-
if (!res)
|
|
2014
|
-
res = loc;
|
|
2015
|
-
return res.toLowerCase();
|
|
2033
|
+
return _this.getLocaleName(loc).toLowerCase();
|
|
2016
2034
|
};
|
|
2017
2035
|
res.sort(function (a, b) {
|
|
2018
2036
|
var str1 = locName(a);
|
|
@@ -3247,13 +3265,27 @@ var JsonMetadata = /** @class */ (function () {
|
|
|
3247
3265
|
invalidNames = [];
|
|
3248
3266
|
for (var i_1 = 0; i_1 < dynamicProps.length; i_1++) {
|
|
3249
3267
|
var dProp = dynamicProps[i_1];
|
|
3250
|
-
if (
|
|
3268
|
+
if (invalidNames.indexOf(dProp.name) < 0 && this.canAddDybamicProp(dProp, hash[dProp.name])) {
|
|
3251
3269
|
res.push(dProp);
|
|
3252
3270
|
}
|
|
3253
3271
|
}
|
|
3254
3272
|
this.dynamicPropsCache[cacheType] = res;
|
|
3255
3273
|
return res;
|
|
3256
3274
|
};
|
|
3275
|
+
JsonMetadata.prototype.canAddDybamicProp = function (dProp, orgProp) {
|
|
3276
|
+
if (!orgProp)
|
|
3277
|
+
return true;
|
|
3278
|
+
if (dProp === orgProp)
|
|
3279
|
+
return false;
|
|
3280
|
+
var classInfo = dProp.classInfo;
|
|
3281
|
+
while (classInfo && classInfo.parentName) {
|
|
3282
|
+
dProp = this.findProperty(classInfo.parentName, dProp.name);
|
|
3283
|
+
if (dProp && dProp === orgProp)
|
|
3284
|
+
return true;
|
|
3285
|
+
classInfo = !!dProp ? dProp.classInfo : undefined;
|
|
3286
|
+
}
|
|
3287
|
+
return false;
|
|
3288
|
+
};
|
|
3257
3289
|
JsonMetadata.prototype.hasOriginalProperty = function (obj, propName) {
|
|
3258
3290
|
return !!this.getOriginalProperty(obj, propName);
|
|
3259
3291
|
};
|
|
@@ -4718,16 +4750,16 @@ function dateFromFirstParameterOrToday(params) {
|
|
|
4718
4750
|
}
|
|
4719
4751
|
return date;
|
|
4720
4752
|
}
|
|
4721
|
-
function
|
|
4753
|
+
function functionsfactory_year(params) {
|
|
4722
4754
|
var date = dateFromFirstParameterOrToday(params);
|
|
4723
4755
|
return date.getFullYear();
|
|
4724
4756
|
}
|
|
4725
|
-
functionsfactory_FunctionFactory.Instance.register("year",
|
|
4726
|
-
function
|
|
4757
|
+
functionsfactory_FunctionFactory.Instance.register("year", functionsfactory_year);
|
|
4758
|
+
function functionsfactory_month(params) {
|
|
4727
4759
|
var date = dateFromFirstParameterOrToday(params);
|
|
4728
4760
|
return date.getMonth() + 1;
|
|
4729
4761
|
}
|
|
4730
|
-
functionsfactory_FunctionFactory.Instance.register("month",
|
|
4762
|
+
functionsfactory_FunctionFactory.Instance.register("month", functionsfactory_month);
|
|
4731
4763
|
function day(params) {
|
|
4732
4764
|
var date = dateFromFirstParameterOrToday(params);
|
|
4733
4765
|
return date.getDate();
|
|
@@ -4741,6 +4773,13 @@ functionsfactory_FunctionFactory.Instance.register("weekday", weekday);
|
|
|
4741
4773
|
function getQuestionValueByContext(context, name) {
|
|
4742
4774
|
if (!context || !name)
|
|
4743
4775
|
return undefined;
|
|
4776
|
+
var q = context.question;
|
|
4777
|
+
while (q && q.parent) {
|
|
4778
|
+
var res = q.parent.getQuestionByName(name);
|
|
4779
|
+
if (!!res)
|
|
4780
|
+
return res;
|
|
4781
|
+
q = q.parentQuestion;
|
|
4782
|
+
}
|
|
4744
4783
|
var keys = ["row", "panel", "survey"];
|
|
4745
4784
|
for (var i = 0; i < keys.length; i++) {
|
|
4746
4785
|
var ctx = context[keys[i]];
|
|
@@ -4752,15 +4791,31 @@ function getQuestionValueByContext(context, name) {
|
|
|
4752
4791
|
}
|
|
4753
4792
|
return null;
|
|
4754
4793
|
}
|
|
4794
|
+
function getDisplayValueReturnResult(q, params) {
|
|
4795
|
+
if (params.length > 1 && !helpers_Helpers.isValueEmpty(params[1]))
|
|
4796
|
+
return q.getDisplayValue(true, params[1]);
|
|
4797
|
+
return q.displayValue;
|
|
4798
|
+
}
|
|
4755
4799
|
function displayValue(params) {
|
|
4800
|
+
var _this = this;
|
|
4756
4801
|
var q = getQuestionValueByContext(this, params[0]);
|
|
4757
4802
|
if (!q)
|
|
4758
4803
|
return "";
|
|
4759
|
-
if (
|
|
4760
|
-
|
|
4761
|
-
|
|
4804
|
+
if (q.isReady) {
|
|
4805
|
+
this.returnResult(getDisplayValueReturnResult(q, params));
|
|
4806
|
+
}
|
|
4807
|
+
else {
|
|
4808
|
+
var displayValueOnReadyChanged_1 = function (sender, options) {
|
|
4809
|
+
if (sender.isReady) {
|
|
4810
|
+
sender.onReadyChanged.remove(displayValueOnReadyChanged_1);
|
|
4811
|
+
_this.returnResult(getDisplayValueReturnResult(sender, params));
|
|
4812
|
+
}
|
|
4813
|
+
};
|
|
4814
|
+
q.onReadyChanged.add(displayValueOnReadyChanged_1);
|
|
4815
|
+
}
|
|
4816
|
+
return undefined;
|
|
4762
4817
|
}
|
|
4763
|
-
functionsfactory_FunctionFactory.Instance.register("displayValue", displayValue);
|
|
4818
|
+
functionsfactory_FunctionFactory.Instance.register("displayValue", displayValue, true);
|
|
4764
4819
|
function propertyValue(params) {
|
|
4765
4820
|
if (params.length !== 2 || !params[0] || !params[1])
|
|
4766
4821
|
return undefined;
|
|
@@ -5267,11 +5322,27 @@ var expressions_FunctionOperand = /** @class */ (function (_super) {
|
|
|
5267
5322
|
return true;
|
|
5268
5323
|
};
|
|
5269
5324
|
FunctionOperand.prototype.hasAsyncFunction = function () {
|
|
5325
|
+
return this.isAsyncFunction() || this.parameters.hasAsyncFunction();
|
|
5326
|
+
};
|
|
5327
|
+
FunctionOperand.prototype.isAsyncFunction = function () {
|
|
5270
5328
|
return functionsfactory_FunctionFactory.Instance.isAsyncFunction(this.originalValue);
|
|
5271
5329
|
};
|
|
5272
5330
|
FunctionOperand.prototype.addToAsyncList = function (list) {
|
|
5273
|
-
|
|
5274
|
-
|
|
5331
|
+
var item = undefined;
|
|
5332
|
+
if (this.isAsyncFunction()) {
|
|
5333
|
+
item = { operand: this };
|
|
5334
|
+
}
|
|
5335
|
+
if (this.parameters.hasAsyncFunction()) {
|
|
5336
|
+
var children = new Array();
|
|
5337
|
+
this.parameters.addToAsyncList(children);
|
|
5338
|
+
children.forEach(function (child) { return child.parent = item; });
|
|
5339
|
+
if (!item) {
|
|
5340
|
+
item = {};
|
|
5341
|
+
}
|
|
5342
|
+
item.children = children;
|
|
5343
|
+
}
|
|
5344
|
+
if (item) {
|
|
5345
|
+
list.push(item);
|
|
5275
5346
|
}
|
|
5276
5347
|
};
|
|
5277
5348
|
FunctionOperand.prototype.isContentEqual = function (op) {
|
|
@@ -8630,7 +8701,6 @@ var conditions_ExpressionExecutor = /** @class */ (function () {
|
|
|
8630
8701
|
return !!this.operand;
|
|
8631
8702
|
};
|
|
8632
8703
|
ExpressionExecutor.prototype.run = function (values, properties) {
|
|
8633
|
-
var _this = this;
|
|
8634
8704
|
if (properties === void 0) { properties = null; }
|
|
8635
8705
|
if (!this.operand) {
|
|
8636
8706
|
if (!!this.expression) {
|
|
@@ -8642,25 +8712,57 @@ var conditions_ExpressionExecutor = /** @class */ (function () {
|
|
|
8642
8712
|
this.processValue.properties = properties;
|
|
8643
8713
|
if (!this.isAsync)
|
|
8644
8714
|
return this.runValues();
|
|
8645
|
-
this.asyncFuncList =
|
|
8715
|
+
this.asyncFuncList = new Array();
|
|
8646
8716
|
this.operand.addToAsyncList(this.asyncFuncList);
|
|
8647
8717
|
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);
|
|
8718
|
+
this.runAsyncItem(this.asyncFuncList[i]);
|
|
8654
8719
|
}
|
|
8655
8720
|
return false;
|
|
8656
8721
|
};
|
|
8657
|
-
ExpressionExecutor.prototype.
|
|
8722
|
+
ExpressionExecutor.prototype.runAsyncItem = function (item) {
|
|
8723
|
+
var _this = this;
|
|
8724
|
+
if (item.children) {
|
|
8725
|
+
item.children.forEach(function (child) { return _this.runAsyncItem(child); });
|
|
8726
|
+
}
|
|
8727
|
+
else {
|
|
8728
|
+
this.runAsyncItemCore(item);
|
|
8729
|
+
}
|
|
8730
|
+
};
|
|
8731
|
+
ExpressionExecutor.prototype.runAsyncItemCore = function (item) {
|
|
8732
|
+
var _this = this;
|
|
8733
|
+
if (item.operand) {
|
|
8734
|
+
item.operand.onAsyncReady = function () { return _this.doAsyncFunctionReady(item); };
|
|
8735
|
+
item.operand.evaluateAsync(this.processValue);
|
|
8736
|
+
}
|
|
8737
|
+
else {
|
|
8738
|
+
this.doAsyncFunctionReady(item);
|
|
8739
|
+
}
|
|
8740
|
+
};
|
|
8741
|
+
ExpressionExecutor.prototype.doAsyncFunctionReady = function (item) {
|
|
8742
|
+
if (item.parent && this.isAsyncChildrenReady(item)) {
|
|
8743
|
+
this.runAsyncItemCore(item.parent);
|
|
8744
|
+
return;
|
|
8745
|
+
}
|
|
8658
8746
|
for (var i = 0; i < this.asyncFuncList.length; i++) {
|
|
8659
|
-
if (!this.asyncFuncList[i]
|
|
8747
|
+
if (!this.isAsyncFuncReady(this.asyncFuncList[i]))
|
|
8660
8748
|
return;
|
|
8661
8749
|
}
|
|
8662
8750
|
this.runValues();
|
|
8663
8751
|
};
|
|
8752
|
+
ExpressionExecutor.prototype.isAsyncFuncReady = function (item) {
|
|
8753
|
+
if (item.operand && !item.operand.isReady)
|
|
8754
|
+
return false;
|
|
8755
|
+
return this.isAsyncChildrenReady(item);
|
|
8756
|
+
};
|
|
8757
|
+
ExpressionExecutor.prototype.isAsyncChildrenReady = function (item) {
|
|
8758
|
+
if (item.children) {
|
|
8759
|
+
for (var i = 0; i < item.children.length; i++) {
|
|
8760
|
+
if (!this.isAsyncFuncReady(item.children[i]))
|
|
8761
|
+
return false;
|
|
8762
|
+
}
|
|
8763
|
+
}
|
|
8764
|
+
return true;
|
|
8765
|
+
};
|
|
8664
8766
|
ExpressionExecutor.prototype.runValues = function () {
|
|
8665
8767
|
var res = this.operand.evaluate(this.processValue);
|
|
8666
8768
|
if (!!this.onComplete) {
|
|
@@ -11016,6 +11118,9 @@ var list_ListModel = /** @class */ (function (_super) {
|
|
|
11016
11118
|
list_decorate([
|
|
11017
11119
|
jsonobject_property({ defaultValue: false })
|
|
11018
11120
|
], ListModel.prototype, "textWrapEnabled", void 0);
|
|
11121
|
+
list_decorate([
|
|
11122
|
+
jsonobject_property({ defaultValue: "sv-list-item-content" })
|
|
11123
|
+
], ListModel.prototype, "itemComponent", void 0);
|
|
11019
11124
|
return ListModel;
|
|
11020
11125
|
}(container_ActionContainer));
|
|
11021
11126
|
|
|
@@ -11648,7 +11753,7 @@ var action_Action = /** @class */ (function (_super) {
|
|
|
11648
11753
|
evt.stopPropagation();
|
|
11649
11754
|
return true;
|
|
11650
11755
|
};
|
|
11651
|
-
Action.prototype.doMouseDown = function () {
|
|
11756
|
+
Action.prototype.doMouseDown = function (args) {
|
|
11652
11757
|
this.isMouseDown = true;
|
|
11653
11758
|
};
|
|
11654
11759
|
Action.prototype.doFocus = function (args) {
|
|
@@ -15582,7 +15687,7 @@ var settings = {
|
|
|
15582
15687
|
* Nested properties:
|
|
15583
15688
|
*
|
|
15584
15689
|
* - `lifetime`: `number`\
|
|
15585
|
-
* Specifies a time period during which a notification is displayed; measured in milliseconds.
|
|
15690
|
+
* Specifies a time period during which a notification is displayed; measured in milliseconds. Default value: 2000.
|
|
15586
15691
|
*/
|
|
15587
15692
|
notifications: {
|
|
15588
15693
|
lifetime: 2000
|
|
@@ -17149,7 +17254,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
17149
17254
|
_this.registerFunctionOnPropertiesValueChanged(["no", "readOnly", "hasVisibleErrors", "containsErrors"], function () {
|
|
17150
17255
|
_this.updateQuestionCss();
|
|
17151
17256
|
});
|
|
17152
|
-
_this.registerPropertyChangedHandlers(["
|
|
17257
|
+
_this.registerPropertyChangedHandlers(["_isMobile"], function () { _this.onMobileChanged(); });
|
|
17153
17258
|
_this.registerPropertyChangedHandlers(["colSpan"], function () { var _a; (_a = _this.parent) === null || _a === void 0 ? void 0 : _a.updateColumns(); });
|
|
17154
17259
|
return _this;
|
|
17155
17260
|
}
|
|
@@ -17166,8 +17271,22 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
17166
17271
|
this.setIsMobile(this.survey._isMobile);
|
|
17167
17272
|
};
|
|
17168
17273
|
Question.prototype.setIsMobile = function (val) {
|
|
17169
|
-
|
|
17274
|
+
var newVal = val && (this.allowMobileInDesignMode() || !this.isDesignMode);
|
|
17275
|
+
this.isMobile = newVal;
|
|
17276
|
+
};
|
|
17277
|
+
Question.prototype.getIsMobile = function () {
|
|
17278
|
+
return this._isMobile;
|
|
17170
17279
|
};
|
|
17280
|
+
Object.defineProperty(Question.prototype, "isMobile", {
|
|
17281
|
+
get: function () {
|
|
17282
|
+
return this.getIsMobile();
|
|
17283
|
+
},
|
|
17284
|
+
set: function (val) {
|
|
17285
|
+
this._isMobile = val;
|
|
17286
|
+
},
|
|
17287
|
+
enumerable: false,
|
|
17288
|
+
configurable: true
|
|
17289
|
+
});
|
|
17171
17290
|
Question.prototype.themeChanged = function (theme) { };
|
|
17172
17291
|
Question.prototype.getDefaultTitle = function () { return this.name; };
|
|
17173
17292
|
Question.prototype.createLocTitleProperty = function () {
|
|
@@ -18363,6 +18482,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
18363
18482
|
Question.prototype.getRootCss = function () {
|
|
18364
18483
|
return new CssClassBuilder()
|
|
18365
18484
|
.append(this.cssRoot)
|
|
18485
|
+
.append(this.cssClasses.mobile, this.isMobile)
|
|
18366
18486
|
.append(this.cssClasses.readOnly, this.isReadOnlyStyle)
|
|
18367
18487
|
.append(this.cssClasses.disabled, this.isDisabledStyle)
|
|
18368
18488
|
.append(this.cssClasses.preview, this.isPreviewStyle)
|
|
@@ -19533,7 +19653,8 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
19533
19653
|
Object.defineProperty(Question.prototype, "validators", {
|
|
19534
19654
|
/**
|
|
19535
19655
|
* Question validators.
|
|
19536
|
-
*
|
|
19656
|
+
*
|
|
19657
|
+
* [Data Validation](https://surveyjs.io/form-library/documentation/data-validation (linkStyle))
|
|
19537
19658
|
*/
|
|
19538
19659
|
get: function () {
|
|
19539
19660
|
return this.getPropertyValue("validators");
|
|
@@ -20306,7 +20427,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
20306
20427
|
Question.questionCounter = 100;
|
|
20307
20428
|
question_decorate([
|
|
20308
20429
|
jsonobject_property({ defaultValue: false })
|
|
20309
|
-
], Question.prototype, "
|
|
20430
|
+
], Question.prototype, "_isMobile", void 0);
|
|
20310
20431
|
question_decorate([
|
|
20311
20432
|
jsonobject_property()
|
|
20312
20433
|
], Question.prototype, "forceIsInputReadOnly", void 0);
|
|
@@ -22518,6 +22639,25 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
22518
22639
|
enumerable: false,
|
|
22519
22640
|
configurable: true
|
|
22520
22641
|
});
|
|
22642
|
+
Object.defineProperty(QuestionMatrixBaseModel.prototype, "displayMode", {
|
|
22643
|
+
get: function () {
|
|
22644
|
+
return this.getPropertyValue("displayMode");
|
|
22645
|
+
},
|
|
22646
|
+
/**
|
|
22647
|
+
* Specifies how to arrange matrix questions.
|
|
22648
|
+
*
|
|
22649
|
+
* Possible values:
|
|
22650
|
+
*
|
|
22651
|
+
* - `"table"` - Displays matrix questions in a table.
|
|
22652
|
+
* - `"list"` - Displays matrix questions one under another as a list.
|
|
22653
|
+
* - `"auto"` (default) - Uses the `"table"` mode if the survey has sufficient width to fit the table or the `"list"` mode otherwise.
|
|
22654
|
+
*/
|
|
22655
|
+
set: function (val) {
|
|
22656
|
+
this.setPropertyValue("displayMode", val);
|
|
22657
|
+
},
|
|
22658
|
+
enumerable: false,
|
|
22659
|
+
configurable: true
|
|
22660
|
+
});
|
|
22521
22661
|
//a11y
|
|
22522
22662
|
QuestionMatrixBaseModel.prototype.getCellAriaLabel = function (rowTitle, columnTitle) {
|
|
22523
22663
|
var row = (this.getLocalizationString("matrix_row") || "row").toLocaleLowerCase();
|
|
@@ -22531,6 +22671,12 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
22531
22671
|
enumerable: false,
|
|
22532
22672
|
configurable: true
|
|
22533
22673
|
});
|
|
22674
|
+
// EO a11y
|
|
22675
|
+
QuestionMatrixBaseModel.prototype.getIsMobile = function () {
|
|
22676
|
+
if (this.displayMode == "auto")
|
|
22677
|
+
return _super.prototype.getIsMobile.call(this);
|
|
22678
|
+
return this.displayMode === "list";
|
|
22679
|
+
};
|
|
22534
22680
|
martixBase_decorate([
|
|
22535
22681
|
jsonobject_property()
|
|
22536
22682
|
], QuestionMatrixBaseModel.prototype, "verticalAlign", void 0);
|
|
@@ -22551,7 +22697,13 @@ Serializer.addClass("matrixbase", [
|
|
|
22551
22697
|
choices: ["top", "middle"],
|
|
22552
22698
|
default: "middle",
|
|
22553
22699
|
},
|
|
22554
|
-
{ name: "alternateRows:boolean", default: false }
|
|
22700
|
+
{ name: "alternateRows:boolean", default: false },
|
|
22701
|
+
{
|
|
22702
|
+
name: "displayMode",
|
|
22703
|
+
default: "auto",
|
|
22704
|
+
choices: ["auto", "table", "list"],
|
|
22705
|
+
visible: false
|
|
22706
|
+
},
|
|
22555
22707
|
], undefined, "question");
|
|
22556
22708
|
|
|
22557
22709
|
// CONCATENATED MODULE: ./packages/survey-core/src/textPreProcessor.ts
|
|
@@ -25854,6 +26006,14 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedCell = /** @cl
|
|
|
25854
26006
|
enumerable: false,
|
|
25855
26007
|
configurable: true
|
|
25856
26008
|
});
|
|
26009
|
+
Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "isVisible", {
|
|
26010
|
+
get: function () {
|
|
26011
|
+
var _a;
|
|
26012
|
+
return (!this.hasQuestion && !this.isErrorsCell) || !((_a = this.matrix) === null || _a === void 0 ? void 0 : _a.isMobile) || this.question.isVisible;
|
|
26013
|
+
},
|
|
26014
|
+
enumerable: false,
|
|
26015
|
+
configurable: true
|
|
26016
|
+
});
|
|
25857
26017
|
Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "showResponsiveTitle", {
|
|
25858
26018
|
get: function () {
|
|
25859
26019
|
var _a;
|
|
@@ -26899,9 +27059,6 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable = /** @c
|
|
|
26899
27059
|
QuestionMatrixDropdownRenderedTable.prototype.createTextCell = function (locTitle) {
|
|
26900
27060
|
var cell = new question_matrixdropdownrendered_QuestionMatrixDropdownRenderedCell();
|
|
26901
27061
|
cell.locTitle = locTitle;
|
|
26902
|
-
if (!!locTitle) {
|
|
26903
|
-
locTitle.strChanged();
|
|
26904
|
-
}
|
|
26905
27062
|
if (!!this.cssClasses.cell) {
|
|
26906
27063
|
cell.className = this.cssClasses.cell;
|
|
26907
27064
|
}
|
|
@@ -27850,12 +28007,10 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
|
27850
28007
|
"rowCount",
|
|
27851
28008
|
"hasFooter",
|
|
27852
28009
|
"detailPanelMode",
|
|
28010
|
+
"displayMode"
|
|
27853
28011
|
], function () {
|
|
27854
28012
|
_this.resetRenderedTable();
|
|
27855
28013
|
});
|
|
27856
|
-
_this.registerPropertyChangedHandlers(["isMobile"], function () {
|
|
27857
|
-
_this.resetRenderedTable();
|
|
27858
|
-
});
|
|
27859
28014
|
return _this;
|
|
27860
28015
|
}
|
|
27861
28016
|
Object.defineProperty(QuestionMatrixDropdownModelBase, "defaultCellType", {
|
|
@@ -29619,6 +29774,10 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
|
29619
29774
|
enumerable: false,
|
|
29620
29775
|
configurable: true
|
|
29621
29776
|
});
|
|
29777
|
+
QuestionMatrixDropdownModelBase.prototype.onMobileChanged = function () {
|
|
29778
|
+
_super.prototype.onMobileChanged.call(this);
|
|
29779
|
+
this.resetRenderedTable();
|
|
29780
|
+
};
|
|
29622
29781
|
QuestionMatrixDropdownModelBase.prototype.getRootCss = function () {
|
|
29623
29782
|
return new CssClassBuilder().append(_super.prototype.getRootCss.call(this)).append(this.cssClasses.rootScroll, this.horizontalScroll).toString();
|
|
29624
29783
|
};
|
|
@@ -32030,6 +32189,7 @@ var defaultV2Css = {
|
|
|
32030
32189
|
question: {
|
|
32031
32190
|
contentFadeIn: "sd-element__content--fade-in",
|
|
32032
32191
|
contentFadeOut: "sd-element__content--fade-out",
|
|
32192
|
+
mobile: "sd-question--mobile",
|
|
32033
32193
|
fadeIn: "sd-element-wrapper--fade-in",
|
|
32034
32194
|
fadeOut: "sd-element-wrapper--fade-out",
|
|
32035
32195
|
mainRoot: "sd-element sd-question sd-row__question",
|
|
@@ -38389,14 +38549,6 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
38389
38549
|
_this._isMobile = false;
|
|
38390
38550
|
_this._isCompact = false;
|
|
38391
38551
|
_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
38552
|
/**
|
|
38401
38553
|
* Specifies whether respondents can switch the current page even if it contains validation errors.
|
|
38402
38554
|
*
|
|
@@ -38414,6 +38566,10 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
38414
38566
|
_this.isNavigationButtonPressed = false;
|
|
38415
38567
|
_this.mouseDownPage = null;
|
|
38416
38568
|
_this.isCalculatingProgressText = false;
|
|
38569
|
+
/**
|
|
38570
|
+
* An event that is raised when the survey's width or height is changed.
|
|
38571
|
+
*/
|
|
38572
|
+
_this.onResize = new EventBase();
|
|
38417
38573
|
_this.isCurrentPageRendering = true;
|
|
38418
38574
|
_this.isCurrentPageRendered = undefined;
|
|
38419
38575
|
_this.isTriggerIsRunning = false;
|
|
@@ -43083,7 +43239,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
43083
43239
|
isProcessed_1 = false;
|
|
43084
43240
|
}
|
|
43085
43241
|
else {
|
|
43086
|
-
isProcessed_1 = _this.processResponsiveness(observedElement.offsetWidth, mobileWidth_1);
|
|
43242
|
+
isProcessed_1 = _this.processResponsiveness(observedElement.offsetWidth, mobileWidth_1, observedElement.offsetHeight);
|
|
43087
43243
|
}
|
|
43088
43244
|
});
|
|
43089
43245
|
});
|
|
@@ -43097,13 +43253,16 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
43097
43253
|
this.rootElement = htmlElement;
|
|
43098
43254
|
this.addScrollEventListener();
|
|
43099
43255
|
};
|
|
43100
|
-
SurveyModel.prototype.processResponsiveness = function (width, mobileWidth) {
|
|
43256
|
+
SurveyModel.prototype.processResponsiveness = function (width, mobileWidth, height) {
|
|
43101
43257
|
var isMobile = width < mobileWidth;
|
|
43102
43258
|
var isMobileChanged = this.isMobile !== isMobile;
|
|
43103
|
-
|
|
43104
|
-
this.setIsMobile(isMobile);
|
|
43105
|
-
}
|
|
43259
|
+
this.setIsMobile(isMobile);
|
|
43106
43260
|
this.layoutElements.forEach(function (layoutElement) { return layoutElement.processResponsiveness && layoutElement.processResponsiveness(width); });
|
|
43261
|
+
var options = {
|
|
43262
|
+
height: height,
|
|
43263
|
+
width: width,
|
|
43264
|
+
};
|
|
43265
|
+
this.onResize.fire(this, options);
|
|
43107
43266
|
return isMobileChanged;
|
|
43108
43267
|
};
|
|
43109
43268
|
SurveyModel.prototype.triggerResponsiveness = function (hard) {
|
|
@@ -43512,36 +43671,6 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
43512
43671
|
this.uploadFilesCore(name, files, callback);
|
|
43513
43672
|
}
|
|
43514
43673
|
};
|
|
43515
|
-
/**
|
|
43516
|
-
* Downloads a file from a server.
|
|
43517
|
-
*
|
|
43518
|
-
* The following code shows how to call this method:
|
|
43519
|
-
*
|
|
43520
|
-
* ```js
|
|
43521
|
-
* const question = survey.getQuestionByName("myFileQuestion");
|
|
43522
|
-
* survey.downloadFile(
|
|
43523
|
-
* question,
|
|
43524
|
-
* question.name,
|
|
43525
|
-
* // Download the first uploaded file
|
|
43526
|
-
* question.value[0],
|
|
43527
|
-
* (status, data) => {
|
|
43528
|
-
* if (status === "success") {
|
|
43529
|
-
* // Use `data` to retrieve the file
|
|
43530
|
-
* }
|
|
43531
|
-
* if (status === "error") {
|
|
43532
|
-
* // Handle error
|
|
43533
|
-
* }
|
|
43534
|
-
* }
|
|
43535
|
-
* );
|
|
43536
|
-
* ```
|
|
43537
|
-
*
|
|
43538
|
-
* @param question A [File Upload question instance](https://surveyjs.io/form-library/documentation/api-reference/file-model).
|
|
43539
|
-
* @param questionName The File Upload question's [`name`](https://surveyjs.io/form-library/documentation/api-reference/file-model#name).
|
|
43540
|
-
* @param fileValue An object from File Upload's [`value`](https://surveyjs.io/form-library/documentation/api-reference/file-model#value) array. This object contains metadata about the file you want to download.
|
|
43541
|
-
* @param callback A callback function that allows you to get the download status (`"success"` or `"error"`) and the file identifier (URL, file name, etc.) that you can use to retrieve the file.
|
|
43542
|
-
* @see onDownloadFile
|
|
43543
|
-
* @see uploadFiles
|
|
43544
|
-
*/
|
|
43545
43674
|
SurveyModel.prototype.downloadFile = function (question, questionName, fileValue, callback) {
|
|
43546
43675
|
if (this.onDownloadFile.isEmpty) {
|
|
43547
43676
|
!!callback && callback("skipped", fileValue.content || fileValue);
|
|
@@ -45327,6 +45456,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
45327
45456
|
* A survey width in CSS values.
|
|
45328
45457
|
*
|
|
45329
45458
|
* Default value: `undefined` (the survey inherits the width from its container)
|
|
45459
|
+
* @see onResize
|
|
45330
45460
|
*/
|
|
45331
45461
|
get: function () {
|
|
45332
45462
|
return this.getPropertyValue("width");
|
|
@@ -46116,6 +46246,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
46116
46246
|
survey_decorate([
|
|
46117
46247
|
jsonobject_property()
|
|
46118
46248
|
], SurveyModel.prototype, "progressBarInheritWidthFrom", void 0);
|
|
46249
|
+
survey_decorate([
|
|
46250
|
+
jsonobject_property({ defaultValue: true })
|
|
46251
|
+
], SurveyModel.prototype, "validationEnabled", void 0);
|
|
46119
46252
|
survey_decorate([
|
|
46120
46253
|
jsonobject_property()
|
|
46121
46254
|
], SurveyModel.prototype, "rootCss", void 0);
|
|
@@ -47115,6 +47248,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
47115
47248
|
QuestionSelectBase.prototype.clearValue = function (keepComment) {
|
|
47116
47249
|
_super.prototype.clearValue.call(this, keepComment);
|
|
47117
47250
|
this.prevOtherValue = undefined;
|
|
47251
|
+
this.selectedItemValues = undefined;
|
|
47118
47252
|
};
|
|
47119
47253
|
QuestionSelectBase.prototype.updateCommentFromSurvey = function (newValue) {
|
|
47120
47254
|
_super.prototype.updateCommentFromSurvey.call(this, newValue);
|
|
@@ -52788,8 +52922,11 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
|
|
|
52788
52922
|
}
|
|
52789
52923
|
if (this.inputType === "month") {
|
|
52790
52924
|
var d = new Date(newValue);
|
|
52791
|
-
var
|
|
52792
|
-
|
|
52925
|
+
var isUtc = d.toISOString().indexOf(newValue) == 0 && newValue.indexOf("T") == -1;
|
|
52926
|
+
var month = isUtc ? d.getUTCMonth() : d.getMonth();
|
|
52927
|
+
var year = isUtc ? d.getUTCFullYear() : d.getFullYear();
|
|
52928
|
+
var m = month + 1;
|
|
52929
|
+
return year + "-" + (m < 10 ? "0" : "") + m;
|
|
52793
52930
|
}
|
|
52794
52931
|
return newValue;
|
|
52795
52932
|
};
|
|
@@ -53025,7 +53162,7 @@ Serializer.addClass("text", [
|
|
|
53025
53162
|
return isMinMaxType(obj);
|
|
53026
53163
|
},
|
|
53027
53164
|
},
|
|
53028
|
-
{ name: "inputTextAlignment", default: "auto", choices: ["left", "right", "auto"]
|
|
53165
|
+
{ name: "inputTextAlignment", default: "auto", choices: ["left", "right", "auto"] },
|
|
53029
53166
|
{
|
|
53030
53167
|
name: "maskType",
|
|
53031
53168
|
default: "none",
|
|
@@ -53516,6 +53653,15 @@ var question_multipletext_MultipleTextItemModel = /** @class */ (function (_supe
|
|
|
53516
53653
|
configurable: true
|
|
53517
53654
|
});
|
|
53518
53655
|
Object.defineProperty(MultipleTextItemModel.prototype, "inputTextAlignment", {
|
|
53656
|
+
/**
|
|
53657
|
+
* Specifies text alignment within the input field.
|
|
53658
|
+
*
|
|
53659
|
+
* Possible values:
|
|
53660
|
+
*
|
|
53661
|
+
* - `"left"` - Aligns input text to the left side.
|
|
53662
|
+
* - `"right"` - Aligns input text to the right side.
|
|
53663
|
+
* - `"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.
|
|
53664
|
+
*/
|
|
53519
53665
|
get: function () {
|
|
53520
53666
|
return this.editor.inputTextAlignment;
|
|
53521
53667
|
},
|
|
@@ -54261,7 +54407,7 @@ Serializer.addClass("multipletextitem", [
|
|
|
54261
54407
|
obj.maskSettings.setData(value);
|
|
54262
54408
|
},
|
|
54263
54409
|
},
|
|
54264
|
-
{ name: "inputTextAlignment", default: "auto", choices: ["left", "right", "auto"]
|
|
54410
|
+
{ name: "inputTextAlignment", default: "auto", choices: ["left", "right", "auto"] },
|
|
54265
54411
|
{ name: "title", serializationProperty: "locTitle" },
|
|
54266
54412
|
{ name: "maxLength:number", default: -1 },
|
|
54267
54413
|
{ name: "size:number", minValue: 0 },
|
|
@@ -54680,9 +54826,9 @@ var question_checkbox_QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
|
54680
54826
|
_this.isChangingValueOnClearIncorrect = false;
|
|
54681
54827
|
_this.selectAllItemValue = new itemvalue_ItemValue("");
|
|
54682
54828
|
_this.selectAllItemValue.id = "selectall";
|
|
54683
|
-
|
|
54829
|
+
_this.selectAllItemText = _this.createLocalizableString("selectAllText", _this.selectAllItem, true, "selectAllItemText");
|
|
54684
54830
|
_this.selectAllItem.locOwner = _this;
|
|
54685
|
-
_this.selectAllItem.setLocText(selectAllItemText);
|
|
54831
|
+
_this.selectAllItem.setLocText(_this.selectAllItemText);
|
|
54686
54832
|
_this.registerPropertyChangedHandlers(["showSelectAllItem", "selectAllText"], function () {
|
|
54687
54833
|
_this.onVisibleChoicesChanged();
|
|
54688
54834
|
});
|
|
@@ -54789,28 +54935,7 @@ var question_checkbox_QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
|
54789
54935
|
* @see showSelectAllItem
|
|
54790
54936
|
*/
|
|
54791
54937
|
get: function () {
|
|
54792
|
-
|
|
54793
|
-
for (var i = 0; i < noneItems.length; i++) {
|
|
54794
|
-
if (this.isItemSelected(noneItems[i]))
|
|
54795
|
-
return false;
|
|
54796
|
-
}
|
|
54797
|
-
var items = this.getVisibleEnableItems();
|
|
54798
|
-
if (items.length === 0)
|
|
54799
|
-
return false;
|
|
54800
|
-
var val = this.value;
|
|
54801
|
-
if (!val || !Array.isArray(val) || val.length === 0)
|
|
54802
|
-
return false;
|
|
54803
|
-
if (val.length < items.length)
|
|
54804
|
-
return false;
|
|
54805
|
-
var rVal = [];
|
|
54806
|
-
for (var i = 0; i < val.length; i++) {
|
|
54807
|
-
rVal.push(this.getRealValue(val[i]));
|
|
54808
|
-
}
|
|
54809
|
-
for (var i = 0; i < items.length; i++) {
|
|
54810
|
-
if (rVal.indexOf(items[i].value) < 0)
|
|
54811
|
-
return false;
|
|
54812
|
-
}
|
|
54813
|
-
return true;
|
|
54938
|
+
return this.allElementsSelected();
|
|
54814
54939
|
},
|
|
54815
54940
|
set: function (val) {
|
|
54816
54941
|
if (val) {
|
|
@@ -54826,6 +54951,30 @@ var question_checkbox_QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
|
54826
54951
|
QuestionCheckboxModel.prototype.toggleSelectAll = function () {
|
|
54827
54952
|
this.isAllSelected = !this.isAllSelected;
|
|
54828
54953
|
};
|
|
54954
|
+
QuestionCheckboxModel.prototype.allElementsSelected = function () {
|
|
54955
|
+
var noneItems = this.getNoneItems();
|
|
54956
|
+
for (var i = 0; i < noneItems.length; i++) {
|
|
54957
|
+
if (this.isItemSelected(noneItems[i]))
|
|
54958
|
+
return false;
|
|
54959
|
+
}
|
|
54960
|
+
var items = this.getVisibleEnableItems();
|
|
54961
|
+
if (items.length === 0)
|
|
54962
|
+
return false;
|
|
54963
|
+
var val = this.value;
|
|
54964
|
+
if (!val || !Array.isArray(val) || val.length === 0)
|
|
54965
|
+
return false;
|
|
54966
|
+
if (val.length < items.length)
|
|
54967
|
+
return false;
|
|
54968
|
+
var rVal = [];
|
|
54969
|
+
for (var i = 0; i < val.length; i++) {
|
|
54970
|
+
rVal.push(this.getRealValue(val[i]));
|
|
54971
|
+
}
|
|
54972
|
+
for (var i = 0; i < items.length; i++) {
|
|
54973
|
+
if (rVal.indexOf(items[i].value) < 0)
|
|
54974
|
+
return false;
|
|
54975
|
+
}
|
|
54976
|
+
return true;
|
|
54977
|
+
};
|
|
54829
54978
|
/**
|
|
54830
54979
|
* Selects all choice items, except "Other" and "None".
|
|
54831
54980
|
*
|
|
@@ -55689,6 +55838,9 @@ var dropdownMultiSelectListModel_DropdownMultiSelectListModel = /** @class */ (f
|
|
|
55689
55838
|
};
|
|
55690
55839
|
DropdownMultiSelectListModel.prototype.selectAllItems = function () {
|
|
55691
55840
|
this.question.toggleSelectAll();
|
|
55841
|
+
if (this.question.isAllSelected && this.question.hideSelectedItems) {
|
|
55842
|
+
this.popupModel.hide();
|
|
55843
|
+
}
|
|
55692
55844
|
this.updateListState();
|
|
55693
55845
|
};
|
|
55694
55846
|
DropdownMultiSelectListModel.prototype.selectNoneItem = function () {
|
|
@@ -55819,6 +55971,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
|
|
|
55819
55971
|
_this.createLocalizableString("placeholder", _this, false, true);
|
|
55820
55972
|
_this.createLocalizableString("clearCaption", _this, false, true);
|
|
55821
55973
|
_this.createLocalizableString("readOnlyText", _this, true);
|
|
55974
|
+
_this.deselectAllItemText = _this.createLocalizableString("deselectAllText", _this.selectAllItem, true, "deselectAllItemText");
|
|
55822
55975
|
_this.registerPropertyChangedHandlers(["value", "renderAs", "showOtherItem", "otherText", "placeholder", "choices", "visibleChoices"], function () {
|
|
55823
55976
|
_this.updateReadOnlyText();
|
|
55824
55977
|
});
|
|
@@ -56008,6 +56161,14 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
|
|
|
56008
56161
|
(_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onFocus(event);
|
|
56009
56162
|
_super.prototype.onFocusCore.call(this, event);
|
|
56010
56163
|
};
|
|
56164
|
+
QuestionTagboxModel.prototype.allElementsSelected = function () {
|
|
56165
|
+
var result = _super.prototype.allElementsSelected.call(this);
|
|
56166
|
+
this.updateSelectAllItemText(result);
|
|
56167
|
+
return result;
|
|
56168
|
+
};
|
|
56169
|
+
QuestionTagboxModel.prototype.updateSelectAllItemText = function (isAllSelected) {
|
|
56170
|
+
this.selectAllItem.setLocText(isAllSelected ? this.deselectAllItemText : this.selectAllItemText);
|
|
56171
|
+
};
|
|
56011
56172
|
QuestionTagboxModel.prototype.dispose = function () {
|
|
56012
56173
|
_super.prototype.dispose.call(this);
|
|
56013
56174
|
if (!!this.dropdownListModel) {
|
|
@@ -57580,7 +57741,6 @@ questionfactory_QuestionFactory.Instance.registerQuestion("comment", function (n
|
|
|
57580
57741
|
|
|
57581
57742
|
// CONCATENATED MODULE: ./packages/survey-core/src/utils/camera.ts
|
|
57582
57743
|
|
|
57583
|
-
|
|
57584
57744
|
var camera_Camera = /** @class */ (function () {
|
|
57585
57745
|
function Camera() {
|
|
57586
57746
|
this.canFlipValue = undefined;
|
|
@@ -57683,27 +57843,25 @@ var camera_Camera = /** @class */ (function () {
|
|
|
57683
57843
|
audio: false
|
|
57684
57844
|
};
|
|
57685
57845
|
};
|
|
57686
|
-
Camera.prototype.startVideo = function (
|
|
57846
|
+
Camera.prototype.startVideo = function (videoElement, callback, imageWidth, imageHeight) {
|
|
57687
57847
|
var _this = this;
|
|
57688
|
-
|
|
57689
|
-
var videoEl = (_a = settings.environment.root) === null || _a === void 0 ? void 0 : _a.getElementById(videoElementId);
|
|
57690
|
-
if (!videoEl) {
|
|
57848
|
+
if (!videoElement) {
|
|
57691
57849
|
callback(undefined);
|
|
57692
57850
|
return;
|
|
57693
57851
|
}
|
|
57694
|
-
|
|
57695
|
-
|
|
57696
|
-
|
|
57697
|
-
|
|
57852
|
+
videoElement.style.width = "100%";
|
|
57853
|
+
videoElement.style.height = "auto";
|
|
57854
|
+
videoElement.style.height = "100%";
|
|
57855
|
+
videoElement.style.objectFit = "contain";
|
|
57698
57856
|
var mediaConstraints = this.getMediaConstraints({ width: imageWidth, height: imageHeight });
|
|
57699
57857
|
navigator.mediaDevices.getUserMedia(mediaConstraints).then(function (stream) {
|
|
57700
57858
|
var _a;
|
|
57701
|
-
|
|
57859
|
+
videoElement.srcObject = stream;
|
|
57702
57860
|
if (!((_a = Camera.cameraList[Camera.cameraIndex]) === null || _a === void 0 ? void 0 : _a.deviceId) && !!stream.getTracks()[0].getCapabilities().facingMode) {
|
|
57703
57861
|
Camera.canSwitchFacingMode = true;
|
|
57704
57862
|
_this.updateCanFlipValue();
|
|
57705
57863
|
}
|
|
57706
|
-
|
|
57864
|
+
videoElement.play();
|
|
57707
57865
|
callback(stream);
|
|
57708
57866
|
})
|
|
57709
57867
|
.catch(function (error) {
|
|
@@ -57713,15 +57871,14 @@ var camera_Camera = /** @class */ (function () {
|
|
|
57713
57871
|
Camera.prototype.getImageSize = function (videoEl) {
|
|
57714
57872
|
return { width: videoEl.videoWidth, height: videoEl.videoHeight };
|
|
57715
57873
|
};
|
|
57716
|
-
Camera.prototype.snap = function (
|
|
57874
|
+
Camera.prototype.snap = function (videoElement, callback) {
|
|
57875
|
+
if (!videoElement)
|
|
57876
|
+
return false;
|
|
57717
57877
|
if (!DomDocumentHelper.isAvailable())
|
|
57718
57878
|
return false;
|
|
57719
57879
|
var root = DomDocumentHelper.getDocument();
|
|
57720
|
-
var videoEl = root === null || root === void 0 ? void 0 : root.getElementById(videoElementId);
|
|
57721
|
-
if (!videoEl)
|
|
57722
|
-
return false;
|
|
57723
57880
|
var canvasEl = root.createElement("canvas");
|
|
57724
|
-
var imageSize = this.getImageSize(
|
|
57881
|
+
var imageSize = this.getImageSize(videoElement);
|
|
57725
57882
|
canvasEl.height = imageSize.height;
|
|
57726
57883
|
canvasEl.width = imageSize.width;
|
|
57727
57884
|
var context = canvasEl.getContext("2d");
|
|
@@ -57732,7 +57889,7 @@ var camera_Camera = /** @class */ (function () {
|
|
|
57732
57889
|
}
|
|
57733
57890
|
*/
|
|
57734
57891
|
context.clearRect(0, 0, canvasEl.width, canvasEl.height);
|
|
57735
|
-
context.drawImage(
|
|
57892
|
+
context.drawImage(videoElement, 0, 0, canvasEl.width, canvasEl.height);
|
|
57736
57893
|
canvasEl.toBlob(callback, "image/png");
|
|
57737
57894
|
return true;
|
|
57738
57895
|
};
|
|
@@ -58195,9 +58352,17 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
|
|
|
58195
58352
|
_this.startVideoInCamera();
|
|
58196
58353
|
}, 0);
|
|
58197
58354
|
};
|
|
58355
|
+
Object.defineProperty(QuestionFileModel.prototype, "videoHtmlElement", {
|
|
58356
|
+
get: function () {
|
|
58357
|
+
var _a;
|
|
58358
|
+
return (_a = this.rootElement) === null || _a === void 0 ? void 0 : _a.querySelector("#" + this.videoId);
|
|
58359
|
+
},
|
|
58360
|
+
enumerable: false,
|
|
58361
|
+
configurable: true
|
|
58362
|
+
});
|
|
58198
58363
|
QuestionFileModel.prototype.startVideoInCamera = function () {
|
|
58199
58364
|
var _this = this;
|
|
58200
|
-
this.camera.startVideo(this.
|
|
58365
|
+
this.camera.startVideo(this.videoHtmlElement, function (stream) {
|
|
58201
58366
|
_this.videoStream = stream;
|
|
58202
58367
|
if (!stream) {
|
|
58203
58368
|
_this.stopVideo();
|
|
@@ -58218,7 +58383,7 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
|
|
|
58218
58383
|
_this.loadFiles([file]);
|
|
58219
58384
|
}
|
|
58220
58385
|
};
|
|
58221
|
-
this.camera.snap(this.
|
|
58386
|
+
this.camera.snap(this.videoHtmlElement, blobCallback);
|
|
58222
58387
|
this.stopVideo();
|
|
58223
58388
|
};
|
|
58224
58389
|
QuestionFileModel.prototype.canFlipCamera = function () {
|
|
@@ -59707,12 +59872,14 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
59707
59872
|
return;
|
|
59708
59873
|
if (QuestionRatingModel.colorsCalculated)
|
|
59709
59874
|
return;
|
|
59875
|
+
function getColorFromProperty(varName) {
|
|
59876
|
+
var style = getComputedStyle(DomDocumentHelper.getDocumentElement());
|
|
59877
|
+
return style.getPropertyValue && style.getPropertyValue(varName);
|
|
59878
|
+
}
|
|
59710
59879
|
function getRGBColor(colorName, varName) {
|
|
59711
59880
|
var str = !!themeVariables && themeVariables[colorName];
|
|
59712
|
-
if (!str)
|
|
59713
|
-
|
|
59714
|
-
str = style.getPropertyValue && style.getPropertyValue(varName);
|
|
59715
|
-
}
|
|
59881
|
+
if (!str)
|
|
59882
|
+
str = getColorFromProperty(varName);
|
|
59716
59883
|
if (!str)
|
|
59717
59884
|
return null;
|
|
59718
59885
|
var canvasElement = DomDocumentHelper.createElement("canvas");
|
|
@@ -59720,6 +59887,9 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
59720
59887
|
return null;
|
|
59721
59888
|
var ctx = canvasElement.getContext("2d");
|
|
59722
59889
|
ctx.fillStyle = str;
|
|
59890
|
+
if (ctx.fillStyle == "#000000") {
|
|
59891
|
+
ctx.fillStyle = getColorFromProperty(varName);
|
|
59892
|
+
}
|
|
59723
59893
|
var newStr = ctx.fillStyle;
|
|
59724
59894
|
if (newStr.startsWith("rgba")) {
|
|
59725
59895
|
return newStr.substring(5, newStr.length - 1).split(",").map(function (c) { return +(c.trim()); });
|
|
@@ -59989,7 +60159,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
59989
60159
|
QuestionRatingModel.prototype.setValueFromClick = function (value) {
|
|
59990
60160
|
if (this.isReadOnlyAttr)
|
|
59991
60161
|
return;
|
|
59992
|
-
if (this.value === parseFloat(value)) {
|
|
60162
|
+
if (this.value === ((typeof (this.value) === "string") ? value : parseFloat(value))) {
|
|
59993
60163
|
this.clearValue(true);
|
|
59994
60164
|
}
|
|
59995
60165
|
else {
|
|
@@ -62603,7 +62773,7 @@ var question_signaturepad_QuestionSignaturePadModel = /** @class */ (function (_
|
|
|
62603
62773
|
};
|
|
62604
62774
|
};
|
|
62605
62775
|
QuestionSignaturePadModel.prototype.refreshCanvas = function () {
|
|
62606
|
-
if (!this.canvas)
|
|
62776
|
+
if (!this.signaturePad || !this.canvas)
|
|
62607
62777
|
return;
|
|
62608
62778
|
if (!this.value) {
|
|
62609
62779
|
this.canvas.getContext("2d").clearRect(0, 0, this.canvas.width * this.scale, this.canvas.height * this.scale);
|
|
@@ -63333,7 +63503,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
63333
63503
|
_this.registerPropertyChangedHandlers(["panelsState"], function () {
|
|
63334
63504
|
_this.setPanelsState();
|
|
63335
63505
|
});
|
|
63336
|
-
_this.registerPropertyChangedHandlers(["
|
|
63506
|
+
_this.registerPropertyChangedHandlers(["newPanelPosition", "displayMode", "showProgressBar"], function () {
|
|
63337
63507
|
_this.updateFooterActions();
|
|
63338
63508
|
});
|
|
63339
63509
|
_this.registerPropertyChangedHandlers(["allowAddPanel"], function () { _this.updateNoEntriesTextDefaultLoc(); });
|
|
@@ -63489,7 +63659,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
63489
63659
|
});
|
|
63490
63660
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "templateTabTitle", {
|
|
63491
63661
|
/**
|
|
63492
|
-
* A template for tab titles. Applies when [`
|
|
63662
|
+
* A template for tab titles. Applies when [`displayMode`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#displayMode) is `"tab"`.
|
|
63493
63663
|
*
|
|
63494
63664
|
* The template can contain the following placeholders:
|
|
63495
63665
|
*
|
|
@@ -63501,7 +63671,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
63501
63671
|
* [View Demo](https://surveyjs.io/form-library/examples/tabbed-interface-for-duplicate-group-option/ (linkStyle))
|
|
63502
63672
|
* @see templateTitle
|
|
63503
63673
|
* @see tabTitlePlaceholder
|
|
63504
|
-
* @see
|
|
63674
|
+
* @see displayMode
|
|
63505
63675
|
*/
|
|
63506
63676
|
get: function () {
|
|
63507
63677
|
return this.locTemplateTabTitle.text;
|
|
@@ -63681,11 +63851,11 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
63681
63851
|
/**
|
|
63682
63852
|
* A zero-based index of the currently displayed panel.
|
|
63683
63853
|
*
|
|
63684
|
-
* When `
|
|
63854
|
+
* When `displayMode` is `"list"` or Dynamic Panel is empty (`panelCount` is 0), this property contains -1.
|
|
63685
63855
|
* @see currentPanel
|
|
63686
63856
|
* @see panels
|
|
63687
63857
|
* @see panelCount
|
|
63688
|
-
* @see
|
|
63858
|
+
* @see displayMode
|
|
63689
63859
|
*/
|
|
63690
63860
|
get: function () {
|
|
63691
63861
|
if (this.isRenderModeList)
|
|
@@ -63708,11 +63878,11 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
63708
63878
|
/**
|
|
63709
63879
|
* A `PanelModel` object that is the currently displayed panel.
|
|
63710
63880
|
*
|
|
63711
|
-
* When `
|
|
63881
|
+
* When `displayMode` is `"list"` or Dynamic Panel is empty (`panelCount` is 0), this property contains `null`.
|
|
63712
63882
|
* @see currentIndex
|
|
63713
63883
|
* @see panels
|
|
63714
63884
|
* @see panelCount
|
|
63715
|
-
* @see
|
|
63885
|
+
* @see displayMode
|
|
63716
63886
|
*/
|
|
63717
63887
|
get: function () {
|
|
63718
63888
|
if (this.isDesignMode)
|
|
@@ -63962,8 +64132,8 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
63962
64132
|
});
|
|
63963
64133
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "panelPrevText", {
|
|
63964
64134
|
/**
|
|
63965
|
-
* A caption for the Previous button. Applies only if `
|
|
63966
|
-
* @see
|
|
64135
|
+
* A caption for the Previous button. Applies only if `displayMode` is different from `"list"`.
|
|
64136
|
+
* @see displayMode
|
|
63967
64137
|
* @see isPrevButtonVisible
|
|
63968
64138
|
*/
|
|
63969
64139
|
get: function () {
|
|
@@ -63984,8 +64154,8 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
63984
64154
|
});
|
|
63985
64155
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "panelNextText", {
|
|
63986
64156
|
/**
|
|
63987
|
-
* A caption for the Next button. Applies only if `
|
|
63988
|
-
* @see
|
|
64157
|
+
* A caption for the Next button. Applies only if `displayMode` is different from `"list"`.
|
|
64158
|
+
* @see displayMode
|
|
63989
64159
|
* @see isNextButtonVisible
|
|
63990
64160
|
*/
|
|
63991
64161
|
get: function () {
|
|
@@ -64046,21 +64216,15 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
64046
64216
|
configurable: true
|
|
64047
64217
|
});
|
|
64048
64218
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "isProgressTopShowing", {
|
|
64049
|
-
/**
|
|
64050
|
-
* Returns true when the renderMode equals to "progressTop" or "progressTopBottom"
|
|
64051
|
-
*/
|
|
64052
64219
|
get: function () {
|
|
64053
|
-
return this.
|
|
64220
|
+
return this.displayMode == "carousel" && (this.progressBarLocation === "top" || this.progressBarLocation === "topBottom");
|
|
64054
64221
|
},
|
|
64055
64222
|
enumerable: false,
|
|
64056
64223
|
configurable: true
|
|
64057
64224
|
});
|
|
64058
64225
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "isProgressBottomShowing", {
|
|
64059
|
-
/**
|
|
64060
|
-
* Returns true when the renderMode equals to "progressBottom" or "progressTopBottom"
|
|
64061
|
-
*/
|
|
64062
64226
|
get: function () {
|
|
64063
|
-
return this.
|
|
64227
|
+
return this.displayMode == "carousel" && (this.progressBarLocation === "bottom" || this.progressBarLocation === "topBottom");
|
|
64064
64228
|
},
|
|
64065
64229
|
enumerable: false,
|
|
64066
64230
|
configurable: true
|
|
@@ -64100,9 +64264,6 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
64100
64264
|
configurable: true
|
|
64101
64265
|
});
|
|
64102
64266
|
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
64267
|
get: function () {
|
|
64107
64268
|
return (this.showRangeInProgress && this.currentIndex >= 0 && this.visiblePanelCount > 1);
|
|
64108
64269
|
},
|
|
@@ -64179,7 +64340,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
64179
64340
|
for (var i = this.panelCount; i < val; i++) {
|
|
64180
64341
|
var panel = this.createNewPanel();
|
|
64181
64342
|
this.panelsCore.push(panel);
|
|
64182
|
-
if (this.
|
|
64343
|
+
if (this.displayMode == "list" && this.panelsState != "default") {
|
|
64183
64344
|
if (this.panelsState === "expanded") {
|
|
64184
64345
|
panel.expand();
|
|
64185
64346
|
}
|
|
@@ -64215,7 +64376,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
64215
64376
|
});
|
|
64216
64377
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "panelsState", {
|
|
64217
64378
|
/**
|
|
64218
|
-
* Specifies whether users can expand and collapse panels. Applies if `
|
|
64379
|
+
* Specifies whether users can expand and collapse panels. Applies if `displayMode` is `"list"` and the `templateTitle` property is specified.
|
|
64219
64380
|
*
|
|
64220
64381
|
* Possible values:
|
|
64221
64382
|
*
|
|
@@ -64223,7 +64384,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
64223
64384
|
* - `"expanded"` - All panels are displayed in full and can be collapsed in the UI.
|
|
64224
64385
|
* - `"collapsed"` - All panels display only their titles and descriptions and can be expanded in the UI.
|
|
64225
64386
|
* - `"firstExpanded"` - Only the first panel is displayed in full; other panels are collapsed and can be expanded in the UI.
|
|
64226
|
-
* @see
|
|
64387
|
+
* @see displayMode
|
|
64227
64388
|
* @see templateTitle
|
|
64228
64389
|
*/
|
|
64229
64390
|
get: function () {
|
|
@@ -64249,7 +64410,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
64249
64410
|
}
|
|
64250
64411
|
};
|
|
64251
64412
|
QuestionPanelDynamicModel.prototype.setPanelsState = function () {
|
|
64252
|
-
if (this.useTemplatePanel || this.
|
|
64413
|
+
if (this.useTemplatePanel || this.displayMode != "list" || !this.templateTitle)
|
|
64253
64414
|
return;
|
|
64254
64415
|
for (var i = 0; i < this.panelsCore.length; i++) {
|
|
64255
64416
|
var state = this.panelsState;
|
|
@@ -64462,46 +64623,68 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
64462
64623
|
});
|
|
64463
64624
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "showRangeInProgress", {
|
|
64464
64625
|
/**
|
|
64465
|
-
*
|
|
64466
|
-
* @
|
|
64467
|
-
* @see renderMode
|
|
64626
|
+
* Obsolete. Use the [`showProgressBar`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#showProgressBar) property instead.
|
|
64627
|
+
* @deprecated
|
|
64468
64628
|
*/
|
|
64469
64629
|
get: function () {
|
|
64470
|
-
return this.
|
|
64630
|
+
return this.showProgressBar;
|
|
64631
|
+
// return this.getPropertyValue("showRangeInProgress");
|
|
64471
64632
|
},
|
|
64472
64633
|
set: function (val) {
|
|
64473
|
-
this.
|
|
64474
|
-
this.
|
|
64634
|
+
this.showProgressBar = val;
|
|
64635
|
+
// this.setPropertyValue("showRangeInProgress", val);
|
|
64475
64636
|
},
|
|
64476
64637
|
enumerable: false,
|
|
64477
64638
|
configurable: true
|
|
64478
64639
|
});
|
|
64479
64640
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "renderMode", {
|
|
64480
64641
|
/**
|
|
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/)
|
|
64642
|
+
* Obsolete. Use the [`displayMode`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#displayMode) property instead.
|
|
64643
|
+
* @deprecated
|
|
64490
64644
|
*/
|
|
64491
64645
|
get: function () {
|
|
64492
|
-
|
|
64646
|
+
var displayMode = this.displayMode;
|
|
64647
|
+
if (displayMode == "carousel") {
|
|
64648
|
+
var progressBarLocation = this.progressBarLocation;
|
|
64649
|
+
if (progressBarLocation == "top") {
|
|
64650
|
+
return "progressTop";
|
|
64651
|
+
}
|
|
64652
|
+
else if (progressBarLocation == "bottom") {
|
|
64653
|
+
return "progressBottom";
|
|
64654
|
+
}
|
|
64655
|
+
else if (progressBarLocation == "topBottom") {
|
|
64656
|
+
return "progressTopBottom";
|
|
64657
|
+
}
|
|
64658
|
+
}
|
|
64659
|
+
return displayMode;
|
|
64493
64660
|
},
|
|
64494
64661
|
set: function (val) {
|
|
64495
|
-
|
|
64496
|
-
|
|
64497
|
-
|
|
64498
|
-
|
|
64499
|
-
|
|
64500
|
-
|
|
64662
|
+
if ((val || "").startsWith("progress")) {
|
|
64663
|
+
if (val == "progressTop") {
|
|
64664
|
+
this.progressBarLocation = "top";
|
|
64665
|
+
}
|
|
64666
|
+
else if (val == "progressBottom") {
|
|
64667
|
+
this.progressBarLocation = "bottom";
|
|
64668
|
+
}
|
|
64669
|
+
else if (val == "progressTopBottom") {
|
|
64670
|
+
this.progressBarLocation = "topBottom";
|
|
64671
|
+
}
|
|
64672
|
+
this.displayMode = "carousel";
|
|
64673
|
+
}
|
|
64674
|
+
else {
|
|
64675
|
+
this.displayMode = val;
|
|
64676
|
+
}
|
|
64677
|
+
// this.updatePanelView();
|
|
64501
64678
|
},
|
|
64502
64679
|
enumerable: false,
|
|
64503
64680
|
configurable: true
|
|
64504
64681
|
});
|
|
64682
|
+
QuestionPanelDynamicModel.prototype.updatePanelView = function () {
|
|
64683
|
+
this.blockAnimations();
|
|
64684
|
+
this.updateRenderedPanels();
|
|
64685
|
+
this.releaseAnimations();
|
|
64686
|
+
this.updatePanelsAnimation();
|
|
64687
|
+
};
|
|
64505
64688
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "tabAlign", {
|
|
64506
64689
|
get: function () {
|
|
64507
64690
|
return this.getPropertyValue("tabAlign");
|
|
@@ -64517,14 +64700,14 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
64517
64700
|
});
|
|
64518
64701
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "isRenderModeList", {
|
|
64519
64702
|
get: function () {
|
|
64520
|
-
return this.
|
|
64703
|
+
return this.displayMode === "list";
|
|
64521
64704
|
},
|
|
64522
64705
|
enumerable: false,
|
|
64523
64706
|
configurable: true
|
|
64524
64707
|
});
|
|
64525
64708
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "isRenderModeTab", {
|
|
64526
64709
|
get: function () {
|
|
64527
|
-
return this.
|
|
64710
|
+
return this.displayMode === "tab";
|
|
64528
64711
|
},
|
|
64529
64712
|
enumerable: false,
|
|
64530
64713
|
configurable: true
|
|
@@ -64715,12 +64898,11 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
64715
64898
|
return true;
|
|
64716
64899
|
};
|
|
64717
64900
|
/**
|
|
64718
|
-
*
|
|
64719
|
-
*
|
|
64720
|
-
*
|
|
64901
|
+
* Adds a new panel based on the [template](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#template).
|
|
64902
|
+
*
|
|
64903
|
+
* Unlike the [`addPanel()`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#addPanel) method, `addPanelUI()` performs additional actions: checks whether a new panel [can be added](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#canAddPanel), expands and focuses the new panel, and runs animated effects.
|
|
64721
64904
|
* @see panelCount
|
|
64722
64905
|
* @see panels
|
|
64723
|
-
* @see canAddPanel
|
|
64724
64906
|
*/
|
|
64725
64907
|
QuestionPanelDynamicModel.prototype.addPanelUI = function () {
|
|
64726
64908
|
if (!this.canAddPanel)
|
|
@@ -64728,7 +64910,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
64728
64910
|
if (!this.canLeaveCurrentPanel())
|
|
64729
64911
|
return null;
|
|
64730
64912
|
var newPanel = this.addPanel();
|
|
64731
|
-
if (this.
|
|
64913
|
+
if (this.displayMode === "list" && this.panelsState !== "default") {
|
|
64732
64914
|
newPanel.expand();
|
|
64733
64915
|
}
|
|
64734
64916
|
this.focusNewPanelCallback = function () {
|
|
@@ -64747,7 +64929,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
64747
64929
|
};
|
|
64748
64930
|
/**
|
|
64749
64931
|
* 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 [`
|
|
64932
|
+
* @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
64933
|
* @see panelCount
|
|
64752
64934
|
* @see panels
|
|
64753
64935
|
* @see allowAddPanel
|
|
@@ -64796,7 +64978,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
64796
64978
|
}
|
|
64797
64979
|
};
|
|
64798
64980
|
QuestionPanelDynamicModel.prototype.canLeaveCurrentPanel = function () {
|
|
64799
|
-
return !(this.
|
|
64981
|
+
return !(this.displayMode !== "list" && this.currentPanel && this.currentPanel.hasErrors(true, true));
|
|
64800
64982
|
};
|
|
64801
64983
|
QuestionPanelDynamicModel.prototype.copyValue = function (dest, src) {
|
|
64802
64984
|
for (var key in src) {
|
|
@@ -64804,13 +64986,11 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
64804
64986
|
}
|
|
64805
64987
|
};
|
|
64806
64988
|
/**
|
|
64807
|
-
*
|
|
64808
|
-
* @param value a panel or panel index
|
|
64809
|
-
* @see removePanel
|
|
64810
|
-
* @see confirmDelete
|
|
64811
|
-
* @see confirmDeleteText
|
|
64812
|
-
* @see canRemovePanel
|
|
64989
|
+
* Deletes a panel from the [`panels`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#panels) array.
|
|
64813
64990
|
*
|
|
64991
|
+
* Unlike the [`removePanel()`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#removePanel) method, `removePanelUI()` performs additional actions: checks whether the panel [can be removed](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#canRemovePanel) and displays a confirmation dialog (if the [`confirmDelete`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#confirmDelete) property is enabled).
|
|
64992
|
+
* @param value A `PanelModel` instance or zero-based panel index.
|
|
64993
|
+
* @see addPanelUI
|
|
64814
64994
|
*/
|
|
64815
64995
|
QuestionPanelDynamicModel.prototype.removePanelUI = function (value) {
|
|
64816
64996
|
var _this = this;
|
|
@@ -64834,8 +65014,8 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
64834
65014
|
(this.isValueEmpty(this.defaultPanelValue) || !this.isTwoValueEquals(panelValue, this.defaultPanelValue));
|
|
64835
65015
|
};
|
|
64836
65016
|
/**
|
|
64837
|
-
* Switches Dynamic Panel to the next panel. Returns `true` in case of success, or `false` if `
|
|
64838
|
-
* @see
|
|
65017
|
+
* 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.
|
|
65018
|
+
* @see displayMode
|
|
64839
65019
|
*/
|
|
64840
65020
|
QuestionPanelDynamicModel.prototype.goToNextPanel = function () {
|
|
64841
65021
|
if (this.currentIndex < 0)
|
|
@@ -64853,6 +65033,11 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
64853
65033
|
return;
|
|
64854
65034
|
this.currentIndex--;
|
|
64855
65035
|
};
|
|
65036
|
+
/**
|
|
65037
|
+
* Deletes a panel from the [`panels`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#panels) array.
|
|
65038
|
+
* @param value A `PanelModel` instance or zero-based panel index.
|
|
65039
|
+
* @see addPanel
|
|
65040
|
+
*/
|
|
64856
65041
|
QuestionPanelDynamicModel.prototype.removePanel = function (value) {
|
|
64857
65042
|
var visIndex = this.getVisualPanelIndex(value);
|
|
64858
65043
|
if (visIndex < 0 || visIndex >= this.visiblePanelCount)
|
|
@@ -65307,11 +65492,12 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
65307
65492
|
for (var i = 0; i < panels.length; i++) {
|
|
65308
65493
|
this.setOnCompleteAsyncInPanel(panels[i]);
|
|
65309
65494
|
}
|
|
65310
|
-
|
|
65311
|
-
|
|
65312
|
-
pnlError =
|
|
65313
|
-
|
|
65314
|
-
|
|
65495
|
+
var focusOnError = !!rec && rec.focusOnFirstError;
|
|
65496
|
+
for (var i_1 = 0; i_1 < panels.length; i_1++) {
|
|
65497
|
+
var pnlError = panels[i_1].hasErrors(fireCallback, focusOnError, rec);
|
|
65498
|
+
pnlError = this.isValueDuplicated(panels[i_1], keyValues, rec, fireCallback) || pnlError;
|
|
65499
|
+
if (!this.isRenderModeList && pnlError && !res && focusOnError) {
|
|
65500
|
+
this.currentIndex = i_1;
|
|
65315
65501
|
}
|
|
65316
65502
|
res = pnlError || res;
|
|
65317
65503
|
}
|
|
@@ -65649,7 +65835,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
65649
65835
|
return new CssClassBuilder()
|
|
65650
65836
|
.append(this.cssClasses.button)
|
|
65651
65837
|
.append(this.cssClasses.buttonAdd)
|
|
65652
|
-
.append(this.cssClasses.buttonAdd + "--list-mode", this.
|
|
65838
|
+
.append(this.cssClasses.buttonAdd + "--list-mode", this.displayMode === "list")
|
|
65653
65839
|
.toString();
|
|
65654
65840
|
};
|
|
65655
65841
|
QuestionPanelDynamicModel.prototype.getPrevButtonCss = function () {
|
|
@@ -65904,10 +66090,36 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
65904
66090
|
}
|
|
65905
66091
|
return classes;
|
|
65906
66092
|
};
|
|
66093
|
+
QuestionPanelDynamicModel.prototype.onMobileChanged = function () {
|
|
66094
|
+
_super.prototype.onMobileChanged.call(this);
|
|
66095
|
+
this.updateFooterActions();
|
|
66096
|
+
};
|
|
65907
66097
|
QuestionPanelDynamicModel.maxCheckCount = 3;
|
|
65908
66098
|
question_paneldynamic_decorate([
|
|
65909
66099
|
propertyArray({})
|
|
65910
66100
|
], QuestionPanelDynamicModel.prototype, "_renderedPanels", void 0);
|
|
66101
|
+
question_paneldynamic_decorate([
|
|
66102
|
+
jsonobject_property({
|
|
66103
|
+
onSet: function (val, target) {
|
|
66104
|
+
target.fireCallback(target.renderModeChangedCallback);
|
|
66105
|
+
target.updatePanelView();
|
|
66106
|
+
}
|
|
66107
|
+
})
|
|
66108
|
+
], QuestionPanelDynamicModel.prototype, "displayMode", void 0);
|
|
66109
|
+
question_paneldynamic_decorate([
|
|
66110
|
+
jsonobject_property({
|
|
66111
|
+
onSet: function (val, target) {
|
|
66112
|
+
target.fireCallback(target.currentIndexChangedCallback);
|
|
66113
|
+
}
|
|
66114
|
+
})
|
|
66115
|
+
], QuestionPanelDynamicModel.prototype, "showProgressBar", void 0);
|
|
66116
|
+
question_paneldynamic_decorate([
|
|
66117
|
+
jsonobject_property({
|
|
66118
|
+
onSet: function (val, target) {
|
|
66119
|
+
// target.updatePanelView();
|
|
66120
|
+
}
|
|
66121
|
+
})
|
|
66122
|
+
], QuestionPanelDynamicModel.prototype, "progressBarLocation", void 0);
|
|
65911
66123
|
question_paneldynamic_decorate([
|
|
65912
66124
|
jsonobject_property({ defaultValue: false, onSet: function (_, target) { target.updateFooterActions(); } })
|
|
65913
66125
|
], QuestionPanelDynamicModel.prototype, "legacyNavigation", void 0);
|
|
@@ -65924,8 +66136,14 @@ Serializer.addClass("paneldynamic", [
|
|
|
65924
66136
|
isLightSerializable: false
|
|
65925
66137
|
},
|
|
65926
66138
|
{ name: "templateTitle:text", serializationProperty: "locTemplateTitle" },
|
|
65927
|
-
{
|
|
65928
|
-
|
|
66139
|
+
{
|
|
66140
|
+
name: "templateTabTitle", serializationProperty: "locTemplateTabTitle",
|
|
66141
|
+
visibleIf: function (obj) { return obj.displayMode === "tab"; }
|
|
66142
|
+
},
|
|
66143
|
+
{
|
|
66144
|
+
name: "tabTitlePlaceholder", serializationProperty: "locTabTitlePlaceholder",
|
|
66145
|
+
visibleIf: function (obj) { return obj.displayMode === "tab"; }
|
|
66146
|
+
},
|
|
65929
66147
|
{
|
|
65930
66148
|
name: "templateDescription:text",
|
|
65931
66149
|
serializationProperty: "locTemplateDescription",
|
|
@@ -65952,7 +66170,7 @@ Serializer.addClass("paneldynamic", [
|
|
|
65952
66170
|
name: "panelsState",
|
|
65953
66171
|
default: "default",
|
|
65954
66172
|
choices: ["default", "collapsed", "expanded", "firstExpanded"],
|
|
65955
|
-
visibleIf: function (obj) { return obj.
|
|
66173
|
+
visibleIf: function (obj) { return obj.displayMode === "list"; }
|
|
65956
66174
|
},
|
|
65957
66175
|
{ name: "keyName" },
|
|
65958
66176
|
{
|
|
@@ -65978,12 +66196,12 @@ Serializer.addClass("paneldynamic", [
|
|
|
65978
66196
|
{
|
|
65979
66197
|
name: "panelPrevText",
|
|
65980
66198
|
serializationProperty: "locPanelPrevText",
|
|
65981
|
-
visibleIf: function (obj) { return obj.
|
|
66199
|
+
visibleIf: function (obj) { return obj.displayMode !== "list"; }
|
|
65982
66200
|
},
|
|
65983
66201
|
{
|
|
65984
66202
|
name: "panelNextText",
|
|
65985
66203
|
serializationProperty: "locPanelNextText",
|
|
65986
|
-
visibleIf: function (obj) { return obj.
|
|
66204
|
+
visibleIf: function (obj) { return obj.displayMode !== "list"; }
|
|
65987
66205
|
},
|
|
65988
66206
|
{
|
|
65989
66207
|
name: "showQuestionNumbers",
|
|
@@ -65993,16 +66211,30 @@ Serializer.addClass("paneldynamic", [
|
|
|
65993
66211
|
{
|
|
65994
66212
|
name: "showRangeInProgress:boolean",
|
|
65995
66213
|
default: true,
|
|
65996
|
-
|
|
66214
|
+
visible: false
|
|
66215
|
+
// visibleIf: (obj: any) => { return obj.displayMode !== "list"; }
|
|
65997
66216
|
},
|
|
65998
66217
|
{
|
|
65999
66218
|
name: "renderMode",
|
|
66000
66219
|
default: "list",
|
|
66001
66220
|
choices: ["list", "progressTop", "progressBottom", "progressTopBottom", "tab"],
|
|
66221
|
+
visible: false,
|
|
66222
|
+
},
|
|
66223
|
+
{ name: "displayMode", default: "list", choices: ["list", "carousel", "tab"] },
|
|
66224
|
+
{
|
|
66225
|
+
name: "showProgressBar:boolean",
|
|
66226
|
+
default: true,
|
|
66227
|
+
visibleIf: function (obj) { return obj.displayMode === "carousel"; }
|
|
66228
|
+
},
|
|
66229
|
+
{
|
|
66230
|
+
name: "progressBarLocation",
|
|
66231
|
+
default: "top",
|
|
66232
|
+
choices: ["top", "bottom", "topBottom"],
|
|
66233
|
+
visibleIf: function (obj) { return obj.showProgressBar; }
|
|
66002
66234
|
},
|
|
66003
66235
|
{
|
|
66004
66236
|
name: "tabAlign", default: "center", choices: ["left", "center", "right"],
|
|
66005
|
-
visibleIf: function (obj) { return obj.
|
|
66237
|
+
visibleIf: function (obj) { return obj.displayMode === "tab"; }
|
|
66006
66238
|
},
|
|
66007
66239
|
{
|
|
66008
66240
|
name: "templateTitleLocation",
|
|
@@ -68271,6 +68503,9 @@ var mask_datetime_InputMaskDateTime = /** @class */ (function (_super) {
|
|
|
68271
68503
|
var _this = this;
|
|
68272
68504
|
var date = new Date(str);
|
|
68273
68505
|
this.initInputDateTimeData();
|
|
68506
|
+
if (!this.hasTimePart) {
|
|
68507
|
+
date = new Date(str + "T00:00:00");
|
|
68508
|
+
}
|
|
68274
68509
|
if (!this.hasDatePart) {
|
|
68275
68510
|
date = new Date(this.defaultDate + str);
|
|
68276
68511
|
}
|
|
@@ -68894,8 +69129,8 @@ Serializer.addClass("currencymask", [
|
|
|
68894
69129
|
|
|
68895
69130
|
var Version;
|
|
68896
69131
|
var ReleaseDate;
|
|
68897
|
-
Version = "" + "1.11.
|
|
68898
|
-
ReleaseDate = "" + "2024-
|
|
69132
|
+
Version = "" + "1.11.14";
|
|
69133
|
+
ReleaseDate = "" + "2024-09-04";
|
|
68899
69134
|
function checkLibraryVersion(ver, libraryName) {
|
|
68900
69135
|
if (Version != ver) {
|
|
68901
69136
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|