survey-react 1.12.28 → 1.12.29
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 +1 -1
- package/defaultV2.min.css +1 -1
- package/modern.css +1 -1
- package/modern.min.css +1 -1
- package/package.json +1 -1
- package/survey.css +1 -1
- package/survey.min.css +1 -1
- package/survey.react.d.ts +1 -0
- package/survey.react.js +36 -9
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +3 -3
package/defaultV2.css
CHANGED
package/defaultV2.min.css
CHANGED
package/modern.css
CHANGED
package/modern.min.css
CHANGED
package/package.json
CHANGED
package/survey.css
CHANGED
package/survey.min.css
CHANGED
package/survey.react.d.ts
CHANGED
@@ -4752,6 +4752,7 @@ declare module "packages/survey-core/src/question_baseselect" {
|
|
4752
4752
|
protected setQuestionComment(newValue: string): void;
|
4753
4753
|
private onUpdateCommentOnAutoOtherMode;
|
4754
4754
|
private setOtherValueInternally;
|
4755
|
+
private getValueOnSettingOther;
|
4755
4756
|
clearValue(keepComment?: boolean): void;
|
4756
4757
|
updateCommentFromSurvey(newValue: any): any;
|
4757
4758
|
get renderedValue(): any;
|
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.29
|
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
|
*/
|
@@ -45585,8 +45585,6 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
45585
45585
|
});
|
45586
45586
|
SurveyModel.prototype.updateIsFirstLastPageState = function () {
|
45587
45587
|
var curPage = this.currentPage;
|
45588
|
-
this.setPropertyValue("isFirstPage", !!curPage && curPage === this.firstVisiblePage);
|
45589
|
-
this.setPropertyValue("isLastPage", !!curPage && curPage === this.lastVisiblePage);
|
45590
45588
|
var fVal = undefined;
|
45591
45589
|
var lVal = undefined;
|
45592
45590
|
var q = this.currentSingleElement;
|
@@ -45598,6 +45596,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
45598
45596
|
lVal = index === questions.length - 1;
|
45599
45597
|
}
|
45600
45598
|
}
|
45599
|
+
this.setPropertyValue("isFirstPage", !!curPage && curPage === this.firstVisiblePage && (!q || fVal === true));
|
45600
|
+
this.setPropertyValue("isLastPage", !!curPage && curPage === this.lastVisiblePage && (!q || lVal === true));
|
45601
45601
|
this.setPropertyValue("isFirstElement", fVal);
|
45602
45602
|
this.setPropertyValue("isLastElement", lVal);
|
45603
45603
|
};
|
@@ -50380,11 +50380,30 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
50380
50380
|
this.isSettingComment = true;
|
50381
50381
|
this.otherValueCore = newValue;
|
50382
50382
|
if (this.isOtherSelected && !this.isRenderedValueSetting) {
|
50383
|
-
this.value = this.
|
50383
|
+
this.value = this.getValueOnSettingOther(newValue);
|
50384
50384
|
}
|
50385
50385
|
this.isSettingComment = false;
|
50386
50386
|
}
|
50387
50387
|
};
|
50388
|
+
QuestionSelectBase.prototype.getValueOnSettingOther = function (otherValue) {
|
50389
|
+
var val = this.rendredValueToData(this.renderedValue);
|
50390
|
+
if (this.showCommentArea || this.getStoreOthersAsComment())
|
50391
|
+
return val;
|
50392
|
+
var item = itemvalue_ItemValue.getItemByValue(this.visibleChoices, otherValue);
|
50393
|
+
if (!item || item === this.otherItem)
|
50394
|
+
return val;
|
50395
|
+
this.otherValueCore = "";
|
50396
|
+
if (!Array.isArray(val))
|
50397
|
+
return otherValue;
|
50398
|
+
var index = val.indexOf(this.otherItem.value);
|
50399
|
+
if (index > -1) {
|
50400
|
+
val.splice(index, 1);
|
50401
|
+
}
|
50402
|
+
if (val.indexOf(otherValue) < 0) {
|
50403
|
+
val.push(otherValue);
|
50404
|
+
}
|
50405
|
+
return val;
|
50406
|
+
};
|
50388
50407
|
QuestionSelectBase.prototype.clearValue = function (keepComment) {
|
50389
50408
|
_super.prototype.clearValue.call(this, keepComment);
|
50390
50409
|
this.prevOtherValue = undefined;
|
@@ -63615,10 +63634,10 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
63615
63634
|
return null;
|
63616
63635
|
var value = item.value;
|
63617
63636
|
var description;
|
63618
|
-
if (
|
63637
|
+
if (index === 0) {
|
63619
63638
|
description = this.minRateDescription && this.locMinRateDescription;
|
63620
63639
|
}
|
63621
|
-
if (
|
63640
|
+
if (index === (this.rateCount - 1)) {
|
63622
63641
|
description = this.maxRateDescription && this.locMaxRateDescription;
|
63623
63642
|
}
|
63624
63643
|
var newItem = new RatingItemValue(value, item.text, description);
|
@@ -67065,12 +67084,20 @@ var question_paneldynamic_QuestionPanelDynamicItem = /** @class */ (function ()
|
|
67065
67084
|
return;
|
67066
67085
|
this.data.setPanelItemData(this, name, helpers_Helpers.getUnbindValue(newValue));
|
67067
67086
|
var questions = this.panel.questions;
|
67068
|
-
var triggerName = QuestionPanelDynamicItem.ItemVariableName + "." + name;
|
67069
67087
|
for (var i = 0; i < questions.length; i++) {
|
67070
67088
|
var q = questions[i];
|
67071
67089
|
if (q.getValueName() !== name) {
|
67072
67090
|
q.checkBindings(name, newValue);
|
67073
67091
|
}
|
67092
|
+
var suffix = settings.commentSuffix;
|
67093
|
+
if (name.endsWith(suffix)) {
|
67094
|
+
name = name.substring(0, name.length - suffix.length);
|
67095
|
+
var cQ = this.panel.getQuestionByName(name);
|
67096
|
+
if (!!cQ) {
|
67097
|
+
newValue = cQ.value;
|
67098
|
+
}
|
67099
|
+
}
|
67100
|
+
var triggerName = QuestionPanelDynamicItem.ItemVariableName + "." + name;
|
67074
67101
|
q.runTriggers(triggerName, newValue);
|
67075
67102
|
}
|
67076
67103
|
};
|
@@ -72876,9 +72903,9 @@ Serializer.addClass("currencymask", [
|
|
72876
72903
|
|
72877
72904
|
var Version;
|
72878
72905
|
var ReleaseDate;
|
72879
|
-
Version = "" + "1.12.
|
72906
|
+
Version = "" + "1.12.29";
|
72880
72907
|
settings.version = Version;
|
72881
|
-
ReleaseDate = "" + "2025-03-
|
72908
|
+
ReleaseDate = "" + "2025-03-24";
|
72882
72909
|
function checkLibraryVersion(ver, libraryName) {
|
72883
72910
|
if (Version != ver) {
|
72884
72911
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|