survey-react 1.12.24 → 1.12.26
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 +35 -4
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +19 -3
- package/modern.css.map +1 -1
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/survey.css +1 -1
- package/survey.min.css +1 -1
- package/survey.react.d.ts +28 -6
- package/survey.react.js +138 -82
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +3 -3
package/survey.react.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* surveyjs - Survey JavaScript library v1.12.
|
2
|
+
* surveyjs - Survey JavaScript library v1.12.26
|
3
3
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
5
5
|
*/
|
@@ -1747,7 +1747,7 @@ __webpack_require__.d(__webpack_exports__, "CustomError", function() { return /*
|
|
1747
1747
|
__webpack_require__.d(__webpack_exports__, "AnswerRequiredError", function() { return /* reexport */ AnswerRequiredError; });
|
1748
1748
|
__webpack_require__.d(__webpack_exports__, "OneAnswerRequiredError", function() { return /* reexport */ OneAnswerRequiredError; });
|
1749
1749
|
__webpack_require__.d(__webpack_exports__, "RequreNumericError", function() { return /* reexport */ RequreNumericError; });
|
1750
|
-
__webpack_require__.d(__webpack_exports__, "ExceedSizeError", function() { return /* reexport */
|
1750
|
+
__webpack_require__.d(__webpack_exports__, "ExceedSizeError", function() { return /* reexport */ ExceedSizeError; });
|
1751
1751
|
__webpack_require__.d(__webpack_exports__, "LocalizableString", function() { return /* reexport */ localizablestring_LocalizableString; });
|
1752
1752
|
__webpack_require__.d(__webpack_exports__, "LocalizableStrings", function() { return /* reexport */ localizablestring_LocalizableStrings; });
|
1753
1753
|
__webpack_require__.d(__webpack_exports__, "HtmlConditionItem", function() { return /* reexport */ HtmlConditionItem; });
|
@@ -2239,6 +2239,9 @@ var helpers_Helpers = /** @class */ (function () {
|
|
2239
2239
|
}
|
2240
2240
|
return !value && value !== 0 && value !== false;
|
2241
2241
|
};
|
2242
|
+
Helpers.isValueUndefined = function (value) {
|
2243
|
+
return (value === undefined || value === null) || (typeof value === "number" && isNaN(value));
|
2244
|
+
};
|
2242
2245
|
Helpers.isArrayContainsEqual = function (x, y) {
|
2243
2246
|
if (!Array.isArray(x) || !Array.isArray(y))
|
2244
2247
|
return false;
|
@@ -10187,9 +10190,6 @@ var base_Base = /** @class */ (function () {
|
|
10187
10190
|
return value.trim();
|
10188
10191
|
return value;
|
10189
10192
|
};
|
10190
|
-
Base.prototype.isPropertyEmpty = function (value) {
|
10191
|
-
return value !== "" && this.isValueEmpty(value);
|
10192
|
-
};
|
10193
10193
|
Base.createPropertiesHash = function () {
|
10194
10194
|
return {};
|
10195
10195
|
};
|
@@ -10400,11 +10400,11 @@ var base_Base = /** @class */ (function () {
|
|
10400
10400
|
*/
|
10401
10401
|
Base.prototype.getPropertyValue = function (name, defaultValue, calcFunc) {
|
10402
10402
|
var res = this.getPropertyValueWithoutDefault(name);
|
10403
|
-
if (this.
|
10403
|
+
if (this.isValueUndefined(res)) {
|
10404
10404
|
var locStr = this.localizableStrings ? this.localizableStrings[name] : undefined;
|
10405
10405
|
if (locStr)
|
10406
10406
|
return locStr.text;
|
10407
|
-
if (defaultValue
|
10407
|
+
if (!this.isValueUndefined(defaultValue))
|
10408
10408
|
return defaultValue;
|
10409
10409
|
if (!!calcFunc) {
|
10410
10410
|
var newVal = calcFunc();
|
@@ -10426,6 +10426,9 @@ var base_Base = /** @class */ (function () {
|
|
10426
10426
|
}
|
10427
10427
|
return res;
|
10428
10428
|
};
|
10429
|
+
Base.prototype.isValueUndefined = function (value) {
|
10430
|
+
return helpers_Helpers.isValueUndefined(value);
|
10431
|
+
};
|
10429
10432
|
Base.prototype.getDefaultPropertyValue = function (name) {
|
10430
10433
|
var prop = this.getPropertyByName(name);
|
10431
10434
|
if (!prop || prop.isCustom && this.isCreating)
|
@@ -10433,7 +10436,7 @@ var base_Base = /** @class */ (function () {
|
|
10433
10436
|
if (!!prop.defaultValueFunc)
|
10434
10437
|
return prop.defaultValueFunc(this);
|
10435
10438
|
var dValue = prop.getDefaultValue(this);
|
10436
|
-
if (!this.
|
10439
|
+
if (!this.isValueUndefined(dValue) && !Array.isArray(dValue))
|
10437
10440
|
return dValue;
|
10438
10441
|
var locStr = this.localizableStrings ? this.localizableStrings[name] : undefined;
|
10439
10442
|
if (locStr && locStr.localizationName)
|
@@ -12289,7 +12292,9 @@ var popup_PopupModel = /** @class */ (function (_super) {
|
|
12289
12292
|
};
|
12290
12293
|
PopupModel.prototype.updateDisplayMode = function (menuType) {
|
12291
12294
|
if (this.displayMode !== menuType) {
|
12292
|
-
|
12295
|
+
var isDropdown = menuType === "dropdown";
|
12296
|
+
this.setWidthByTarget = isDropdown;
|
12297
|
+
this.isFocusedContent = !isDropdown;
|
12293
12298
|
}
|
12294
12299
|
switch (menuType) {
|
12295
12300
|
case "dropdown": {
|
@@ -16528,6 +16533,7 @@ var Logger = /** @class */ (function () {
|
|
16528
16533
|
}());
|
16529
16534
|
|
16530
16535
|
function showConfirmDialog(message, callback, options) {
|
16536
|
+
if (options === void 0) { options = {}; }
|
16531
16537
|
var locStr = new localizablestring_LocalizableString(undefined);
|
16532
16538
|
var popupViewModel = settings.showDialog({
|
16533
16539
|
componentName: "sv-string-viewer",
|
@@ -17579,7 +17585,6 @@ var error_extends = (undefined && undefined.__extends) || (function () {
|
|
17579
17585
|
};
|
17580
17586
|
})();
|
17581
17587
|
|
17582
|
-
|
17583
17588
|
var AnswerRequiredError = /** @class */ (function (_super) {
|
17584
17589
|
error_extends(AnswerRequiredError, _super);
|
17585
17590
|
function AnswerRequiredError(text, errorOwner) {
|
@@ -17634,7 +17639,7 @@ var RequreNumericError = /** @class */ (function (_super) {
|
|
17634
17639
|
return RequreNumericError;
|
17635
17640
|
}(survey_error_SurveyError));
|
17636
17641
|
|
17637
|
-
var
|
17642
|
+
var ExceedSizeError = /** @class */ (function (_super) {
|
17638
17643
|
error_extends(ExceedSizeError, _super);
|
17639
17644
|
function ExceedSizeError(maxSize, errorOwner) {
|
17640
17645
|
if (errorOwner === void 0) { errorOwner = null; }
|
@@ -17647,7 +17652,7 @@ var error_ExceedSizeError = /** @class */ (function (_super) {
|
|
17647
17652
|
return "exceedsize";
|
17648
17653
|
};
|
17649
17654
|
ExceedSizeError.prototype.getDefaultText = function () {
|
17650
|
-
return
|
17655
|
+
return this.getLocalizationString("exceedMaxSize")["format"](this.getTextSize());
|
17651
17656
|
};
|
17652
17657
|
ExceedSizeError.prototype.getTextSize = function () {
|
17653
17658
|
var sizes = ["Bytes", "KB", "MB", "GB", "TB"];
|
@@ -17766,7 +17771,7 @@ var EachRowUniqueError = /** @class */ (function (_super) {
|
|
17766
17771
|
return EachRowUniqueError;
|
17767
17772
|
}(survey_error_SurveyError));
|
17768
17773
|
|
17769
|
-
var
|
17774
|
+
var MinRowCountError = /** @class */ (function (_super) {
|
17770
17775
|
error_extends(MinRowCountError, _super);
|
17771
17776
|
function MinRowCountError(minRowCount, errorOwner) {
|
17772
17777
|
if (errorOwner === void 0) { errorOwner = null; }
|
@@ -17778,7 +17783,7 @@ var error_MinRowCountError = /** @class */ (function (_super) {
|
|
17778
17783
|
return "minrowcounterror";
|
17779
17784
|
};
|
17780
17785
|
MinRowCountError.prototype.getDefaultText = function () {
|
17781
|
-
return
|
17786
|
+
return this.getLocalizationString("minRowCountError")["format"](this.minRowCount);
|
17782
17787
|
};
|
17783
17788
|
return MinRowCountError;
|
17784
17789
|
}(survey_error_SurveyError));
|
@@ -30549,11 +30554,14 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
30549
30554
|
this.runFuncForCellQuestions(function (q) { q.localeChanged(); });
|
30550
30555
|
};
|
30551
30556
|
QuestionMatrixDropdownModelBase.prototype.runFuncForCellQuestions = function (func) {
|
30552
|
-
|
30553
|
-
|
30554
|
-
|
30555
|
-
|
30556
|
-
|
30557
|
+
var rows = this.generatedVisibleRows;
|
30558
|
+
if (!!rows) {
|
30559
|
+
for (var i = 0; i < rows.length; i++) {
|
30560
|
+
var row = rows[i];
|
30561
|
+
if (row.isVisible) {
|
30562
|
+
for (var j = 0; j < row.cells.length; j++) {
|
30563
|
+
func(row.cells[j].question);
|
30564
|
+
}
|
30557
30565
|
}
|
30558
30566
|
}
|
30559
30567
|
}
|
@@ -31146,6 +31154,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
31146
31154
|
return [];
|
31147
31155
|
};
|
31148
31156
|
QuestionMatrixDropdownModelBase.prototype.getProgressInfo = function () {
|
31157
|
+
this.getIsRequireToGenerateRows() && this.generateVisibleRowsIfNeeded();
|
31149
31158
|
if (!!this.generatedVisibleRows)
|
31150
31159
|
return survey_element_SurveyElement.getProgressInfoByElements(this.getCellQuestions(), this.isRequired);
|
31151
31160
|
var res = base_Base.createProgressInfo();
|
@@ -31156,6 +31165,9 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
31156
31165
|
}
|
31157
31166
|
return res;
|
31158
31167
|
};
|
31168
|
+
QuestionMatrixDropdownModelBase.prototype.getIsRequireToGenerateRows = function () {
|
31169
|
+
return !!this.rowsVisibleIf;
|
31170
|
+
};
|
31159
31171
|
QuestionMatrixDropdownModelBase.prototype.updateProgressInfoByValues = function (res) { };
|
31160
31172
|
QuestionMatrixDropdownModelBase.prototype.updateProgressInfoByRow = function (res, rowValue) {
|
31161
31173
|
for (var i = 0; i < this.columns.length; i++) {
|
@@ -32134,6 +32146,15 @@ var question_matrixdropdown_QuestionMatrixDropdownModel = /** @class */ (functio
|
|
32134
32146
|
QuestionMatrixDropdownModel.prototype.getSearchableItemValueKeys = function (keys) {
|
32135
32147
|
keys.push("rows");
|
32136
32148
|
};
|
32149
|
+
QuestionMatrixDropdownModel.prototype.getIsRequireToGenerateRows = function () {
|
32150
|
+
if (_super.prototype.getIsRequireToGenerateRows.call(this))
|
32151
|
+
return true;
|
32152
|
+
for (var i = 0; i < this.rows.length; i++) {
|
32153
|
+
if (!!this.rows[i].visibleIf)
|
32154
|
+
return true;
|
32155
|
+
}
|
32156
|
+
return false;
|
32157
|
+
};
|
32137
32158
|
QuestionMatrixDropdownModel.prototype.updateProgressInfoByValues = function (res) {
|
32138
32159
|
var val = this.value;
|
32139
32160
|
if (!val)
|
@@ -33906,7 +33927,7 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
|
|
33906
33927
|
QuestionMatrixDynamicModel.prototype.onCheckForErrors = function (errors, isOnValueChanged, fireCallback) {
|
33907
33928
|
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged, fireCallback);
|
33908
33929
|
if (!isOnValueChanged && this.hasErrorInMinRows()) {
|
33909
|
-
errors.push(new
|
33930
|
+
errors.push(new MinRowCountError(this.minRowCount, this));
|
33910
33931
|
}
|
33911
33932
|
};
|
33912
33933
|
QuestionMatrixDynamicModel.prototype.hasErrorInMinRows = function () {
|
@@ -34626,6 +34647,8 @@ var defaultV2Css = {
|
|
34626
34647
|
imagepicker: {
|
34627
34648
|
mainRoot: "sd-element sd-question sd-row__question",
|
34628
34649
|
root: "sd-selectbase sd-imagepicker",
|
34650
|
+
rootResponsive: "sd-imagepicker--responsive",
|
34651
|
+
rootStatic: "sd-imagepicker--static",
|
34629
34652
|
rootColumn: "sd-imagepicker--column",
|
34630
34653
|
item: "sd-imagepicker__item",
|
34631
34654
|
itemOnError: "sd-imagepicker__item--error",
|
@@ -39450,11 +39473,13 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
39450
39473
|
});
|
39451
39474
|
PageModel.prototype.getElementsForRows = function () {
|
39452
39475
|
var _a;
|
39453
|
-
|
39454
|
-
|
39455
|
-
if (q
|
39456
|
-
|
39457
|
-
|
39476
|
+
if (!this.isStartPage) {
|
39477
|
+
var q = (_a = this.survey) === null || _a === void 0 ? void 0 : _a.currentSingleQuestion;
|
39478
|
+
if (!!q) {
|
39479
|
+
if (q.page === this)
|
39480
|
+
return [q];
|
39481
|
+
return [];
|
39482
|
+
}
|
39458
39483
|
}
|
39459
39484
|
return _super.prototype.getElementsForRows.call(this);
|
39460
39485
|
};
|
@@ -44442,7 +44467,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
44442
44467
|
if (goToFirstPage) {
|
44443
44468
|
this.currentPage = this.firstVisiblePage;
|
44444
44469
|
if (this.currentSingleQuestion) {
|
44445
|
-
var questions = this.
|
44470
|
+
var questions = this.getSingleQuestions();
|
44446
44471
|
this.currentSingleQuestion = questions.length > 0 ? questions[0] : undefined;
|
44447
44472
|
}
|
44448
44473
|
}
|
@@ -44751,10 +44776,13 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
44751
44776
|
return this.nextPage();
|
44752
44777
|
if (!q.validate(true))
|
44753
44778
|
return false;
|
44754
|
-
var questions = this.
|
44779
|
+
var questions = this.getSingleQuestions();
|
44755
44780
|
var index = questions.indexOf(q);
|
44756
44781
|
if (index < 0 || index === questions.length - 1)
|
44757
44782
|
return false;
|
44783
|
+
var key = {};
|
44784
|
+
key[q.name] = q.value;
|
44785
|
+
this.checkTriggers(key, false, false, true, q.name);
|
44758
44786
|
this.currentSingleQuestion = questions[index + 1];
|
44759
44787
|
return true;
|
44760
44788
|
};
|
@@ -44762,7 +44790,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
44762
44790
|
var q = this.currentSingleQuestion;
|
44763
44791
|
if (!q)
|
44764
44792
|
return this.prevPage();
|
44765
|
-
var questions = this.
|
44793
|
+
var questions = this.getSingleQuestions();
|
44766
44794
|
var index = questions.indexOf(q);
|
44767
44795
|
if (index === 0)
|
44768
44796
|
return false;
|
@@ -45344,11 +45372,22 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
45344
45372
|
});
|
45345
45373
|
this.updateButtonsVisibility();
|
45346
45374
|
};
|
45375
|
+
SurveyModel.prototype.getSingleQuestions = function () {
|
45376
|
+
var res = new Array();
|
45377
|
+
var pages = this.pages;
|
45378
|
+
for (var i = 0; i < pages.length; i++) {
|
45379
|
+
var p = pages[i];
|
45380
|
+
if (!p.isStartPage && p.isVisible) {
|
45381
|
+
p.addQuestionsToList(res, true);
|
45382
|
+
}
|
45383
|
+
}
|
45384
|
+
return res;
|
45385
|
+
};
|
45347
45386
|
Object.defineProperty(SurveyModel.prototype, "currentSingleQuestion", {
|
45348
45387
|
get: function () { return this.currentSingleQuestionValue; },
|
45349
45388
|
set: function (val) {
|
45350
45389
|
var oldVal = this.currentSingleQuestion;
|
45351
|
-
if (val !== oldVal) {
|
45390
|
+
if (val !== oldVal && !this.isCompleted) {
|
45352
45391
|
var options = !!val && !!oldVal ? this.createPageChangeEventOptions(val.page, oldVal.page, val, oldVal) : undefined;
|
45353
45392
|
if (!!options && !this.currentPageChangingFromOptions(options))
|
45354
45393
|
return;
|
@@ -45388,7 +45427,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
45388
45427
|
this.updatePagesContainer();
|
45389
45428
|
}
|
45390
45429
|
if (this.isSingleVisibleQuestion) {
|
45391
|
-
var questions = this.
|
45430
|
+
var questions = this.getSingleQuestions();
|
45392
45431
|
if (questions.length > 0) {
|
45393
45432
|
this.currentSingleQuestion = questions[0];
|
45394
45433
|
}
|
@@ -45484,7 +45523,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
45484
45523
|
var lVal = undefined;
|
45485
45524
|
var q = this.currentSingleQuestion;
|
45486
45525
|
if (!!q) {
|
45487
|
-
var questions = this.
|
45526
|
+
var questions = this.getSingleQuestions();
|
45488
45527
|
var index = questions.indexOf(q);
|
45489
45528
|
if (index >= 0) {
|
45490
45529
|
fVal = index === 0;
|
@@ -45664,6 +45703,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
45664
45703
|
this.startTimerFromUI();
|
45665
45704
|
this.onStarted.fire(this, {});
|
45666
45705
|
this.updateVisibleIndexes();
|
45706
|
+
this.currentPageNo = 0;
|
45667
45707
|
if (!!this.currentPage) {
|
45668
45708
|
this.currentPage.locStrsChanged();
|
45669
45709
|
}
|
@@ -46913,6 +46953,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
46913
46953
|
question.onSurveyValueChanged(newValue);
|
46914
46954
|
}
|
46915
46955
|
}
|
46956
|
+
this.updateProgressText(true);
|
46916
46957
|
this.fireOnValueChanged(valueName, newValue, !!questionName ? this.getQuestionByName(questionName) : undefined);
|
46917
46958
|
if (this.isDisposed)
|
46918
46959
|
return;
|
@@ -46986,8 +47027,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
46986
47027
|
}
|
46987
47028
|
return result;
|
46988
47029
|
};
|
46989
|
-
SurveyModel.prototype.checkTriggers = function (key, isOnNextPage, isOnComplete, name) {
|
47030
|
+
SurveyModel.prototype.checkTriggers = function (key, isOnNextPage, isOnComplete, isOnNavigation, name) {
|
46990
47031
|
if (isOnComplete === void 0) { isOnComplete = false; }
|
47032
|
+
if (isOnNavigation === void 0) { isOnNavigation = false; }
|
46991
47033
|
if (this.isCompleted || this.triggers.length == 0 || this.isDisplayMode)
|
46992
47034
|
return;
|
46993
47035
|
if (this.isTriggerIsRunning) {
|
@@ -47011,7 +47053,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
47011
47053
|
var trigger = this.triggers[i];
|
47012
47054
|
if (isQuestionInvalid && trigger.requireValidQuestion)
|
47013
47055
|
continue;
|
47014
|
-
|
47056
|
+
var options = { isOnNextPage: isOnNextPage, isOnComplete: isOnComplete, isOnNavigation: isOnNavigation,
|
47057
|
+
keys: this.triggerKeys, values: this.triggerValues, properties: properties };
|
47058
|
+
trigger.checkExpression(options);
|
47015
47059
|
}
|
47016
47060
|
if (prevCanBeCompleted !== this.canBeCompletedByTrigger) {
|
47017
47061
|
this.updateButtonsVisibility();
|
@@ -47022,7 +47066,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
47022
47066
|
var triggerKeys = {};
|
47023
47067
|
triggerKeys[name] = { newValue: newValue, oldValue: oldValue };
|
47024
47068
|
this.runConditionOnValueChanged(name, newValue);
|
47025
|
-
this.checkTriggers(triggerKeys, false, false, name);
|
47069
|
+
this.checkTriggers(triggerKeys, false, false, false, name);
|
47026
47070
|
};
|
47027
47071
|
Object.defineProperty(SurveyModel.prototype, "hasRequiredValidQuestionTrigger", {
|
47028
47072
|
get: function () {
|
@@ -52417,7 +52461,7 @@ var popup_view_model_PopupBaseViewModel = /** @class */ (function (_super) {
|
|
52417
52461
|
this.footerToolbarValue.setItems(footerActions);
|
52418
52462
|
};
|
52419
52463
|
PopupBaseViewModel.prototype.resetDimensionsAndPositionStyleProperties = function () {
|
52420
|
-
var nullableValue = "
|
52464
|
+
var nullableValue = "";
|
52421
52465
|
this.top = nullableValue;
|
52422
52466
|
this.left = nullableValue;
|
52423
52467
|
this.height = nullableValue;
|
@@ -53417,7 +53461,7 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
|
|
53417
53461
|
});
|
53418
53462
|
Object.defineProperty(DropdownListModel.prototype, "showHintString", {
|
53419
53463
|
get: function () {
|
53420
|
-
return !!this.question.searchEnabled && this.hintStringLC
|
53464
|
+
return !!this.question.searchEnabled && !!(this.hintStringLC || this.inputStringLC) ||
|
53421
53465
|
!this.question.searchEnabled && this.hintStringLC && this.question.isEmpty();
|
53422
53466
|
},
|
53423
53467
|
enumerable: false,
|
@@ -53631,8 +53675,7 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
|
|
53631
53675
|
};
|
53632
53676
|
DropdownListModel.prototype.onBlur = function (event) {
|
53633
53677
|
this.focused = false;
|
53634
|
-
if (this.popupModel.isVisible &&
|
53635
|
-
this._popupModel.show();
|
53678
|
+
if (this.popupModel.isVisible && this.popupModel.displayMode == "overlay") {
|
53636
53679
|
return;
|
53637
53680
|
}
|
53638
53681
|
doKey2ClickBlur(event);
|
@@ -58395,7 +58438,6 @@ var question_checkbox_QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
58395
58438
|
QuestionCheckboxModel.prototype.getSelectAllEnabled = function () {
|
58396
58439
|
if (!this.hasSelectAll)
|
58397
58440
|
return true;
|
58398
|
-
var items = this.activeChoices;
|
58399
58441
|
var visCount = this.getVisibleEnableItems().length;
|
58400
58442
|
var max = this.maxSelectedChoices;
|
58401
58443
|
if (max > 0 && max < visCount)
|
@@ -58404,10 +58446,10 @@ var question_checkbox_QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
58404
58446
|
};
|
58405
58447
|
QuestionCheckboxModel.prototype.getVisibleEnableItems = function () {
|
58406
58448
|
var res = new Array();
|
58407
|
-
var items = this.
|
58449
|
+
var items = this.visibleChoices;
|
58408
58450
|
for (var i = 0; i < items.length; i++) {
|
58409
58451
|
var item = items[i];
|
58410
|
-
if (item.isEnabled && item
|
58452
|
+
if (item.isEnabled && !this.isBuiltInChoice(item)) {
|
58411
58453
|
res.push(item);
|
58412
58454
|
}
|
58413
58455
|
}
|
@@ -58691,7 +58733,7 @@ var question_checkbox_QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
58691
58733
|
return [_super.prototype.valueFromData.call(this, val)];
|
58692
58734
|
var value = [];
|
58693
58735
|
for (var i = 0; i < val.length; i++) {
|
58694
|
-
var choiceitem = itemvalue_ItemValue.getItemByValue(this.
|
58736
|
+
var choiceitem = itemvalue_ItemValue.getItemByValue(this.visibleChoices, val[i]);
|
58695
58737
|
if (!!choiceitem) {
|
58696
58738
|
value.push(choiceitem.value);
|
58697
58739
|
}
|
@@ -59597,11 +59639,11 @@ var choices_DragDropChoices = /** @class */ (function (_super) {
|
|
59597
59639
|
dragOverChoice = this.parentElement.choices.filter(function (choice) { return "" + choice.value == dataAttributeValue; })[0];
|
59598
59640
|
return dragOverChoice;
|
59599
59641
|
};
|
59600
|
-
DragDropChoices.prototype.
|
59642
|
+
DragDropChoices.prototype.getChoices = function () {
|
59601
59643
|
var parent = this.parentElement;
|
59602
59644
|
if (parent.getType() === "ranking") {
|
59603
59645
|
if (parent.selectToRankEnabled) {
|
59604
|
-
return parent.
|
59646
|
+
return parent.unRankingChoices;
|
59605
59647
|
}
|
59606
59648
|
else {
|
59607
59649
|
return parent.rankingChoices;
|
@@ -59610,7 +59652,7 @@ var choices_DragDropChoices = /** @class */ (function (_super) {
|
|
59610
59652
|
return parent.visibleChoices;
|
59611
59653
|
};
|
59612
59654
|
DragDropChoices.prototype.isDropTargetValid = function (dropTarget, dropTargetNode) {
|
59613
|
-
var choices = this.
|
59655
|
+
var choices = this.getChoices();
|
59614
59656
|
if (this.parentElement.getType() !== "imagepicker") {
|
59615
59657
|
var dropTargetIndex = choices.indexOf(this.dropTarget);
|
59616
59658
|
var draggedElementIndex = choices.indexOf(this.draggedElement);
|
@@ -59637,7 +59679,7 @@ var choices_DragDropChoices = /** @class */ (function (_super) {
|
|
59637
59679
|
};
|
59638
59680
|
DragDropChoices.prototype.afterDragOver = function (dropTargetNode) {
|
59639
59681
|
//if (this.isDropTargetDoesntChanged(this.isBottom)) return;
|
59640
|
-
var choices = this.
|
59682
|
+
var choices = this.getChoices();
|
59641
59683
|
var dropTargetIndex = choices.indexOf(this.dropTarget);
|
59642
59684
|
var draggedElementIndex = choices.indexOf(this.draggedElement);
|
59643
59685
|
if (draggedElementIndex < dropTargetIndex && this.isBottom === true) {
|
@@ -59671,7 +59713,7 @@ var choices_DragDropChoices = /** @class */ (function (_super) {
|
|
59671
59713
|
};
|
59672
59714
|
DragDropChoices.prototype.doDrop = function () {
|
59673
59715
|
var choices = this.parentElement.choices;
|
59674
|
-
var filteredChoices = this.
|
59716
|
+
var filteredChoices = this.getChoices().filter(function (item) {
|
59675
59717
|
return choices.indexOf(item) !== -1;
|
59676
59718
|
});
|
59677
59719
|
var oldIndex = choices.indexOf(this.draggedElement);
|
@@ -59746,6 +59788,9 @@ var ranking_choices_DragDropRankingChoices = /** @class */ (function (_super) {
|
|
59746
59788
|
}
|
59747
59789
|
var node = _this.domAdapter.draggedElementShortcut.querySelector(".sv-ranking-item");
|
59748
59790
|
node.style.cursor = "not-allowed";
|
59791
|
+
if (IsTouch) {
|
59792
|
+
_this.parentElement.updateRankingChoices(true);
|
59793
|
+
}
|
59749
59794
|
};
|
59750
59795
|
return _this;
|
59751
59796
|
}
|
@@ -62321,7 +62366,7 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
|
|
62321
62366
|
var errorLength = this.errors ? this.errors.length : 0;
|
62322
62367
|
(files || []).forEach(function (file) {
|
62323
62368
|
if (_this.maxSize > 0 && file.size > _this.maxSize) {
|
62324
|
-
_this.errors.push(new
|
62369
|
+
_this.errors.push(new ExceedSizeError(_this.maxSize, _this));
|
62325
62370
|
}
|
62326
62371
|
});
|
62327
62372
|
return errorLength === this.errors.length;
|
@@ -62548,7 +62593,7 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
|
|
62548
62593
|
if (this.needConfirmRemoveFile) {
|
62549
62594
|
confirmActionAsync({
|
62550
62595
|
message: this.getConfirmRemoveMessage(data.name),
|
62551
|
-
funcOnYes: function () { _this.
|
62596
|
+
funcOnYes: function () { _this.removeFileCore(data); },
|
62552
62597
|
locale: this.getLocale(),
|
62553
62598
|
rootElement: this.survey.rootElement,
|
62554
62599
|
cssClass: this.cssClasses.confirmDialog
|
@@ -63726,21 +63771,13 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
63726
63771
|
});
|
63727
63772
|
Object.defineProperty(QuestionRatingModel.prototype, "ratingRootCss", {
|
63728
63773
|
get: function () {
|
63729
|
-
var
|
63730
|
-
this.cssClasses.rootWrappable : "";
|
63731
|
-
var rootClassModifier = "";
|
63732
|
-
if (this.hasMaxLabel || this.hasMinLabel) {
|
63733
|
-
if (this.rateDescriptionLocation == "top")
|
63734
|
-
rootClassModifier = this.cssClasses.rootLabelsTop;
|
63735
|
-
if (this.rateDescriptionLocation == "bottom")
|
63736
|
-
rootClassModifier = this.cssClasses.rootLabelsBottom;
|
63737
|
-
if (this.rateDescriptionLocation == "topBottom")
|
63738
|
-
rootClassModifier = this.cssClasses.rootLabelsDiagonal;
|
63739
|
-
}
|
63774
|
+
var hasLabel = this.hasMaxLabel || this.hasMinLabel;
|
63740
63775
|
return new CssClassBuilder()
|
63741
63776
|
.append(this.cssClasses.root)
|
63742
|
-
.append(
|
63743
|
-
.append(
|
63777
|
+
.append(this.cssClasses.rootWrappable, this.displayMode == "buttons" || (!!this.survey && this.survey.isDesignMode) || (this.displayMode == "auto" && !this.supportResponsiveness()))
|
63778
|
+
.append(this.cssClasses.rootLabelsTop, hasLabel && this.rateDescriptionLocation == "top")
|
63779
|
+
.append(this.cssClasses.rootLabelsBottom, hasLabel && this.rateDescriptionLocation == "bottom")
|
63780
|
+
.append(this.cssClasses.rootLabelsDiagonal, hasLabel && this.rateDescriptionLocation == "topBottom")
|
63744
63781
|
.append(this.cssClasses.itemSmall, this.itemSmallMode && this.rateType != "labels")
|
63745
63782
|
.toString();
|
63746
63783
|
},
|
@@ -63966,7 +64003,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
63966
64003
|
};
|
63967
64004
|
// TODO: return responsiveness after design improvement
|
63968
64005
|
QuestionRatingModel.prototype.supportResponsiveness = function () {
|
63969
|
-
return
|
64006
|
+
return !this.inMatrixMode;
|
63970
64007
|
};
|
63971
64008
|
QuestionRatingModel.prototype.onBeforeSetCompactRenderer = function () {
|
63972
64009
|
if (!this.dropdownListModelValue) {
|
@@ -64800,6 +64837,7 @@ var question_imagepicker_QuestionImagePickerModel = /** @class */ (function (_su
|
|
64800
64837
|
}
|
64801
64838
|
_this._width && _this.processResponsiveness(0, _this._width);
|
64802
64839
|
};
|
64840
|
+
_this.gridColCount = undefined;
|
64803
64841
|
_this.colCount = 0;
|
64804
64842
|
_this.registerPropertyChangedHandlers(["minImageWidth", "maxImageWidth", "minImageHeight", "maxImageHeight", "visibleChoices", "colCount", "isResponsiveValue"], function () {
|
64805
64843
|
if (!!_this._width) {
|
@@ -65078,7 +65116,13 @@ var question_imagepicker_QuestionImagePickerModel = /** @class */ (function (_su
|
|
65078
65116
|
this.addNewItemToVisibleChoices(items, isAddAll);
|
65079
65117
|
};
|
65080
65118
|
QuestionImagePickerModel.prototype.getSelectBaseRootCss = function () {
|
65081
|
-
|
65119
|
+
var isResponsive = this.isResponsive;
|
65120
|
+
return new CssClassBuilder()
|
65121
|
+
.append(_super.prototype.getSelectBaseRootCss.call(this))
|
65122
|
+
.append(this.cssClasses.rootResponsive, isResponsive)
|
65123
|
+
.append(this.cssClasses.rootStatic, !isResponsive)
|
65124
|
+
.append(this.cssClasses.rootColumn, this.getCurrentColCount() == 1)
|
65125
|
+
.toString();
|
65082
65126
|
};
|
65083
65127
|
Object.defineProperty(QuestionImagePickerModel.prototype, "isResponsive", {
|
65084
65128
|
get: function () {
|
@@ -65116,6 +65160,14 @@ var question_imagepicker_QuestionImagePickerModel = /** @class */ (function (_su
|
|
65116
65160
|
}
|
65117
65161
|
return this.responsiveColCount;
|
65118
65162
|
};
|
65163
|
+
QuestionImagePickerModel.prototype.getContainerStyle = function () {
|
65164
|
+
if (!this.isResponsive)
|
65165
|
+
return {};
|
65166
|
+
return {
|
65167
|
+
gridAutoFlow: !this.gridColCount ? "column" : null,
|
65168
|
+
gridTemplateColumns: this.gridColCount ? "repeat(" + this.gridColCount + ", 1fr)" : null
|
65169
|
+
};
|
65170
|
+
};
|
65119
65171
|
QuestionImagePickerModel.prototype.processResponsiveness = function (_, availableWidth) {
|
65120
65172
|
this._width = availableWidth = Math.floor(availableWidth);
|
65121
65173
|
var calcAvailableColumnsCount = function (availableWidth, minWidth, gap) {
|
@@ -65133,24 +65185,25 @@ var question_imagepicker_QuestionImagePickerModel = /** @class */ (function (_su
|
|
65133
65185
|
var minHeight = this.minImageHeight * this.imageScale;
|
65134
65186
|
var colCount = this.colCount;
|
65135
65187
|
var width_1;
|
65188
|
+
var availableColumnsCount = calcAvailableColumnsCount(availableWidth, minWidth, gap);
|
65136
65189
|
if (colCount === 0) {
|
65137
65190
|
if ((gap + minWidth) * itemsCount - gap > availableWidth) {
|
65138
|
-
|
65139
|
-
width_1 = Math.floor((availableWidth - gap * (itemsInRow - 1)) / itemsInRow);
|
65191
|
+
width_1 = Math.floor((availableWidth - gap * (availableColumnsCount - 1)) / availableColumnsCount);
|
65140
65192
|
}
|
65141
65193
|
else {
|
65142
65194
|
width_1 = Math.floor(((availableWidth - gap * (itemsCount - 1)) / itemsCount));
|
65143
65195
|
}
|
65196
|
+
this.gridColCount = Math.max(Math.min(itemsCount, availableColumnsCount), 1);
|
65144
65197
|
}
|
65145
65198
|
else {
|
65146
|
-
var availableColumnsCount = calcAvailableColumnsCount(availableWidth, minWidth, gap);
|
65147
65199
|
if (availableColumnsCount < colCount) {
|
65148
|
-
this.responsiveColCount = availableColumnsCount
|
65200
|
+
this.responsiveColCount = Math.max(availableColumnsCount, 1);
|
65149
65201
|
colCount = this.responsiveColCount;
|
65150
65202
|
}
|
65151
65203
|
else {
|
65152
65204
|
this.responsiveColCount = colCount;
|
65153
65205
|
}
|
65206
|
+
this.gridColCount = this.responsiveColCount;
|
65154
65207
|
width_1 = Math.floor((availableWidth - gap * (colCount - 1)) / colCount);
|
65155
65208
|
}
|
65156
65209
|
width_1 = Math.max(minWidth, Math.min(width_1, maxWidth));
|
@@ -65216,6 +65269,9 @@ var question_imagepicker_QuestionImagePickerModel = /** @class */ (function (_su
|
|
65216
65269
|
question_imagepicker_decorate([
|
65217
65270
|
jsonobject_property({})
|
65218
65271
|
], QuestionImagePickerModel.prototype, "responsiveColCount", void 0);
|
65272
|
+
question_imagepicker_decorate([
|
65273
|
+
jsonobject_property()
|
65274
|
+
], QuestionImagePickerModel.prototype, "gridColCount", void 0);
|
65219
65275
|
return QuestionImagePickerModel;
|
65220
65276
|
}(QuestionCheckboxBase));
|
65221
65277
|
|
@@ -70057,21 +70113,21 @@ var trigger_Trigger = /** @class */ (function (_super) {
|
|
70057
70113
|
Trigger.prototype.canBeExecutedOnComplete = function () {
|
70058
70114
|
return false;
|
70059
70115
|
};
|
70060
|
-
Trigger.prototype.checkExpression = function (
|
70061
|
-
|
70062
|
-
this.
|
70063
|
-
if (!this.canBeExecuted(isOnNextPage))
|
70116
|
+
Trigger.prototype.checkExpression = function (options) {
|
70117
|
+
this.isExecutingOnNextPage = options.isOnNextPage;
|
70118
|
+
this.isExecutingOnNavigation = options.isOnNavigation || options.isOnNextPage;
|
70119
|
+
if (!this.canBeExecuted(options.isOnNextPage))
|
70064
70120
|
return;
|
70065
|
-
if (isOnComplete && !this.canBeExecutedOnComplete())
|
70121
|
+
if (options.isOnComplete && !this.canBeExecutedOnComplete())
|
70066
70122
|
return;
|
70067
|
-
if (!this.isCheckRequired(keys))
|
70123
|
+
if (!this.isCheckRequired(options.keys))
|
70068
70124
|
return;
|
70069
70125
|
if (!!this.conditionRunner) {
|
70070
|
-
this.perform(values, properties);
|
70126
|
+
this.perform(options.values, options.properties || null);
|
70071
70127
|
}
|
70072
70128
|
else {
|
70073
70129
|
if (this.canSuccessOnEmptyExpression()) {
|
70074
|
-
this.triggerResult(true, values, properties);
|
70130
|
+
this.triggerResult(true, options.values, options.properties || null);
|
70075
70131
|
}
|
70076
70132
|
}
|
70077
70133
|
};
|
@@ -70269,7 +70325,7 @@ var trigger_SurveyTriggerComplete = /** @class */ (function (_super) {
|
|
70269
70325
|
configurable: true
|
70270
70326
|
});
|
70271
70327
|
SurveyTriggerComplete.prototype.isRealExecution = function () {
|
70272
|
-
return !settings.triggers.executeCompleteOnValueChanged === this.
|
70328
|
+
return !settings.triggers.executeCompleteOnValueChanged === this.isExecutingOnNavigation;
|
70273
70329
|
};
|
70274
70330
|
SurveyTriggerComplete.prototype.onSuccess = function (values, properties) {
|
70275
70331
|
if (!this.owner)
|
@@ -71880,8 +71936,8 @@ var mask_numeric_InputMaskNumeric = /** @class */ (function (_super) {
|
|
71880
71936
|
InputMaskNumeric.prototype.getType = function () {
|
71881
71937
|
return "numericmask";
|
71882
71938
|
};
|
71883
|
-
InputMaskNumeric.prototype.
|
71884
|
-
return value === "" ||
|
71939
|
+
InputMaskNumeric.prototype.isValueUndefined = function (value) {
|
71940
|
+
return value === "" || _super.prototype.isValueUndefined.call(this, value);
|
71885
71941
|
};
|
71886
71942
|
mask_numeric_decorate([
|
71887
71943
|
jsonobject_property()
|
@@ -72742,9 +72798,9 @@ Serializer.addClass("currencymask", [
|
|
72742
72798
|
|
72743
72799
|
var Version;
|
72744
72800
|
var ReleaseDate;
|
72745
|
-
Version = "" + "1.12.
|
72801
|
+
Version = "" + "1.12.26";
|
72746
72802
|
settings.version = Version;
|
72747
|
-
ReleaseDate = "" + "2025-
|
72803
|
+
ReleaseDate = "" + "2025-03-03";
|
72748
72804
|
function checkLibraryVersion(ver, libraryName) {
|
72749
72805
|
if (Version != ver) {
|
72750
72806
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
@@ -90800,7 +90856,7 @@ var imagepicker_SurveyQuestionImagePicker = /** @class */ (function (_super) {
|
|
90800
90856
|
});
|
90801
90857
|
SurveyQuestionImagePicker.prototype.renderElement = function () {
|
90802
90858
|
var cssClasses = this.question.cssClasses;
|
90803
|
-
return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("fieldset", { className: this.question.getSelectBaseRootCss() },
|
90859
|
+
return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("fieldset", { className: this.question.getSelectBaseRootCss(), style: this.question.getContainerStyle() },
|
90804
90860
|
external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("legend", { className: "sv-hidden" }, this.question.locTitle.renderedHtml),
|
90805
90861
|
this.question.hasColumns ? this.getColumns(cssClasses) : this.getItems(cssClasses)));
|
90806
90862
|
};
|