survey-core 1.10.3 → 1.10.5
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 +6 -1
- package/defaultV2.css.map +1 -1
- package/defaultV2.fontless.css +6 -1
- package/defaultV2.fontless.css.map +1 -1
- package/defaultV2.fontless.min.css +2 -2
- package/defaultV2.min.css +2 -2
- package/i18n/arabic.js +1 -1
- package/i18n/arabic.min.js +1 -1
- package/i18n/basque.js +1 -1
- package/i18n/basque.min.js +1 -1
- package/i18n/bulgarian.js +1 -1
- package/i18n/bulgarian.min.js +1 -1
- package/i18n/catalan.js +1 -1
- package/i18n/catalan.min.js +1 -1
- package/i18n/croatian.js +1 -1
- package/i18n/croatian.min.js +1 -1
- package/i18n/czech.js +1 -1
- package/i18n/czech.min.js +1 -1
- package/i18n/danish.js +1 -1
- package/i18n/danish.min.js +1 -1
- package/i18n/dutch.js +1 -1
- package/i18n/dutch.min.js +1 -1
- package/i18n/english.js +1 -1
- package/i18n/english.min.js +1 -1
- package/i18n/estonian.js +1 -1
- package/i18n/estonian.min.js +1 -1
- package/i18n/finnish.js +1 -1
- package/i18n/finnish.min.js +1 -1
- package/i18n/french.js +1 -1
- package/i18n/french.min.js +1 -1
- package/i18n/georgian.js +1 -1
- package/i18n/georgian.min.js +1 -1
- package/i18n/german.js +1 -1
- package/i18n/german.min.js +1 -1
- package/i18n/greek.js +1 -1
- package/i18n/greek.min.js +1 -1
- package/i18n/hebrew.js +1 -1
- package/i18n/hebrew.min.js +1 -1
- package/i18n/hindi.js +1 -1
- package/i18n/hindi.min.js +1 -1
- package/i18n/hungarian.js +1 -1
- package/i18n/hungarian.min.js +1 -1
- package/i18n/icelandic.js +1 -1
- package/i18n/icelandic.min.js +1 -1
- package/i18n/index.js +1 -1
- package/i18n/index.min.js +1 -1
- package/i18n/indonesian.js +1 -1
- package/i18n/indonesian.min.js +1 -1
- package/i18n/italian.js +1 -1
- package/i18n/italian.min.js +1 -1
- package/i18n/japanese.js +1 -1
- package/i18n/japanese.min.js +1 -1
- package/i18n/kazakh.js +1 -1
- package/i18n/kazakh.min.js +1 -1
- package/i18n/korean.js +1 -1
- package/i18n/korean.min.js +1 -1
- package/i18n/latvian.js +1 -1
- package/i18n/latvian.min.js +1 -1
- package/i18n/lithuanian.js +1 -1
- package/i18n/lithuanian.min.js +1 -1
- package/i18n/macedonian.js +1 -1
- package/i18n/macedonian.min.js +1 -1
- package/i18n/malay.js +1 -1
- package/i18n/malay.min.js +1 -1
- package/i18n/nl-BE.js +1 -1
- package/i18n/nl-BE.min.js +1 -1
- package/i18n/norwegian.js +1 -1
- package/i18n/norwegian.min.js +1 -1
- package/i18n/persian.js +1 -1
- package/i18n/persian.min.js +1 -1
- package/i18n/polish.js +1 -1
- package/i18n/polish.min.js +1 -1
- package/i18n/portuguese-br.js +1 -1
- package/i18n/portuguese-br.min.js +1 -1
- package/i18n/portuguese.js +1 -1
- package/i18n/portuguese.min.js +1 -1
- package/i18n/romanian.js +1 -1
- package/i18n/romanian.min.js +1 -1
- package/i18n/russian.js +1 -1
- package/i18n/russian.min.js +1 -1
- package/i18n/serbian.js +1 -1
- package/i18n/serbian.min.js +1 -1
- package/i18n/simplified-chinese.js +1 -1
- package/i18n/simplified-chinese.min.js +1 -1
- package/i18n/slovak.js +1 -1
- package/i18n/slovak.min.js +1 -1
- package/i18n/spanish.js +1 -1
- package/i18n/spanish.min.js +1 -1
- package/i18n/swahili.js +1 -1
- package/i18n/swahili.min.js +1 -1
- package/i18n/swedish.js +1 -1
- package/i18n/swedish.min.js +1 -1
- package/i18n/tajik.js +1 -1
- package/i18n/tajik.min.js +1 -1
- package/i18n/telugu.js +1 -1
- package/i18n/telugu.min.js +1 -1
- package/i18n/thai.js +1 -1
- package/i18n/thai.min.js +1 -1
- package/i18n/traditional-chinese.js +1 -1
- package/i18n/traditional-chinese.min.js +1 -1
- package/i18n/turkish.js +1 -1
- package/i18n/turkish.min.js +1 -1
- package/i18n/ukrainian.js +1 -1
- package/i18n/ukrainian.min.js +1 -1
- package/i18n/urdu.js +1 -1
- package/i18n/urdu.min.js +1 -1
- package/i18n/vietnamese.js +1 -1
- package/i18n/vietnamese.min.js +1 -1
- package/i18n/welsh.js +1 -1
- package/i18n/welsh.min.js +1 -1
- package/modern.css +1 -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.js +1 -1
- package/plugins/bootstrap-integration.min.js +1 -1
- package/plugins/bootstrap-material-integration.js +1 -1
- package/plugins/bootstrap-material-integration.min.js +1 -1
- package/survey.core.js +289 -161
- package/survey.core.js.map +1 -1
- package/survey.core.min.js +3 -3
- package/survey.css +1 -1
- package/survey.i18n.js +1 -1
- package/survey.i18n.min.js +1 -1
- package/survey.min.css +1 -1
- package/themes/borderless-dark-panelless.js +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/defaultCss/defaultV2Css.d.ts +1 -0
- package/ts3.4/typings/entries/chunks/model.d.ts +1 -1
- package/ts3.4/typings/mask/mask_numeric.d.ts +1 -0
- package/ts3.4/typings/question.d.ts +4 -1
- package/ts3.4/typings/question_baseselect.d.ts +1 -1
- package/ts3.4/typings/question_dropdown.d.ts +1 -1
- package/ts3.4/typings/question_file.d.ts +1 -2
- package/ts3.4/typings/question_matrixdropdownbase.d.ts +7 -3
- package/ts3.4/typings/question_matrixdynamic.d.ts +2 -2
- package/ts3.4/typings/question_rating.d.ts +3 -0
- package/ts3.4/typings/question_signaturepad.d.ts +1 -1
- package/ts3.4/typings/question_tagbox.d.ts +1 -1
- package/ts3.4/typings/settings.d.ts +8 -0
- package/ts3.4/typings/survey.d.ts +1 -1
- package/typings/defaultCss/defaultV2Css.d.ts +1 -0
- package/typings/entries/chunks/model.d.ts +1 -1
- package/typings/mask/mask_numeric.d.ts +1 -0
- package/typings/question.d.ts +4 -1
- package/typings/question_baseselect.d.ts +1 -1
- package/typings/question_dropdown.d.ts +1 -1
- package/typings/question_file.d.ts +1 -2
- package/typings/question_matrixdropdownbase.d.ts +7 -3
- package/typings/question_matrixdynamic.d.ts +2 -2
- package/typings/question_rating.d.ts +3 -0
- package/typings/question_signaturepad.d.ts +1 -1
- package/typings/question_tagbox.d.ts +1 -1
- package/typings/settings.d.ts +8 -0
- package/typings/survey.d.ts +1 -1
package/survey.core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.10.
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.10.5
|
|
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
|
*/
|
|
@@ -3970,13 +3970,18 @@ var ProcessValue = /** @class */ (function () {
|
|
|
3970
3970
|
};
|
|
3971
3971
|
ProcessValue.prototype.isAnyKeyChanged = function (keys, usedNames) {
|
|
3972
3972
|
for (var i = 0; i < usedNames.length; i++) {
|
|
3973
|
-
var
|
|
3974
|
-
if (
|
|
3973
|
+
var name_1 = usedNames[i];
|
|
3974
|
+
if (!name_1)
|
|
3975
|
+
continue;
|
|
3976
|
+
var lowerName = name_1.toLowerCase();
|
|
3977
|
+
if (keys.hasOwnProperty(name_1))
|
|
3978
|
+
return true;
|
|
3979
|
+
if (name_1 !== lowerName && keys.hasOwnProperty(lowerName))
|
|
3975
3980
|
return true;
|
|
3976
|
-
var firstName = this.getFirstName(
|
|
3981
|
+
var firstName = this.getFirstName(name_1);
|
|
3977
3982
|
if (!keys.hasOwnProperty(firstName))
|
|
3978
3983
|
continue;
|
|
3979
|
-
if (
|
|
3984
|
+
if (name_1 === firstName)
|
|
3980
3985
|
return true;
|
|
3981
3986
|
var keyValue = keys[firstName];
|
|
3982
3987
|
if (keyValue == undefined)
|
|
@@ -3986,9 +3991,9 @@ var ProcessValue = /** @class */ (function () {
|
|
|
3986
3991
|
return true;
|
|
3987
3992
|
var v = {};
|
|
3988
3993
|
v[firstName] = keyValue["oldValue"];
|
|
3989
|
-
var oldValue = this.getValue(
|
|
3994
|
+
var oldValue = this.getValue(name_1, v);
|
|
3990
3995
|
v[firstName] = keyValue["newValue"];
|
|
3991
|
-
var newValue = this.getValue(
|
|
3996
|
+
var newValue = this.getValue(name_1, v);
|
|
3992
3997
|
if (!_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isTwoValueEquals(oldValue, newValue, false, false, false))
|
|
3993
3998
|
return true;
|
|
3994
3999
|
}
|
|
@@ -5425,6 +5430,7 @@ var defaultV2Css = {
|
|
|
5425
5430
|
rootFitToContainer: "sd-root-modern--full-container",
|
|
5426
5431
|
rootWrapper: "sd-root-modern__wrapper",
|
|
5427
5432
|
rootWrapperFixed: "sd-root-modern__wrapper--fixed",
|
|
5433
|
+
rootWrapperHasImage: "sd-root-modern__wrapper--has-image",
|
|
5428
5434
|
rootBackgroundImage: "sd-root_background-image",
|
|
5429
5435
|
container: "sd-container-modern",
|
|
5430
5436
|
header: "sd-title sd-container-modern__title",
|
|
@@ -7315,10 +7321,9 @@ var DragDropDOMAdapter = /** @class */ (function () {
|
|
|
7315
7321
|
var pageY = event.pageY;
|
|
7316
7322
|
var clientX = event.clientX;
|
|
7317
7323
|
var clientY = event.clientY;
|
|
7318
|
-
|
|
7319
|
-
|
|
7320
|
-
|
|
7321
|
-
}
|
|
7324
|
+
//https://github.com/surveyjs/survey-creator/issues/5484
|
|
7325
|
+
rootElementX -= rootElementScrollLeft;
|
|
7326
|
+
rootElementY -= rootElementScrollTop;
|
|
7322
7327
|
var shortcutBottomCoordinate = this.getShortcutBottomCoordinate(clientY, shortcutHeight, shortcutYOffset);
|
|
7323
7328
|
var shortcutRightCoordinate = this.getShortcutRightCoordinate(clientX, shortcutWidth, shortcutXOffset);
|
|
7324
7329
|
if (shortcutRightCoordinate >= documentRight) { // right boundary
|
|
@@ -8526,7 +8531,7 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
|
8526
8531
|
this.changeSelectionWithKeyboard(false);
|
|
8527
8532
|
};
|
|
8528
8533
|
DropdownListModel.prototype.onClear = function (event) {
|
|
8529
|
-
this.question.clearValue();
|
|
8534
|
+
this.question.clearValue(true);
|
|
8530
8535
|
this._popupModel.isVisible = false;
|
|
8531
8536
|
if (event) {
|
|
8532
8537
|
event.preventDefault();
|
|
@@ -9709,8 +9714,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9709
9714
|
|
|
9710
9715
|
var Version;
|
|
9711
9716
|
var ReleaseDate;
|
|
9712
|
-
Version = "" + "1.10.
|
|
9713
|
-
ReleaseDate = "" + "2024-05-
|
|
9717
|
+
Version = "" + "1.10.5";
|
|
9718
|
+
ReleaseDate = "" + "2024-05-20";
|
|
9714
9719
|
function checkLibraryVersion(ver, libraryName) {
|
|
9715
9720
|
if (Version != ver) {
|
|
9716
9721
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
|
@@ -15312,6 +15317,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15312
15317
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
|
|
15313
15318
|
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
|
|
15314
15319
|
/* harmony import */ var _console_warnings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./console-warnings */ "./src/console-warnings.ts");
|
|
15320
|
+
/* harmony import */ var _conditions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./conditions */ "./src/conditions.ts");
|
|
15321
|
+
|
|
15315
15322
|
|
|
15316
15323
|
|
|
15317
15324
|
|
|
@@ -15434,7 +15441,7 @@ function avg(params) {
|
|
|
15434
15441
|
}
|
|
15435
15442
|
FunctionFactory.Instance.register("avg", avg);
|
|
15436
15443
|
function getInArrayParams(params) {
|
|
15437
|
-
if (params.length
|
|
15444
|
+
if (params.length < 2 || params.length > 3)
|
|
15438
15445
|
return null;
|
|
15439
15446
|
var arr = params[0];
|
|
15440
15447
|
if (!arr)
|
|
@@ -15444,16 +15451,22 @@ function getInArrayParams(params) {
|
|
|
15444
15451
|
var name = params[1];
|
|
15445
15452
|
if (typeof name !== "string" && !(name instanceof String))
|
|
15446
15453
|
return null;
|
|
15447
|
-
|
|
15454
|
+
var expression = params.length === 3 ? params[2] : undefined;
|
|
15455
|
+
if (typeof expression !== "string" && !(expression instanceof String)) {
|
|
15456
|
+
expression = undefined;
|
|
15457
|
+
}
|
|
15458
|
+
return { data: arr, name: name, expression: expression };
|
|
15448
15459
|
}
|
|
15449
15460
|
function convertToNumber(val) {
|
|
15450
15461
|
if (typeof val === "string")
|
|
15451
15462
|
return _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isNumber(val) ? _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].getNumber(val) : undefined;
|
|
15452
15463
|
return val;
|
|
15453
15464
|
}
|
|
15454
|
-
function processItemInArray(item, name, res, func, needToConvert) {
|
|
15465
|
+
function processItemInArray(item, name, res, func, needToConvert, condition) {
|
|
15455
15466
|
if (!item || _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isValueEmpty(item[name]))
|
|
15456
15467
|
return res;
|
|
15468
|
+
if (condition && !condition.run(item))
|
|
15469
|
+
return res;
|
|
15457
15470
|
var val = needToConvert ? convertToNumber(item[name]) : 1;
|
|
15458
15471
|
return func(res, val);
|
|
15459
15472
|
}
|
|
@@ -15462,15 +15475,19 @@ function calcInArray(params, func, needToConvert) {
|
|
|
15462
15475
|
var v = getInArrayParams(params);
|
|
15463
15476
|
if (!v)
|
|
15464
15477
|
return undefined;
|
|
15478
|
+
var condition = !!v.expression ? new _conditions__WEBPACK_IMPORTED_MODULE_3__["ConditionRunner"](v.expression) : undefined;
|
|
15479
|
+
if (condition && condition.isAsync) {
|
|
15480
|
+
condition = undefined;
|
|
15481
|
+
}
|
|
15465
15482
|
var res = undefined;
|
|
15466
15483
|
if (Array.isArray(v.data)) {
|
|
15467
15484
|
for (var i = 0; i < v.data.length; i++) {
|
|
15468
|
-
res = processItemInArray(v.data[i], v.name, res, func, needToConvert);
|
|
15485
|
+
res = processItemInArray(v.data[i], v.name, res, func, needToConvert, condition);
|
|
15469
15486
|
}
|
|
15470
15487
|
}
|
|
15471
15488
|
else {
|
|
15472
15489
|
for (var key in v.data) {
|
|
15473
|
-
res = processItemInArray(v.data[key], v.name, res, func, needToConvert);
|
|
15490
|
+
res = processItemInArray(v.data[key], v.name, res, func, needToConvert, condition);
|
|
15474
15491
|
}
|
|
15475
15492
|
}
|
|
15476
15493
|
return res;
|
|
@@ -22851,6 +22868,9 @@ var InputMaskNumeric = /** @class */ (function (_super) {
|
|
|
22851
22868
|
}
|
|
22852
22869
|
return result;
|
|
22853
22870
|
};
|
|
22871
|
+
InputMaskNumeric.prototype.numericalCompositionIsEmpty = function (number) {
|
|
22872
|
+
return !number.integralPart && !number.fractionalPart;
|
|
22873
|
+
};
|
|
22854
22874
|
InputMaskNumeric.prototype.displayNumber = function (parsedNumber, insertThousandsSeparator, matchWholeMask) {
|
|
22855
22875
|
if (insertThousandsSeparator === void 0) { insertThousandsSeparator = true; }
|
|
22856
22876
|
if (matchWholeMask === void 0) { matchWholeMask = false; }
|
|
@@ -22955,6 +22975,8 @@ var InputMaskNumeric = /** @class */ (function (_super) {
|
|
|
22955
22975
|
};
|
|
22956
22976
|
InputMaskNumeric.prototype.getNumberUnmaskedValue = function (str) {
|
|
22957
22977
|
var parsedNumber = this.parseNumber(str);
|
|
22978
|
+
if (this.numericalCompositionIsEmpty(parsedNumber))
|
|
22979
|
+
return undefined;
|
|
22958
22980
|
return this.convertNumber(parsedNumber);
|
|
22959
22981
|
};
|
|
22960
22982
|
InputMaskNumeric.prototype.getTextAlignment = function () {
|
|
@@ -29971,15 +29993,18 @@ var Question = /** @class */ (function (_super) {
|
|
|
29971
29993
|
* @see value
|
|
29972
29994
|
* @see comment
|
|
29973
29995
|
*/
|
|
29974
|
-
Question.prototype.clearValue = function () {
|
|
29996
|
+
Question.prototype.clearValue = function (keepComment) {
|
|
29975
29997
|
if (this.value !== undefined) {
|
|
29976
29998
|
this.value = undefined;
|
|
29977
29999
|
}
|
|
29978
|
-
if (!!this.comment) {
|
|
30000
|
+
if (!!this.comment && keepComment !== true) {
|
|
29979
30001
|
this.comment = undefined;
|
|
29980
30002
|
}
|
|
29981
30003
|
this.setValueChangedDirectly(false);
|
|
29982
30004
|
};
|
|
30005
|
+
Question.prototype.clearValueOnly = function () {
|
|
30006
|
+
this.clearValue(true);
|
|
30007
|
+
};
|
|
29983
30008
|
Question.prototype.unbindValue = function () {
|
|
29984
30009
|
this.clearValue();
|
|
29985
30010
|
};
|
|
@@ -30663,6 +30688,8 @@ var Question = /** @class */ (function (_super) {
|
|
|
30663
30688
|
return new _error__WEBPACK_IMPORTED_MODULE_3__["CustomError"](error, this.survey);
|
|
30664
30689
|
};
|
|
30665
30690
|
Question.prototype.removeError = function (error) {
|
|
30691
|
+
if (!error)
|
|
30692
|
+
return;
|
|
30666
30693
|
var errors = this.errors;
|
|
30667
30694
|
var index = errors.indexOf(error);
|
|
30668
30695
|
if (index !== -1)
|
|
@@ -31107,14 +31134,18 @@ var Question = /** @class */ (function (_super) {
|
|
|
31107
31134
|
Question.prototype.getDesktopRenderAs = function () {
|
|
31108
31135
|
return "default";
|
|
31109
31136
|
};
|
|
31137
|
+
Question.prototype.onBeforeSetCompactRenderer = function () { };
|
|
31138
|
+
Question.prototype.onBeforeSetDesktopRenderer = function () { };
|
|
31110
31139
|
Question.prototype.processResponsiveness = function (requiredWidth, availableWidth) {
|
|
31111
31140
|
availableWidth = Math.round(availableWidth);
|
|
31112
31141
|
if (Math.abs(requiredWidth - availableWidth) > 2) {
|
|
31113
31142
|
var oldRenderAs = this.renderAs;
|
|
31114
31143
|
if (requiredWidth > availableWidth) {
|
|
31144
|
+
this.onBeforeSetCompactRenderer();
|
|
31115
31145
|
this.renderAs = this.getCompactRenderAs();
|
|
31116
31146
|
}
|
|
31117
31147
|
else {
|
|
31148
|
+
this.onBeforeSetDesktopRenderer();
|
|
31118
31149
|
this.renderAs = this.getDesktopRenderAs();
|
|
31119
31150
|
}
|
|
31120
31151
|
return oldRenderAs !== this.renderAs;
|
|
@@ -32343,8 +32374,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
32343
32374
|
this.isSettingComment = false;
|
|
32344
32375
|
}
|
|
32345
32376
|
};
|
|
32346
|
-
QuestionSelectBase.prototype.clearValue = function () {
|
|
32347
|
-
_super.prototype.clearValue.call(this);
|
|
32377
|
+
QuestionSelectBase.prototype.clearValue = function (keepComment) {
|
|
32378
|
+
_super.prototype.clearValue.call(this, keepComment);
|
|
32348
32379
|
this.prevOtherValue = undefined;
|
|
32349
32380
|
};
|
|
32350
32381
|
QuestionSelectBase.prototype.updateCommentFromSurvey = function (newValue) {
|
|
@@ -32601,6 +32632,9 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
32601
32632
|
this.isLockVisibleChoices = !!question && question.name === val;
|
|
32602
32633
|
if (!!question && question.name !== val) {
|
|
32603
32634
|
question.removeDependedQuestion(this);
|
|
32635
|
+
if (this.isDesignMode && !this.isLoadingFromJson && !!val) {
|
|
32636
|
+
this.setPropertyValue("choicesFromQuestion", undefined);
|
|
32637
|
+
}
|
|
32604
32638
|
}
|
|
32605
32639
|
this.setPropertyValue("choicesFromQuestion", val);
|
|
32606
32640
|
this.isLockVisibleChoices = false;
|
|
@@ -33016,7 +33050,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
33016
33050
|
}
|
|
33017
33051
|
}
|
|
33018
33052
|
}
|
|
33019
|
-
return strs.join("
|
|
33053
|
+
return strs.join(_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].choicesSeparator);
|
|
33020
33054
|
};
|
|
33021
33055
|
QuestionSelectBase.prototype.getItemDisplayValue = function (item, val) {
|
|
33022
33056
|
if (item === this.otherItem) {
|
|
@@ -33550,7 +33584,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
33550
33584
|
QuestionSelectBase.prototype.clearIncorrectValuesCore = function () {
|
|
33551
33585
|
var val = this.value;
|
|
33552
33586
|
if (this.canClearValueAnUnknown(val)) {
|
|
33553
|
-
this.clearValue();
|
|
33587
|
+
this.clearValue(true);
|
|
33554
33588
|
}
|
|
33555
33589
|
};
|
|
33556
33590
|
QuestionSelectBase.prototype.canClearValueAnUnknown = function (val) {
|
|
@@ -33560,7 +33594,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
33560
33594
|
};
|
|
33561
33595
|
QuestionSelectBase.prototype.clearDisabledValuesCore = function () {
|
|
33562
33596
|
if (this.isValueDisabled(this.value)) {
|
|
33563
|
-
this.clearValue();
|
|
33597
|
+
this.clearValue(true);
|
|
33564
33598
|
}
|
|
33565
33599
|
};
|
|
33566
33600
|
QuestionSelectBase.prototype.clearUnusedValues = function () {
|
|
@@ -34988,7 +35022,7 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
|
34988
35022
|
this.selectAll();
|
|
34989
35023
|
}
|
|
34990
35024
|
else {
|
|
34991
|
-
this.clearValue();
|
|
35025
|
+
this.clearValue(true);
|
|
34992
35026
|
}
|
|
34993
35027
|
},
|
|
34994
35028
|
enumerable: false,
|
|
@@ -35400,7 +35434,7 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
|
35400
35434
|
this.value = null;
|
|
35401
35435
|
}
|
|
35402
35436
|
else {
|
|
35403
|
-
this.clearValue();
|
|
35437
|
+
this.clearValue(true);
|
|
35404
35438
|
}
|
|
35405
35439
|
}
|
|
35406
35440
|
this.isChangingValueOnClearIncorrect = false;
|
|
@@ -35431,7 +35465,7 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
|
35431
35465
|
return;
|
|
35432
35466
|
this.isChangingValueOnClearIncorrect = true;
|
|
35433
35467
|
if (newValue.length == 0) {
|
|
35434
|
-
this.clearValue();
|
|
35468
|
+
this.clearValue(true);
|
|
35435
35469
|
}
|
|
35436
35470
|
else {
|
|
35437
35471
|
this.value = newValue;
|
|
@@ -37337,9 +37371,9 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
|
|
|
37337
37371
|
QuestionDropdownModel.prototype.getInputId = function () {
|
|
37338
37372
|
return this.inputId + "_0";
|
|
37339
37373
|
};
|
|
37340
|
-
QuestionDropdownModel.prototype.clearValue = function () {
|
|
37374
|
+
QuestionDropdownModel.prototype.clearValue = function (keepComment) {
|
|
37341
37375
|
var _a;
|
|
37342
|
-
_super.prototype.clearValue.call(this);
|
|
37376
|
+
_super.prototype.clearValue.call(this, keepComment);
|
|
37343
37377
|
this.lastSelectedItemValue = null;
|
|
37344
37378
|
(_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.clear();
|
|
37345
37379
|
};
|
|
@@ -37349,7 +37383,7 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
|
|
|
37349
37383
|
QuestionDropdownModel.prototype.onKeyUp = function (event) {
|
|
37350
37384
|
var char = event.which || event.keyCode;
|
|
37351
37385
|
if (char === 46) {
|
|
37352
|
-
this.clearValue();
|
|
37386
|
+
this.clearValue(true);
|
|
37353
37387
|
event.preventDefault();
|
|
37354
37388
|
event.stopPropagation();
|
|
37355
37389
|
}
|
|
@@ -38170,9 +38204,9 @@ var QuestionFileModelBase = /** @class */ (function (_super) {
|
|
|
38170
38204
|
enumerable: false,
|
|
38171
38205
|
configurable: true
|
|
38172
38206
|
});
|
|
38173
|
-
QuestionFileModelBase.prototype.clearValue = function () {
|
|
38207
|
+
QuestionFileModelBase.prototype.clearValue = function (keepComment) {
|
|
38174
38208
|
this.clearOnDeletingContainer();
|
|
38175
|
-
_super.prototype.clearValue.call(this);
|
|
38209
|
+
_super.prototype.clearValue.call(this, keepComment);
|
|
38176
38210
|
};
|
|
38177
38211
|
QuestionFileModelBase.prototype.clearOnDeletingContainer = function () {
|
|
38178
38212
|
if (!this.survey)
|
|
@@ -38497,7 +38531,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
38497
38531
|
_super.prototype.updateElementCssCore.call(this, cssClasses);
|
|
38498
38532
|
this.prevFileAction.iconName = this.cssClasses.leftIconId;
|
|
38499
38533
|
this.nextFileAction.iconName = this.cssClasses.rightIconId;
|
|
38500
|
-
|
|
38534
|
+
this.updateCurrentMode();
|
|
38501
38535
|
};
|
|
38502
38536
|
QuestionFileModel.prototype.getFileIndexCaption = function () {
|
|
38503
38537
|
return this.getLocalizationFormatString("indexText", this.indexToShow + 1, this.pagesCount);
|
|
@@ -39139,11 +39173,6 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
39139
39173
|
this.actionsContainer.containerCss = classes.actionsContainer;
|
|
39140
39174
|
return classes;
|
|
39141
39175
|
};
|
|
39142
|
-
//todo remove in v2
|
|
39143
|
-
QuestionFileModel.prototype.updateElementCss = function (reNew) {
|
|
39144
|
-
_super.prototype.updateElementCss.call(this, reNew);
|
|
39145
|
-
this.updateCurrentMode();
|
|
39146
|
-
};
|
|
39147
39176
|
QuestionFileModel.prototype.onSurveyLoad = function () {
|
|
39148
39177
|
_super.prototype.onSurveyLoad.call(this);
|
|
39149
39178
|
this.updateCurrentMode();
|
|
@@ -39549,7 +39578,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
39549
39578
|
|
|
39550
39579
|
|
|
39551
39580
|
|
|
39552
|
-
var
|
|
39581
|
+
var youtubeDomains = ["www.youtube.com", "m.youtube.com", "youtube.com", "youtu.be"];
|
|
39553
39582
|
var videoSuffics = [".mp4", ".mov", ".wmv", ".flv", ".avi", ".mkv"];
|
|
39554
39583
|
var youtubeUrl = "https://www.youtube.com/";
|
|
39555
39584
|
var youtubeEmbed = "embed";
|
|
@@ -39557,8 +39586,9 @@ function isUrlYoutubeVideo(url) {
|
|
|
39557
39586
|
if (!url)
|
|
39558
39587
|
return false;
|
|
39559
39588
|
url = url.toLowerCase();
|
|
39560
|
-
|
|
39561
|
-
|
|
39589
|
+
url = url.replace(/^https?:\/\//, "");
|
|
39590
|
+
for (var i = 0; i < youtubeDomains.length; i++) {
|
|
39591
|
+
if (url.indexOf(youtubeDomains[i] + "/") === 0)
|
|
39562
39592
|
return true;
|
|
39563
39593
|
}
|
|
39564
39594
|
return false;
|
|
@@ -39574,7 +39604,7 @@ var QuestionImageModel = /** @class */ (function (_super) {
|
|
|
39574
39604
|
var _this = _super.call(this, name) || this;
|
|
39575
39605
|
var locImageLink = _this.createLocalizableString("imageLink", _this, false);
|
|
39576
39606
|
locImageLink.onGetTextCallback = function (text) {
|
|
39577
|
-
return getCorrectImageLink(text);
|
|
39607
|
+
return getCorrectImageLink(text, _this.contentMode == "youtube");
|
|
39578
39608
|
};
|
|
39579
39609
|
_this.createLocalizableString("altText", _this, false);
|
|
39580
39610
|
_this.registerPropertyChangedHandlers(["contentMode", "imageLink"], function () { return _this.calculateRenderedMode(); });
|
|
@@ -39806,9 +39836,10 @@ var QuestionImageModel = /** @class */ (function (_super) {
|
|
|
39806
39836
|
return QuestionImageModel;
|
|
39807
39837
|
}(_questionnonvalue__WEBPACK_IMPORTED_MODULE_0__["QuestionNonValue"]));
|
|
39808
39838
|
|
|
39809
|
-
function getCorrectImageLink(val) {
|
|
39839
|
+
function getCorrectImageLink(val, isYouTube) {
|
|
39810
39840
|
if (!val || !isUrlYoutubeVideo(val))
|
|
39811
|
-
return val;
|
|
39841
|
+
return isYouTube ? "" : val;
|
|
39842
|
+
//if(!val || !isUrlYoutubeVideo(val)) return val;
|
|
39812
39843
|
var res = val.toLocaleLowerCase();
|
|
39813
39844
|
if (res.indexOf(youtubeEmbed) > -1)
|
|
39814
39845
|
return val;
|
|
@@ -40082,7 +40113,7 @@ var QuestionImagePickerModel = /** @class */ (function (_super) {
|
|
|
40082
40113
|
if (!val)
|
|
40083
40114
|
return;
|
|
40084
40115
|
if (!Array.isArray(val) || val.length == 0) {
|
|
40085
|
-
this.clearValue();
|
|
40116
|
+
this.clearValue(true);
|
|
40086
40117
|
return;
|
|
40087
40118
|
}
|
|
40088
40119
|
var newValue = [];
|
|
@@ -40094,7 +40125,7 @@ var QuestionImagePickerModel = /** @class */ (function (_super) {
|
|
|
40094
40125
|
if (newValue.length == val.length)
|
|
40095
40126
|
return;
|
|
40096
40127
|
if (newValue.length == 0) {
|
|
40097
|
-
this.clearValue();
|
|
40128
|
+
this.clearValue(true);
|
|
40098
40129
|
}
|
|
40099
40130
|
else {
|
|
40100
40131
|
this.value = newValue;
|
|
@@ -42032,10 +42063,10 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
|
42032
42063
|
this.detailPanel.runCondition(values, newProps);
|
|
42033
42064
|
}
|
|
42034
42065
|
};
|
|
42035
|
-
MatrixDropdownRowModelBase.prototype.clearValue = function () {
|
|
42066
|
+
MatrixDropdownRowModelBase.prototype.clearValue = function (keepComment) {
|
|
42036
42067
|
var questions = this.questions;
|
|
42037
42068
|
for (var i = 0; i < questions.length; i++) {
|
|
42038
|
-
questions[i].clearValue();
|
|
42069
|
+
questions[i].clearValue(keepComment);
|
|
42039
42070
|
}
|
|
42040
42071
|
};
|
|
42041
42072
|
MatrixDropdownRowModelBase.prototype.onAnyValueChanged = function (name, questionName) {
|
|
@@ -43441,23 +43472,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
43441
43472
|
QuestionMatrixDropdownModelBase.prototype.checkIfValueInRowDuplicated = function (checkedRow, cellQuestion) {
|
|
43442
43473
|
if (!this.generatedVisibleRows)
|
|
43443
43474
|
return false;
|
|
43444
|
-
|
|
43445
|
-
for (var i = 0; i < this.generatedVisibleRows.length; i++) {
|
|
43446
|
-
var row = this.generatedVisibleRows[i];
|
|
43447
|
-
if (checkedRow === row)
|
|
43448
|
-
continue;
|
|
43449
|
-
if (_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isTwoValueEquals(row.getValue(cellQuestion.name), cellQuestion.value, true, this.isUniqueCaseSensitive)) {
|
|
43450
|
-
res = true;
|
|
43451
|
-
break;
|
|
43452
|
-
}
|
|
43453
|
-
}
|
|
43454
|
-
if (res) {
|
|
43455
|
-
this.addDuplicationError(cellQuestion);
|
|
43456
|
-
}
|
|
43457
|
-
else {
|
|
43458
|
-
cellQuestion.clearErrors();
|
|
43459
|
-
}
|
|
43460
|
-
return res;
|
|
43475
|
+
return this.isValueInColumnDuplicated(cellQuestion.name, true, checkedRow);
|
|
43461
43476
|
};
|
|
43462
43477
|
/**
|
|
43463
43478
|
* Assigns values to a row.
|
|
@@ -43795,51 +43810,104 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
43795
43810
|
QuestionMatrixDropdownModelBase.prototype.isValueDuplicated = function () {
|
|
43796
43811
|
if (!this.generatedVisibleRows)
|
|
43797
43812
|
return false;
|
|
43798
|
-
var
|
|
43813
|
+
var names = this.getUniqueColumnsNames();
|
|
43799
43814
|
var res = false;
|
|
43800
|
-
for (var i = 0; i <
|
|
43801
|
-
res = this.isValueInColumnDuplicated(
|
|
43802
|
-
}
|
|
43803
|
-
return res;
|
|
43804
|
-
};
|
|
43805
|
-
QuestionMatrixDropdownModelBase.prototype.isValueInColumnDuplicated = function (column) {
|
|
43806
|
-
var keyValues = [];
|
|
43807
|
-
var res = false;
|
|
43808
|
-
for (var i = 0; i < this.generatedVisibleRows.length; i++) {
|
|
43809
|
-
res =
|
|
43810
|
-
this.isValueDuplicatedInRow(this.generatedVisibleRows[i], column, keyValues) || res;
|
|
43815
|
+
for (var i = 0; i < names.length; i++) {
|
|
43816
|
+
res = this.isValueInColumnDuplicated(names[i], true) || res;
|
|
43811
43817
|
}
|
|
43812
43818
|
return res;
|
|
43813
43819
|
};
|
|
43814
|
-
QuestionMatrixDropdownModelBase.prototype.
|
|
43820
|
+
QuestionMatrixDropdownModelBase.prototype.getUniqueColumnsNames = function () {
|
|
43815
43821
|
var res = new Array();
|
|
43816
43822
|
for (var i = 0; i < this.columns.length; i++) {
|
|
43817
43823
|
if (this.columns[i].isUnique) {
|
|
43818
|
-
res.push(this.columns[i]);
|
|
43824
|
+
res.push(this.columns[i].name);
|
|
43819
43825
|
}
|
|
43820
43826
|
}
|
|
43821
43827
|
return res;
|
|
43822
43828
|
};
|
|
43823
|
-
QuestionMatrixDropdownModelBase.prototype.
|
|
43824
|
-
var
|
|
43825
|
-
if (
|
|
43826
|
-
|
|
43827
|
-
|
|
43828
|
-
|
|
43829
|
-
|
|
43830
|
-
|
|
43831
|
-
|
|
43829
|
+
QuestionMatrixDropdownModelBase.prototype.isValueInColumnDuplicated = function (columnName, showErrors, row) {
|
|
43830
|
+
var rows = this.getDuplicatedRows(columnName);
|
|
43831
|
+
if (showErrors) {
|
|
43832
|
+
this.showDuplicatedErrorsInRows(rows, columnName);
|
|
43833
|
+
}
|
|
43834
|
+
this.removeDuplicatedErrorsInRows(rows, columnName);
|
|
43835
|
+
return !!row ? rows.indexOf(row) > -1 : rows.length > 0;
|
|
43836
|
+
};
|
|
43837
|
+
QuestionMatrixDropdownModelBase.prototype.getDuplicatedRows = function (columnName) {
|
|
43838
|
+
var keyValues = {};
|
|
43839
|
+
var res = [];
|
|
43840
|
+
var rows = this.generatedVisibleRows;
|
|
43841
|
+
for (var i = 0; i < rows.length; i++) {
|
|
43842
|
+
var val = undefined;
|
|
43843
|
+
var question = rows[i].getQuestionByName(columnName);
|
|
43844
|
+
if (!!question) {
|
|
43845
|
+
val = question.value;
|
|
43846
|
+
}
|
|
43847
|
+
else {
|
|
43848
|
+
var rowVal = this.getRowValue(i);
|
|
43849
|
+
val = !!rowVal ? rowVal[columnName] : undefined;
|
|
43850
|
+
}
|
|
43851
|
+
if (!this.isValueEmpty(val)) {
|
|
43852
|
+
if (!this.isUniqueCaseSensitive && typeof val === "string") {
|
|
43853
|
+
val = val.toLocaleLowerCase();
|
|
43854
|
+
}
|
|
43855
|
+
if (!keyValues[val]) {
|
|
43856
|
+
keyValues[val] = [];
|
|
43857
|
+
}
|
|
43858
|
+
keyValues[val].push(rows[i]);
|
|
43832
43859
|
}
|
|
43833
43860
|
}
|
|
43834
|
-
keyValues
|
|
43835
|
-
|
|
43861
|
+
for (var key in keyValues) {
|
|
43862
|
+
if (keyValues[key].length > 1) {
|
|
43863
|
+
keyValues[key].forEach(function (row) { return res.push(row); });
|
|
43864
|
+
}
|
|
43865
|
+
}
|
|
43866
|
+
return res;
|
|
43867
|
+
};
|
|
43868
|
+
QuestionMatrixDropdownModelBase.prototype.showDuplicatedErrorsInRows = function (duplicatedRows, columnName) {
|
|
43869
|
+
var _this = this;
|
|
43870
|
+
duplicatedRows.forEach(function (row) {
|
|
43871
|
+
var question = row.getQuestionByName(columnName);
|
|
43872
|
+
if (!question && _this.detailPanel.getQuestionByName(columnName)) {
|
|
43873
|
+
row.showDetailPanel();
|
|
43874
|
+
if (row.detailPanel) {
|
|
43875
|
+
question = row.detailPanel.getQuestionByName(columnName);
|
|
43876
|
+
}
|
|
43877
|
+
}
|
|
43878
|
+
if (question) {
|
|
43879
|
+
row.showDetailPanel();
|
|
43880
|
+
_this.addDuplicationError(question);
|
|
43881
|
+
}
|
|
43882
|
+
});
|
|
43883
|
+
};
|
|
43884
|
+
QuestionMatrixDropdownModelBase.prototype.removeDuplicatedErrorsInRows = function (duplicatedRows, columnName) {
|
|
43885
|
+
var _this = this;
|
|
43886
|
+
this.generatedVisibleRows.forEach(function (row) {
|
|
43887
|
+
if (duplicatedRows.indexOf(row) < 0) {
|
|
43888
|
+
var question = row.getQuestionByName(columnName);
|
|
43889
|
+
if (question) {
|
|
43890
|
+
_this.removeDuplicationError(question);
|
|
43891
|
+
}
|
|
43892
|
+
}
|
|
43893
|
+
});
|
|
43894
|
+
};
|
|
43895
|
+
QuestionMatrixDropdownModelBase.prototype.getDuplicationError = function (question) {
|
|
43896
|
+
var errors = question.errors;
|
|
43897
|
+
for (var i = 0; i < errors.length; i++) {
|
|
43898
|
+
if (errors[i].getErrorType() === "keyduplicationerror")
|
|
43899
|
+
return errors[i];
|
|
43900
|
+
}
|
|
43901
|
+
return null;
|
|
43836
43902
|
};
|
|
43837
43903
|
QuestionMatrixDropdownModelBase.prototype.addDuplicationError = function (question) {
|
|
43838
|
-
|
|
43839
|
-
if (!keyError) {
|
|
43904
|
+
if (!this.getDuplicationError(question)) {
|
|
43840
43905
|
question.addError(new _error__WEBPACK_IMPORTED_MODULE_10__["KeyDuplicationError"](this.keyDuplicationError, this));
|
|
43841
43906
|
}
|
|
43842
43907
|
};
|
|
43908
|
+
QuestionMatrixDropdownModelBase.prototype.removeDuplicationError = function (question) {
|
|
43909
|
+
question.removeError(this.getDuplicationError(question));
|
|
43910
|
+
};
|
|
43843
43911
|
QuestionMatrixDropdownModelBase.prototype.getFirstQuestionToFocus = function (withError) {
|
|
43844
43912
|
return this.getFirstCellQuestion(withError);
|
|
43845
43913
|
};
|
|
@@ -43985,6 +44053,9 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
43985
44053
|
this.onCellValueChanged(row, columnName, combine.rowValue);
|
|
43986
44054
|
}
|
|
43987
44055
|
}
|
|
44056
|
+
if (this.getUniqueColumnsNames().indexOf(columnName) > -1) {
|
|
44057
|
+
this.isValueInColumnDuplicated(columnName, !!rowObj);
|
|
44058
|
+
}
|
|
43988
44059
|
};
|
|
43989
44060
|
QuestionMatrixDropdownModelBase.prototype.getNewValueOnRowChanged = function (row, columnName, newRowValue, isDeletingValue, newValue) {
|
|
43990
44061
|
var rowValue = this.getRowValueCore(row, newValue, true);
|
|
@@ -44505,9 +44576,9 @@ var MatrixDropdownColumn = /** @class */ (function (_super) {
|
|
|
44505
44576
|
* @see isRequired
|
|
44506
44577
|
* @see readOnly
|
|
44507
44578
|
*/
|
|
44508
|
-
get: function () { return this.
|
|
44579
|
+
get: function () { return this.templateQuestion.visible; },
|
|
44509
44580
|
set: function (val) {
|
|
44510
|
-
this.
|
|
44581
|
+
this.templateQuestion.visible = val;
|
|
44511
44582
|
},
|
|
44512
44583
|
enumerable: false,
|
|
44513
44584
|
configurable: true
|
|
@@ -46555,7 +46626,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
|
46555
46626
|
QuestionMatrixDropdownRenderedTable.prototype.getMultipleColumnChoices = function (column) {
|
|
46556
46627
|
var choices = column.templateQuestion.choices;
|
|
46557
46628
|
if (!!choices && Array.isArray(choices) && choices.length == 0)
|
|
46558
|
-
return this.matrix.choices;
|
|
46629
|
+
return [].concat(this.matrix.choices, column.getVisibleMultipleChoices());
|
|
46559
46630
|
choices = column.getVisibleMultipleChoices();
|
|
46560
46631
|
if (!choices || !Array.isArray(choices))
|
|
46561
46632
|
return null;
|
|
@@ -46735,11 +46806,11 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
|
|
|
46735
46806
|
function QuestionMatrixDynamicModel(name) {
|
|
46736
46807
|
var _this = _super.call(this, name) || this;
|
|
46737
46808
|
_this.rowCounter = 0;
|
|
46738
|
-
_this.initialRowCount = 2;
|
|
46739
46809
|
_this.setRowCountValueFromData = false;
|
|
46740
46810
|
_this.startDragMatrixRow = function (event, currentTarget) {
|
|
46741
46811
|
_this.dragDropMatrixRows.startDrag(event, _this.draggedRow, _this, event.target);
|
|
46742
46812
|
};
|
|
46813
|
+
_this.initialRowCount = _this.getDefaultPropertyValue("rowCount");
|
|
46743
46814
|
_this.createLocalizableString("confirmDeleteText", _this, false, "confirmDelete");
|
|
46744
46815
|
var locAddRowText = _this.createLocalizableString("addRowText", _this);
|
|
46745
46816
|
locAddRowText.onGetTextCallback = function (text) {
|
|
@@ -47545,13 +47616,11 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
|
|
|
47545
47616
|
}
|
|
47546
47617
|
return setRowCount < this.minRowCount;
|
|
47547
47618
|
};
|
|
47548
|
-
QuestionMatrixDynamicModel.prototype.
|
|
47549
|
-
var res = _super.prototype.
|
|
47550
|
-
|
|
47551
|
-
|
|
47552
|
-
|
|
47553
|
-
res.push(column);
|
|
47554
|
-
}
|
|
47619
|
+
QuestionMatrixDynamicModel.prototype.getUniqueColumnsNames = function () {
|
|
47620
|
+
var res = _super.prototype.getUniqueColumnsNames.call(this);
|
|
47621
|
+
var name = this.keyName;
|
|
47622
|
+
if (!!name && res.indexOf(name) < 0) {
|
|
47623
|
+
res.push(name);
|
|
47555
47624
|
}
|
|
47556
47625
|
return res;
|
|
47557
47626
|
};
|
|
@@ -47616,6 +47685,12 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
|
|
|
47616
47685
|
this.setPropertyValueDirectly("rowCount", val.length);
|
|
47617
47686
|
return true;
|
|
47618
47687
|
};
|
|
47688
|
+
QuestionMatrixDynamicModel.prototype.updateValueFromSurvey = function (newValue, clearData) {
|
|
47689
|
+
if (clearData === void 0) { clearData = false; }
|
|
47690
|
+
this.setRowCountValueFromData = true;
|
|
47691
|
+
_super.prototype.updateValueFromSurvey.call(this, newValue, clearData);
|
|
47692
|
+
this.setRowCountValueFromData = false;
|
|
47693
|
+
};
|
|
47619
47694
|
QuestionMatrixDynamicModel.prototype.onBeforeValueChanged = function (val) {
|
|
47620
47695
|
if (!val || !Array.isArray(val))
|
|
47621
47696
|
return;
|
|
@@ -52102,7 +52177,7 @@ var QuestionRadiogroupModel = /** @class */ (function (_super) {
|
|
|
52102
52177
|
var clearAction = new _actions_action__WEBPACK_IMPORTED_MODULE_3__["Action"]({
|
|
52103
52178
|
title: this.clearButtonCaption,
|
|
52104
52179
|
id: "sv-clr-btn-" + this.id,
|
|
52105
|
-
action: function () { _this.clearValue(); },
|
|
52180
|
+
action: function () { _this.clearValue(true); },
|
|
52106
52181
|
innerCss: this.cssClasses.clearButton,
|
|
52107
52182
|
visible: new _base__WEBPACK_IMPORTED_MODULE_4__["ComputedUpdater"](function () { return _this.canShowClearButton; })
|
|
52108
52183
|
});
|
|
@@ -52319,7 +52394,7 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
52319
52394
|
_this.createNewArray("rankingChoices");
|
|
52320
52395
|
_this.createNewArray("unRankingChoices");
|
|
52321
52396
|
_this.registerFunctionOnPropertyValueChanged("selectToRankEnabled", function () {
|
|
52322
|
-
_this.clearValue();
|
|
52397
|
+
_this.clearValue(true);
|
|
52323
52398
|
_this.setDragDropRankingChoices();
|
|
52324
52399
|
_this.updateRankingChoicesSync();
|
|
52325
52400
|
});
|
|
@@ -52934,8 +53009,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
52934
53009
|
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
|
|
52935
53010
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./base */ "./src/base.ts");
|
|
52936
53011
|
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
|
|
52937
|
-
/* harmony import */ var
|
|
52938
|
-
/* harmony import */ var
|
|
53012
|
+
/* harmony import */ var _dropdownListModel__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./dropdownListModel */ "./src/dropdownListModel.ts");
|
|
53013
|
+
/* harmony import */ var _utils_devices__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils/devices */ "./src/utils/devices.ts");
|
|
53014
|
+
/* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./global_variables_utils */ "./src/global_variables_utils.ts");
|
|
52939
53015
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
52940
53016
|
var extendStatics = function (d, b) {
|
|
52941
53017
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -52968,6 +53044,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
52968
53044
|
|
|
52969
53045
|
|
|
52970
53046
|
|
|
53047
|
+
|
|
52971
53048
|
var RenderedRatingItem = /** @class */ (function (_super) {
|
|
52972
53049
|
__extends(RenderedRatingItem, _super);
|
|
52973
53050
|
function RenderedRatingItem(itemValue, locString) {
|
|
@@ -53049,6 +53126,9 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
53049
53126
|
_this.registerFunctionOnPropertiesValueChanged(["rateColorMode", "scaleColorMode"], function () {
|
|
53050
53127
|
_this.updateColors(_this.survey.themeVariables);
|
|
53051
53128
|
});
|
|
53129
|
+
_this.registerFunctionOnPropertiesValueChanged(["displayMode"], function () {
|
|
53130
|
+
_this.updateRenderAsBasedOnDisplayMode(true);
|
|
53131
|
+
});
|
|
53052
53132
|
_this.registerSychProperties(["autoGenerate"], function () {
|
|
53053
53133
|
if (!_this.autoGenerate && _this.rateValues.length === 0) {
|
|
53054
53134
|
_this.setPropertyValue("rateValues", _this.visibleRateValues);
|
|
@@ -53256,19 +53336,19 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
53256
53336
|
QuestionRatingModel.prototype.updateColors = function (themeVariables) {
|
|
53257
53337
|
if (this.colorMode === "monochrome")
|
|
53258
53338
|
return;
|
|
53259
|
-
if (!
|
|
53339
|
+
if (!_global_variables_utils__WEBPACK_IMPORTED_MODULE_11__["DomDocumentHelper"].isAvailable())
|
|
53260
53340
|
return;
|
|
53261
53341
|
if (QuestionRatingModel.colorsCalculated)
|
|
53262
53342
|
return;
|
|
53263
53343
|
function getRGBColor(colorName, varName) {
|
|
53264
53344
|
var str = !!themeVariables && themeVariables[colorName];
|
|
53265
53345
|
if (!str) {
|
|
53266
|
-
var style = getComputedStyle(
|
|
53346
|
+
var style = getComputedStyle(_global_variables_utils__WEBPACK_IMPORTED_MODULE_11__["DomDocumentHelper"].getDocumentElement());
|
|
53267
53347
|
str = style.getPropertyValue && style.getPropertyValue(varName);
|
|
53268
53348
|
}
|
|
53269
53349
|
if (!str)
|
|
53270
53350
|
return null;
|
|
53271
|
-
var canvasElement =
|
|
53351
|
+
var canvasElement = _global_variables_utils__WEBPACK_IMPORTED_MODULE_11__["DomDocumentHelper"].createElement("canvas");
|
|
53272
53352
|
if (!canvasElement)
|
|
53273
53353
|
return null;
|
|
53274
53354
|
var ctx = canvasElement.getContext("2d");
|
|
@@ -53464,6 +53544,27 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
53464
53544
|
enumerable: false,
|
|
53465
53545
|
configurable: true
|
|
53466
53546
|
});
|
|
53547
|
+
QuestionRatingModel.prototype.updateRenderAsBasedOnDisplayMode = function (isOnChange) {
|
|
53548
|
+
if (this.isDesignMode) {
|
|
53549
|
+
if (isOnChange || this.renderAs === "dropdown") {
|
|
53550
|
+
this.renderAs = "default";
|
|
53551
|
+
}
|
|
53552
|
+
}
|
|
53553
|
+
else {
|
|
53554
|
+
if (isOnChange || this.displayMode !== "auto") {
|
|
53555
|
+
this.renderAs = this.displayMode === "dropdown" ? "dropdown" : "default";
|
|
53556
|
+
}
|
|
53557
|
+
}
|
|
53558
|
+
};
|
|
53559
|
+
QuestionRatingModel.prototype.onSurveyLoad = function () {
|
|
53560
|
+
_super.prototype.onSurveyLoad.call(this);
|
|
53561
|
+
if (this.renderAs === "dropdown" && this.displayMode === "auto") {
|
|
53562
|
+
this.displayMode = this.renderAs;
|
|
53563
|
+
}
|
|
53564
|
+
else {
|
|
53565
|
+
this.updateRenderAsBasedOnDisplayMode();
|
|
53566
|
+
}
|
|
53567
|
+
};
|
|
53467
53568
|
Object.defineProperty(QuestionRatingModel.prototype, "rateDisplayMode", {
|
|
53468
53569
|
get: function () {
|
|
53469
53570
|
return this.rateType;
|
|
@@ -53519,7 +53620,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
53519
53620
|
};
|
|
53520
53621
|
QuestionRatingModel.prototype.setValueFromClick = function (value) {
|
|
53521
53622
|
if (this.value === parseFloat(value)) {
|
|
53522
|
-
this.clearValue();
|
|
53623
|
+
this.clearValue(true);
|
|
53523
53624
|
}
|
|
53524
53625
|
else {
|
|
53525
53626
|
this.value = value;
|
|
@@ -53529,7 +53630,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
53529
53630
|
}
|
|
53530
53631
|
};
|
|
53531
53632
|
QuestionRatingModel.prototype.onItemMouseIn = function (item) {
|
|
53532
|
-
if (
|
|
53633
|
+
if (_utils_devices__WEBPACK_IMPORTED_MODULE_10__["IsTouch"])
|
|
53533
53634
|
return;
|
|
53534
53635
|
if (this.isReadOnly || !item.itemValue.isEnabled || this.isDesignMode)
|
|
53535
53636
|
return;
|
|
@@ -53548,7 +53649,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
53548
53649
|
}
|
|
53549
53650
|
};
|
|
53550
53651
|
QuestionRatingModel.prototype.onItemMouseOut = function (item) {
|
|
53551
|
-
if (
|
|
53652
|
+
if (_utils_devices__WEBPACK_IMPORTED_MODULE_10__["IsTouch"])
|
|
53552
53653
|
return;
|
|
53553
53654
|
this.renderedRateItems.forEach(function (item) { return item.highlight = "none"; });
|
|
53554
53655
|
};
|
|
@@ -53819,6 +53920,11 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
53819
53920
|
QuestionRatingModel.prototype.supportResponsiveness = function () {
|
|
53820
53921
|
return true;
|
|
53821
53922
|
};
|
|
53923
|
+
QuestionRatingModel.prototype.onBeforeSetCompactRenderer = function () {
|
|
53924
|
+
if (!this.dropdownListModelValue) {
|
|
53925
|
+
this.dropdownListModel = new _dropdownListModel__WEBPACK_IMPORTED_MODULE_9__["DropdownListModel"](this);
|
|
53926
|
+
}
|
|
53927
|
+
};
|
|
53822
53928
|
QuestionRatingModel.prototype.getCompactRenderAs = function () {
|
|
53823
53929
|
return (this.displayMode == "buttons") ? "default" : "dropdown";
|
|
53824
53930
|
};
|
|
@@ -53838,6 +53944,9 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
53838
53944
|
});
|
|
53839
53945
|
Object.defineProperty(QuestionRatingModel.prototype, "dropdownListModel", {
|
|
53840
53946
|
get: function () {
|
|
53947
|
+
if (this.renderAs === "dropdown") {
|
|
53948
|
+
this.onBeforeSetCompactRenderer();
|
|
53949
|
+
}
|
|
53841
53950
|
return this.dropdownListModelValue;
|
|
53842
53951
|
},
|
|
53843
53952
|
set: function (val) {
|
|
@@ -53873,6 +53982,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
53873
53982
|
if (!this.survey)
|
|
53874
53983
|
return;
|
|
53875
53984
|
this.updateColors(this.survey.themeVariables);
|
|
53985
|
+
this.updateRenderAsBasedOnDisplayMode();
|
|
53876
53986
|
};
|
|
53877
53987
|
QuestionRatingModel.prototype.dispose = function () {
|
|
53878
53988
|
_super.prototype.dispose.call(this);
|
|
@@ -53903,18 +54013,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
53903
54013
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
|
53904
54014
|
], QuestionRatingModel.prototype, "displayRateDescriptionsAsExtremeItems", void 0);
|
|
53905
54015
|
__decorate([
|
|
53906
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])(
|
|
53907
|
-
onSet: function (val, target) {
|
|
53908
|
-
if (!target.isDesignMode) {
|
|
53909
|
-
if (val === "dropdown") {
|
|
53910
|
-
target.renderAs = "dropdown";
|
|
53911
|
-
}
|
|
53912
|
-
else {
|
|
53913
|
-
target.renderAs = "default";
|
|
53914
|
-
}
|
|
53915
|
-
}
|
|
53916
|
-
}
|
|
53917
|
-
})
|
|
54016
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
|
53918
54017
|
], QuestionRatingModel.prototype, "displayMode", void 0);
|
|
53919
54018
|
__decorate([
|
|
53920
54019
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
|
@@ -54493,9 +54592,9 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
|
|
|
54493
54592
|
this.value = (arg === null || arg === void 0 ? void 0 : arg.length) ? arg.map(function (r) { return r.content; })[0] : undefined;
|
|
54494
54593
|
this.valueIsUpdatingInternally = false;
|
|
54495
54594
|
};
|
|
54496
|
-
QuestionSignaturePadModel.prototype.clearValue = function () {
|
|
54595
|
+
QuestionSignaturePadModel.prototype.clearValue = function (keepComment) {
|
|
54497
54596
|
this.valueWasChangedFromLastUpload = false;
|
|
54498
|
-
_super.prototype.clearValue.call(this);
|
|
54597
|
+
_super.prototype.clearValue.call(this, keepComment);
|
|
54499
54598
|
this.refreshCanvas();
|
|
54500
54599
|
};
|
|
54501
54600
|
QuestionSignaturePadModel.prototype.endLoadingFromJson = function () {
|
|
@@ -54891,9 +54990,9 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
|
|
|
54891
54990
|
this.dropdownListModel.dispose();
|
|
54892
54991
|
}
|
|
54893
54992
|
};
|
|
54894
|
-
QuestionTagboxModel.prototype.clearValue = function () {
|
|
54993
|
+
QuestionTagboxModel.prototype.clearValue = function (keepComment) {
|
|
54895
54994
|
var _a;
|
|
54896
|
-
_super.prototype.clearValue.call(this);
|
|
54995
|
+
_super.prototype.clearValue.call(this, keepComment);
|
|
54897
54996
|
(_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.clear();
|
|
54898
54997
|
};
|
|
54899
54998
|
Object.defineProperty(QuestionTagboxModel.prototype, "showClearButton", {
|
|
@@ -56856,6 +56955,7 @@ var settings = {
|
|
|
56856
56955
|
* A separator used in a shorthand notation that specifies a value and display text for an [`ItemValue`](https://surveyjs.io/form-library/documentation/api-reference/itemvalue) object: `"value|text"`.
|
|
56857
56956
|
*
|
|
56858
56957
|
* Default value: `"|"`
|
|
56958
|
+
* @see [settings.choicesSeparator](https://surveyjs.io/form-library/documentation/api-reference/settings#choicesSeparator)
|
|
56859
56959
|
*/
|
|
56860
56960
|
itemValueSeparator: "|",
|
|
56861
56961
|
/**
|
|
@@ -57010,6 +57110,13 @@ var settings = {
|
|
|
57010
57110
|
dontKnowItem: [3],
|
|
57011
57111
|
otherItem: [4]
|
|
57012
57112
|
},
|
|
57113
|
+
/**
|
|
57114
|
+
* One or several characters used to separate choice options in a list.
|
|
57115
|
+
*
|
|
57116
|
+
* Default value: `", "`
|
|
57117
|
+
* @see [settings.itemValueSeparator](https://surveyjs.io/form-library/documentation/api-reference/settings#itemValueSeparator)
|
|
57118
|
+
*/
|
|
57119
|
+
choicesSeparator: ", ",
|
|
57013
57120
|
/**
|
|
57014
57121
|
* A list of supported validators by question type.
|
|
57015
57122
|
*/
|
|
@@ -59002,7 +59109,7 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
59002
59109
|
configurable: true
|
|
59003
59110
|
});
|
|
59004
59111
|
SurveyElement.prototype.getIsAnimationAllowed = function () {
|
|
59005
|
-
return _super.prototype.getIsAnimationAllowed.call(this) && !!this.survey;
|
|
59112
|
+
return _super.prototype.getIsAnimationAllowed.call(this) && !!this.survey && !this.survey["isEndLoadingFromJson"];
|
|
59006
59113
|
};
|
|
59007
59114
|
SurveyElement.prototype.dispose = function () {
|
|
59008
59115
|
_super.prototype.dispose.call(this);
|
|
@@ -61550,7 +61657,8 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61550
61657
|
SurveyModel.prototype.updateWrapperFormCss = function () {
|
|
61551
61658
|
this.wrapperFormCss = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_18__["CssClassBuilder"]()
|
|
61552
61659
|
.append(this.css.rootWrapper)
|
|
61553
|
-
.append(this.css.
|
|
61660
|
+
.append(this.css.rootWrapperHasImage, !!this.backgroundImage)
|
|
61661
|
+
.append(this.css.rootWrapperFixed, !!this.backgroundImage && this.backgroundImageAttachment === "fixed")
|
|
61554
61662
|
.toString();
|
|
61555
61663
|
};
|
|
61556
61664
|
Object.defineProperty(SurveyModel.prototype, "completedHtml", {
|
|
@@ -65308,7 +65416,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
65308
65416
|
page.name = name;
|
|
65309
65417
|
return page;
|
|
65310
65418
|
};
|
|
65311
|
-
SurveyModel.prototype.questionOnValueChanging = function (valueName, newValue) {
|
|
65419
|
+
SurveyModel.prototype.questionOnValueChanging = function (valueName, newValue, questionValueName) {
|
|
65312
65420
|
if (!!this.editingObj) {
|
|
65313
65421
|
var prop = _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].findProperty(this.editingObj.getType(), valueName);
|
|
65314
65422
|
if (!!prop)
|
|
@@ -65318,7 +65426,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
65318
65426
|
return newValue;
|
|
65319
65427
|
var options = {
|
|
65320
65428
|
name: valueName,
|
|
65321
|
-
question: this.getQuestionByValueName(valueName),
|
|
65429
|
+
question: this.getQuestionByValueName(questionValueName || valueName),
|
|
65322
65430
|
value: this.getUnbindValue(newValue),
|
|
65323
65431
|
oldValue: this.getValue(valueName),
|
|
65324
65432
|
};
|
|
@@ -66052,14 +66160,20 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
66052
66160
|
SurveyModel.prototype.setVariable = function (name, newValue) {
|
|
66053
66161
|
if (!name)
|
|
66054
66162
|
return;
|
|
66163
|
+
var oldValue = this.getVariable(name);
|
|
66055
66164
|
if (!!this.valuesHash) {
|
|
66056
66165
|
delete this.valuesHash[name];
|
|
66057
66166
|
}
|
|
66058
66167
|
name = name.toLowerCase();
|
|
66059
66168
|
this.variablesHash[name] = newValue;
|
|
66060
66169
|
this.notifyElementsOnAnyValueOrVariableChanged(name);
|
|
66061
|
-
|
|
66062
|
-
|
|
66170
|
+
if (!_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isTwoValueEquals(oldValue, newValue)) {
|
|
66171
|
+
this.runConditionOnValueChanged(name, newValue);
|
|
66172
|
+
var triggerKeys = {};
|
|
66173
|
+
triggerKeys[name] = { newValue: newValue, oldValue: oldValue };
|
|
66174
|
+
this.checkTriggers(triggerKeys, false, false, name);
|
|
66175
|
+
this.onVariableChanged.fire(this, { name: name, value: newValue });
|
|
66176
|
+
}
|
|
66063
66177
|
};
|
|
66064
66178
|
/**
|
|
66065
66179
|
* Returns the names of all variables in the survey.
|
|
@@ -66225,7 +66339,10 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
66225
66339
|
return;
|
|
66226
66340
|
if (this.checkIsCurrentPageHasErrors(false))
|
|
66227
66341
|
return;
|
|
66342
|
+
var curPage = this.currentPage;
|
|
66228
66343
|
var goNextPage = function () {
|
|
66344
|
+
if (curPage !== _this.currentPage)
|
|
66345
|
+
return;
|
|
66229
66346
|
if (!_this.isLastPage) {
|
|
66230
66347
|
_this.nextPage();
|
|
66231
66348
|
}
|
|
@@ -66264,6 +66381,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
66264
66381
|
if (this.isTwoValueEquals(newValue, this.getComment(name)))
|
|
66265
66382
|
return;
|
|
66266
66383
|
var commentName = name + this.commentSuffix;
|
|
66384
|
+
newValue = this.questionOnValueChanging(commentName, newValue, name);
|
|
66267
66385
|
if (this.isValueEmpty(newValue)) {
|
|
66268
66386
|
this.deleteDataValueCore(this.valuesHash, commentName);
|
|
66269
66387
|
}
|
|
@@ -66290,6 +66408,10 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
66290
66408
|
question: question,
|
|
66291
66409
|
value: newValue,
|
|
66292
66410
|
});
|
|
66411
|
+
question.comment = newValue;
|
|
66412
|
+
if (question.comment != newValue) {
|
|
66413
|
+
question.comment = newValue;
|
|
66414
|
+
}
|
|
66293
66415
|
}
|
|
66294
66416
|
};
|
|
66295
66417
|
/**
|
|
@@ -67214,32 +67336,34 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
67214
67336
|
}
|
|
67215
67337
|
}
|
|
67216
67338
|
else if (this.state === "running" && isStrCiEqual(layoutElement.id, this.progressBarComponentName)) {
|
|
67217
|
-
|
|
67218
|
-
|
|
67219
|
-
|
|
67220
|
-
|
|
67221
|
-
|
|
67222
|
-
|
|
67223
|
-
if (isStrCiEqual(this.showProgressBar, "belowHeader")) {
|
|
67224
|
-
isBelowHeader = true;
|
|
67225
|
-
}
|
|
67226
|
-
if (container === "header" && !isBelowHeader) {
|
|
67227
|
-
layoutElement.index = -150;
|
|
67228
|
-
if (this.isShowProgressBarOnTop && !this.isShowStartingPage) {
|
|
67229
|
-
containerLayoutElements.push(layoutElement);
|
|
67339
|
+
if (this.questionsOnPageMode != "singlePage") {
|
|
67340
|
+
var headerLayoutElement = this.findLayoutElement("advanced-header");
|
|
67341
|
+
var advHeader = headerLayoutElement && headerLayoutElement.data;
|
|
67342
|
+
var isBelowHeader = !advHeader || advHeader.hasBackground;
|
|
67343
|
+
if (isStrCiEqual(this.showProgressBar, "aboveHeader")) {
|
|
67344
|
+
isBelowHeader = false;
|
|
67230
67345
|
}
|
|
67231
|
-
|
|
67232
|
-
|
|
67233
|
-
if (!!layoutElement.index) {
|
|
67234
|
-
delete layoutElement.index;
|
|
67346
|
+
if (isStrCiEqual(this.showProgressBar, "belowHeader")) {
|
|
67347
|
+
isBelowHeader = true;
|
|
67235
67348
|
}
|
|
67236
|
-
if (
|
|
67237
|
-
|
|
67349
|
+
if (container === "header" && !isBelowHeader) {
|
|
67350
|
+
layoutElement.index = -150;
|
|
67351
|
+
if (this.isShowProgressBarOnTop && !this.isShowStartingPage) {
|
|
67352
|
+
containerLayoutElements.push(layoutElement);
|
|
67353
|
+
}
|
|
67238
67354
|
}
|
|
67239
|
-
|
|
67240
|
-
|
|
67241
|
-
|
|
67242
|
-
|
|
67355
|
+
if (container === "center" && isBelowHeader) {
|
|
67356
|
+
if (!!layoutElement.index) {
|
|
67357
|
+
delete layoutElement.index;
|
|
67358
|
+
}
|
|
67359
|
+
if (this.isShowProgressBarOnTop && !this.isShowStartingPage) {
|
|
67360
|
+
containerLayoutElements.push(layoutElement);
|
|
67361
|
+
}
|
|
67362
|
+
}
|
|
67363
|
+
if (container === "footer") {
|
|
67364
|
+
if (this.isShowProgressBarOnBottom && !this.isShowStartingPage) {
|
|
67365
|
+
containerLayoutElements.push(layoutElement);
|
|
67366
|
+
}
|
|
67243
67367
|
}
|
|
67244
67368
|
}
|
|
67245
67369
|
}
|
|
@@ -67435,7 +67559,11 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
67435
67559
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
67436
67560
|
], SurveyModel.prototype, "_isCompact", void 0);
|
|
67437
67561
|
__decorate([
|
|
67438
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])(
|
|
67562
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({
|
|
67563
|
+
onSet: function (newValue, target) {
|
|
67564
|
+
target.updateCss();
|
|
67565
|
+
}
|
|
67566
|
+
})
|
|
67439
67567
|
], SurveyModel.prototype, "backgroundImage", void 0);
|
|
67440
67568
|
__decorate([
|
|
67441
67569
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|