survey-react 1.12.36 → 1.12.37
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 -5
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- 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 +8 -0
- package/survey.react.js +74 -26
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +3 -3
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
@@ -421,9 +421,11 @@ declare module "packages/survey-core/src/expressions/expressions" {
|
|
421
421
|
hasFunction(): boolean;
|
422
422
|
hasAsyncFunction(): boolean;
|
423
423
|
addToAsyncList(list: Array<AsyncFunctionItem>): void;
|
424
|
+
addOperandsToList(list: Array<Operand>): void;
|
424
425
|
isEqual(op: Operand): boolean;
|
425
426
|
protected abstract isContentEqual(op: Operand): boolean;
|
426
427
|
protected areOperatorsEquals(op1: Operand, op2: Operand): boolean;
|
428
|
+
protected addChildrenToList(list: Array<Operand>): void;
|
427
429
|
}
|
428
430
|
export class BinaryOperand extends Operand {
|
429
431
|
private operatorName;
|
@@ -447,6 +449,7 @@ declare module "packages/survey-core/src/expressions/expressions" {
|
|
447
449
|
toString(func?: (op: Operand) => string): string;
|
448
450
|
setVariables(variables: Array<string>): void;
|
449
451
|
hasFunction(): boolean;
|
452
|
+
protected addChildrenToList(list: Array<Operand>): void;
|
450
453
|
hasAsyncFunction(): boolean;
|
451
454
|
addToAsyncList(list: Array<AsyncFunctionItem>): void;
|
452
455
|
}
|
@@ -461,6 +464,7 @@ declare module "packages/survey-core/src/expressions/expressions" {
|
|
461
464
|
toString(func?: (op: Operand) => string): string;
|
462
465
|
protected isContentEqual(op: Operand): boolean;
|
463
466
|
hasFunction(): boolean;
|
467
|
+
protected addChildrenToList(list: Array<Operand>): void;
|
464
468
|
hasAsyncFunction(): boolean;
|
465
469
|
addToAsyncList(list: Array<AsyncFunctionItem>): void;
|
466
470
|
evaluate(processValue?: ProcessValue): boolean;
|
@@ -474,6 +478,7 @@ declare module "packages/survey-core/src/expressions/expressions" {
|
|
474
478
|
evaluate(processValue?: ProcessValue): Array<any>;
|
475
479
|
setVariables(variables: Array<string>): void;
|
476
480
|
hasFunction(): boolean;
|
481
|
+
protected addChildrenToList(list: Array<Operand>): void;
|
477
482
|
hasAsyncFunction(): boolean;
|
478
483
|
addToAsyncList(list: Array<AsyncFunctionItem>): void;
|
479
484
|
protected isContentEqual(op: Operand): boolean;
|
@@ -519,6 +524,7 @@ declare module "packages/survey-core/src/expressions/expressions" {
|
|
519
524
|
isReady(proccessValue: ProcessValue): boolean;
|
520
525
|
private getAsynValue;
|
521
526
|
hasFunction(): boolean;
|
527
|
+
protected addChildrenToList(list: Array<Operand>): void;
|
522
528
|
hasAsyncFunction(): boolean;
|
523
529
|
private isAsyncFunction;
|
524
530
|
addToAsyncList(list: Array<AsyncFunctionItem>): void;
|
@@ -11899,6 +11905,8 @@ declare module "packages/survey-core/src/survey" {
|
|
11899
11905
|
* @see nextPage
|
11900
11906
|
*/
|
11901
11907
|
prevPage(): boolean;
|
11908
|
+
private doSkipOnPrevPage;
|
11909
|
+
private prevPageSingleElement;
|
11902
11910
|
/**
|
11903
11911
|
* Completes the survey if it currently displays the last page and the page contains no validation errors. If both these conditions are met, this method returns `true`; otherwise, `false`.
|
11904
11912
|
*
|
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.37
|
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
|
*/
|
@@ -5851,12 +5851,17 @@ var Operand = /** @class */ (function () {
|
|
5851
5851
|
};
|
5852
5852
|
Operand.prototype.hasAsyncFunction = function () { return false; };
|
5853
5853
|
Operand.prototype.addToAsyncList = function (list) { };
|
5854
|
+
Operand.prototype.addOperandsToList = function (list) {
|
5855
|
+
list.push(this);
|
5856
|
+
this.addChildrenToList(list);
|
5857
|
+
};
|
5854
5858
|
Operand.prototype.isEqual = function (op) {
|
5855
5859
|
return !!op && op.getType() === this.getType() && this.isContentEqual(op);
|
5856
5860
|
};
|
5857
5861
|
Operand.prototype.areOperatorsEquals = function (op1, op2) {
|
5858
5862
|
return !op1 && !op2 || !!op1 && op1.isEqual(op2);
|
5859
5863
|
};
|
5864
|
+
Operand.prototype.addChildrenToList = function (list) { };
|
5860
5865
|
Operand.counter = 1;
|
5861
5866
|
return Operand;
|
5862
5867
|
}());
|
@@ -5976,6 +5981,12 @@ var BinaryOperand = /** @class */ (function (_super) {
|
|
5976
5981
|
return ((!!this.left && this.left.hasFunction()) ||
|
5977
5982
|
(!!this.right && this.right.hasFunction()));
|
5978
5983
|
};
|
5984
|
+
BinaryOperand.prototype.addChildrenToList = function (list) {
|
5985
|
+
if (!!this.left)
|
5986
|
+
this.left.addOperandsToList(list);
|
5987
|
+
if (!!this.right)
|
5988
|
+
this.right.addOperandsToList(list);
|
5989
|
+
};
|
5979
5990
|
BinaryOperand.prototype.hasAsyncFunction = function () {
|
5980
5991
|
return ((!!this.left && this.left.hasAsyncFunction()) ||
|
5981
5992
|
(!!this.right && this.right.hasAsyncFunction()));
|
@@ -6036,6 +6047,9 @@ var UnaryOperand = /** @class */ (function (_super) {
|
|
6036
6047
|
UnaryOperand.prototype.hasFunction = function () {
|
6037
6048
|
return this.expression.hasFunction();
|
6038
6049
|
};
|
6050
|
+
UnaryOperand.prototype.addChildrenToList = function (list) {
|
6051
|
+
this.expression.addOperandsToList(list);
|
6052
|
+
};
|
6039
6053
|
UnaryOperand.prototype.hasAsyncFunction = function () {
|
6040
6054
|
return this.expression.hasAsyncFunction();
|
6041
6055
|
};
|
@@ -6090,6 +6104,11 @@ var ArrayOperand = /** @class */ (function (_super) {
|
|
6090
6104
|
ArrayOperand.prototype.hasFunction = function () {
|
6091
6105
|
return this.values.some(function (operand) { return operand.hasFunction(); });
|
6092
6106
|
};
|
6107
|
+
ArrayOperand.prototype.addChildrenToList = function (list) {
|
6108
|
+
this.values.forEach(function (el) {
|
6109
|
+
el.addOperandsToList(list);
|
6110
|
+
});
|
6111
|
+
};
|
6093
6112
|
ArrayOperand.prototype.hasAsyncFunction = function () {
|
6094
6113
|
return this.values.some(function (operand) { return operand.hasAsyncFunction(); });
|
6095
6114
|
};
|
@@ -6298,6 +6317,9 @@ var expressions_FunctionOperand = /** @class */ (function (_super) {
|
|
6298
6317
|
return proccessValue.asyncValues[this.id];
|
6299
6318
|
};
|
6300
6319
|
FunctionOperand.prototype.hasFunction = function () { return true; };
|
6320
|
+
FunctionOperand.prototype.addChildrenToList = function (list) {
|
6321
|
+
this.parameters.addOperandsToList(list);
|
6322
|
+
};
|
6301
6323
|
FunctionOperand.prototype.hasAsyncFunction = function () {
|
6302
6324
|
return this.isAsyncFunction() || this.parameters.hasAsyncFunction();
|
6303
6325
|
};
|
@@ -44525,6 +44547,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
44525
44547
|
this.isCompleted = false;
|
44526
44548
|
this.isCompletedBefore = false;
|
44527
44549
|
this.isLoading = false;
|
44550
|
+
this.skippedPages = [];
|
44528
44551
|
this.completedByTriggers = undefined;
|
44529
44552
|
if (clearData) {
|
44530
44553
|
this.setDataCore(null, true);
|
@@ -44861,20 +44884,14 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
44861
44884
|
keys = q.getValue();
|
44862
44885
|
}
|
44863
44886
|
}
|
44864
|
-
this.checkTriggers(keys,
|
44865
|
-
this.currentSingleElement
|
44887
|
+
this.checkTriggers(keys, true, false, true, q.name);
|
44888
|
+
if (q === this.currentSingleElement) {
|
44889
|
+
this.currentSingleElement = questions[index + 1];
|
44890
|
+
}
|
44866
44891
|
return true;
|
44867
44892
|
};
|
44868
44893
|
SurveyModel.prototype.performPrevious = function () {
|
44869
|
-
|
44870
|
-
if (!q)
|
44871
|
-
return this.prevPage();
|
44872
|
-
var questions = this.getSingleElements();
|
44873
|
-
var index = questions.indexOf(q);
|
44874
|
-
if (index === 0)
|
44875
|
-
return false;
|
44876
|
-
this.currentSingleElement = questions[index - 1];
|
44877
|
-
return true;
|
44894
|
+
return this.prevPage();
|
44878
44895
|
};
|
44879
44896
|
SurveyModel.prototype.hasErrorsOnNavigate = function (doComplete) {
|
44880
44897
|
var _this = this;
|
@@ -45170,22 +45187,46 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
45170
45187
|
* @see nextPage
|
45171
45188
|
*/
|
45172
45189
|
SurveyModel.prototype.prevPage = function () {
|
45173
|
-
var _this = this;
|
45174
|
-
if (this.currentSingleElement)
|
45175
|
-
return this.performPrevious();
|
45176
45190
|
if (this.isFirstPage || this.state === "starting")
|
45177
45191
|
return false;
|
45178
45192
|
this.resetNavigationButton();
|
45179
|
-
var
|
45180
|
-
if (
|
45181
|
-
|
45193
|
+
var curElement = this.currentSingleElement;
|
45194
|
+
if (this.doSkipOnPrevPage(curElement))
|
45195
|
+
return true;
|
45196
|
+
if (curElement)
|
45197
|
+
return this.prevPageSingleElement(curElement);
|
45198
|
+
var vPages = this.visiblePages;
|
45199
|
+
var index = vPages.indexOf(this.currentPage);
|
45200
|
+
this.currentPage = vPages[index - 1];
|
45201
|
+
return true;
|
45202
|
+
};
|
45203
|
+
SurveyModel.prototype.doSkipOnPrevPage = function (curElement) {
|
45204
|
+
var toEl = curElement || this.currentPage;
|
45205
|
+
var skipped = this.skippedPages.find(function (sp) { return sp.to === toEl; });
|
45206
|
+
var elTo = undefined;
|
45207
|
+
if (!!skipped) {
|
45182
45208
|
this.skippedPages.splice(this.skippedPages.indexOf(skipped), 1);
|
45209
|
+
var el = skipped.from;
|
45210
|
+
if (!el.isDisposed && el.isVisible) {
|
45211
|
+
elTo = el;
|
45212
|
+
}
|
45183
45213
|
}
|
45184
|
-
|
45185
|
-
|
45186
|
-
|
45187
|
-
|
45214
|
+
if (!!elTo) {
|
45215
|
+
if (!!curElement) {
|
45216
|
+
this.currentSingleElement = elTo;
|
45217
|
+
}
|
45218
|
+
else {
|
45219
|
+
this.currentPage = elTo;
|
45220
|
+
}
|
45188
45221
|
}
|
45222
|
+
return !!elTo;
|
45223
|
+
};
|
45224
|
+
SurveyModel.prototype.prevPageSingleElement = function (curElement) {
|
45225
|
+
var questions = this.getSingleElements();
|
45226
|
+
var index = questions.indexOf(curElement);
|
45227
|
+
if (index <= 0)
|
45228
|
+
return false;
|
45229
|
+
this.currentSingleElement = questions[index - 1];
|
45189
45230
|
return true;
|
45190
45231
|
};
|
45191
45232
|
/**
|
@@ -45543,6 +45584,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
45543
45584
|
SurveyModel.prototype.onQuestionsOnPageModeChanged = function (oldValue) {
|
45544
45585
|
if (this.isShowingPreview || this.isDesignMode)
|
45545
45586
|
return;
|
45587
|
+
this.skippedPages = [];
|
45546
45588
|
this.currentSingleElement = undefined;
|
45547
45589
|
if (oldValue === "singlePage") {
|
45548
45590
|
this.updatePagesContainer();
|
@@ -48944,7 +48986,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
48944
48986
|
if (oldQuestion === question)
|
48945
48987
|
return false;
|
48946
48988
|
this.focusingQuestionInfo = { question: question, onError: onError };
|
48947
|
-
|
48989
|
+
var curElement = this.currentSingleElement;
|
48990
|
+
this.skippedPages.push({ from: curElement || this.currentPage, to: curElement ? question : question.page });
|
48948
48991
|
var isNeedWaitForPageRendered = this.activePage !== question.page && !question.page.isStartPage;
|
48949
48992
|
if (isNeedWaitForPageRendered) {
|
48950
48993
|
this.currentPage = question.page;
|
@@ -55724,7 +55767,7 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
|
|
55724
55767
|
_this.updateRemainingCharacterCounter(event.target.value);
|
55725
55768
|
};
|
55726
55769
|
_this.readOnlyBlocker = function (event) {
|
55727
|
-
if (_this.isReadOnlyAttr) {
|
55770
|
+
if (_this.isReadOnlyAttr && ["color", "range"].indexOf(_this.inputType) > -1) {
|
55728
55771
|
event.preventDefault();
|
55729
55772
|
return true;
|
55730
55773
|
}
|
@@ -69263,6 +69306,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
69263
69306
|
cachedValues[question_paneldynamic_QuestionPanelDynamicItem.ParentItemVariableName] = this.parent.getValue();
|
69264
69307
|
}
|
69265
69308
|
this.isValueChangingInternally = true;
|
69309
|
+
var visibleIndex = 0;
|
69266
69310
|
for (var i = 0; i < panels.length; i++) {
|
69267
69311
|
var panel = panels[i];
|
69268
69312
|
var panelValues = this.getPanelItemData(panel.data);
|
@@ -69271,9 +69315,13 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
69271
69315
|
var panelName = question_paneldynamic_QuestionPanelDynamicItem.ItemVariableName;
|
69272
69316
|
newValues[panelName] = panelValues;
|
69273
69317
|
newValues[question_paneldynamic_QuestionPanelDynamicItem.IndexVariableName.toLowerCase()] = i;
|
69318
|
+
newValues[question_paneldynamic_QuestionPanelDynamicItem.VisibleIndexVariableName.toLowerCase()] = visibleIndex;
|
69274
69319
|
var newProps = helpers_Helpers.createCopy(properties);
|
69275
69320
|
newProps[panelName] = panel;
|
69276
69321
|
panel.runCondition(newValues, newProps);
|
69322
|
+
if (panel.isVisible) {
|
69323
|
+
visibleIndex++;
|
69324
|
+
}
|
69277
69325
|
}
|
69278
69326
|
this.isValueChangingInternally = false;
|
69279
69327
|
};
|
@@ -73093,9 +73141,9 @@ Serializer.addClass("currencymask", [
|
|
73093
73141
|
|
73094
73142
|
var Version;
|
73095
73143
|
var ReleaseDate;
|
73096
|
-
Version = "" + "1.12.
|
73144
|
+
Version = "" + "1.12.37";
|
73097
73145
|
settings.version = Version;
|
73098
|
-
ReleaseDate = "" + "2025-05-
|
73146
|
+
ReleaseDate = "" + "2025-05-20";
|
73099
73147
|
function checkLibraryVersion(ver, libraryName) {
|
73100
73148
|
if (Version != ver) {
|
73101
73149
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|