survey-react 1.12.38 → 1.12.40
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 +4 -2
- package/survey.react.js +74 -61
- 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
@@ -373,7 +373,6 @@ declare module "packages/survey-core/src/conditionProcessValue" {
|
|
373
373
|
private getValueFromSurvey;
|
374
374
|
private getValueFromValues;
|
375
375
|
private getNonNestedObject;
|
376
|
-
private getNonNestedObjectCore;
|
377
376
|
private getObjInArray;
|
378
377
|
private getFirstPropertyName;
|
379
378
|
private getObjectValue;
|
@@ -6054,7 +6053,9 @@ declare module "packages/survey-core/src/question_matrixdropdownrendered" {
|
|
6054
6053
|
get showFooter(): boolean;
|
6055
6054
|
get hasFooter(): boolean;
|
6056
6055
|
get hasRemoveRows(): boolean;
|
6056
|
+
private isRequireResetValue;
|
6057
6057
|
isRequireReset(): boolean;
|
6058
|
+
requireReset(): void;
|
6058
6059
|
get headerRow(): QuestionMatrixDropdownRenderedRow;
|
6059
6060
|
get footerRow(): QuestionMatrixDropdownRenderedRow;
|
6060
6061
|
get isRowsDragAndDrop(): boolean;
|
@@ -14157,6 +14158,7 @@ declare module "packages/survey-core/src/question" {
|
|
14157
14158
|
protected getDefaultRunner(runner: ExpressionRunner, expression: string): ExpressionRunner;
|
14158
14159
|
protected setDefaultValue(): void;
|
14159
14160
|
private setDefaultValueCore;
|
14161
|
+
protected updateValueWithDefaultsOrClear(): void;
|
14160
14162
|
protected isValueExpression(val: any): boolean;
|
14161
14163
|
protected setValueAndRunExpression(runner: ExpressionRunner, defaultValue: any, setFunc: (val: any) => void, values?: HashTable<any>, properties?: HashTable<any>): void;
|
14162
14164
|
protected convertFuncValuetoQuestionValue(val: any): any;
|
@@ -14894,7 +14896,7 @@ declare module "packages/survey-core/src/question_matrixdropdownbase" {
|
|
14894
14896
|
private get renderedTableValue();
|
14895
14897
|
private set renderedTableValue(value);
|
14896
14898
|
protected clearRowsAndResetRenderedTable(): void;
|
14897
|
-
resetRenderedTable(): void;
|
14899
|
+
resetRenderedTable(columnVisibilityChanged?: boolean): void;
|
14898
14900
|
protected clearGeneratedRows(): void;
|
14899
14901
|
protected get isRendredTableCreated(): boolean;
|
14900
14902
|
get renderedTable(): QuestionMatrixDropdownRenderedTable;
|
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.40
|
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
|
*/
|
@@ -1852,7 +1852,7 @@ __webpack_require__.d(__webpack_exports__, "ProgressButtonsResponsivityManager",
|
|
1852
1852
|
__webpack_require__.d(__webpack_exports__, "SurveyModel", function() { return /* reexport */ survey_SurveyModel; });
|
1853
1853
|
__webpack_require__.d(__webpack_exports__, "SurveyTrigger", function() { return /* reexport */ SurveyTrigger; });
|
1854
1854
|
__webpack_require__.d(__webpack_exports__, "SurveyTriggerComplete", function() { return /* reexport */ trigger_SurveyTriggerComplete; });
|
1855
|
-
__webpack_require__.d(__webpack_exports__, "SurveyTriggerSetValue", function() { return /* reexport */
|
1855
|
+
__webpack_require__.d(__webpack_exports__, "SurveyTriggerSetValue", function() { return /* reexport */ trigger_SurveyTriggerSetValue; });
|
1856
1856
|
__webpack_require__.d(__webpack_exports__, "SurveyTriggerVisible", function() { return /* reexport */ SurveyTriggerVisible; });
|
1857
1857
|
__webpack_require__.d(__webpack_exports__, "SurveyTriggerCopyValue", function() { return /* reexport */ SurveyTriggerCopyValue; });
|
1858
1858
|
__webpack_require__.d(__webpack_exports__, "SurveyTriggerRunExpression", function() { return /* reexport */ trigger_SurveyTriggerRunExpression; });
|
@@ -5214,59 +5214,46 @@ var conditionProcessValue_ProcessValue = /** @class */ (function () {
|
|
5214
5214
|
res.value = 0;
|
5215
5215
|
res.hasValue = true;
|
5216
5216
|
}
|
5217
|
-
var
|
5218
|
-
if (!
|
5217
|
+
var obj = this.getNonNestedObject(curValue, text, false);
|
5218
|
+
if (!obj)
|
5219
5219
|
return res;
|
5220
|
-
res.path =
|
5221
|
-
res.value = !!
|
5222
|
-
? this.getObjectValue(nonNestedObj.value, nonNestedObj.text)
|
5223
|
-
: nonNestedObj.value;
|
5220
|
+
res.path = obj.path;
|
5221
|
+
res.value = !!obj.text ? this.getObjectValue(obj.value, obj.text) : obj.value;
|
5224
5222
|
res.hasValue = !helpers_Helpers.isValueEmpty(res.value);
|
5225
5223
|
return res;
|
5226
5224
|
};
|
5227
5225
|
ProcessValue.prototype.getNonNestedObject = function (obj, text, createPath) {
|
5228
|
-
var
|
5229
|
-
var
|
5230
|
-
var res = this.getNonNestedObjectCore(obj, text, createPath, checkedKeys);
|
5231
|
-
while (!res && len < checkedKeys.length) {
|
5232
|
-
len = checkedKeys.length;
|
5233
|
-
res = this.getNonNestedObjectCore(obj, text, createPath, checkedKeys);
|
5234
|
-
}
|
5235
|
-
return res;
|
5236
|
-
};
|
5237
|
-
ProcessValue.prototype.getNonNestedObjectCore = function (obj, text, createPath, checkedKeys) {
|
5238
|
-
var curName = this.getFirstPropertyName(text, obj, createPath, checkedKeys);
|
5239
|
-
if (!!curName) {
|
5240
|
-
checkedKeys.push(curName);
|
5241
|
-
}
|
5226
|
+
var curName = this.getFirstPropertyName(text, obj, createPath);
|
5227
|
+
var curObj = obj;
|
5242
5228
|
var path = !!curName ? [curName] : null;
|
5243
|
-
|
5244
|
-
|
5229
|
+
var curText = text;
|
5230
|
+
while (curText != curName && !!curObj) {
|
5231
|
+
var isArray = curText[0] == "[";
|
5245
5232
|
if (!isArray) {
|
5246
|
-
if (!curName &&
|
5233
|
+
if (!curName && curText === this.getFirstName(curText))
|
5247
5234
|
return { value: obj, text: text, path: path };
|
5248
|
-
|
5249
|
-
if (helpers_Helpers.isValueEmpty(
|
5235
|
+
curObj = this.getObjectValue(curObj, curName);
|
5236
|
+
if (helpers_Helpers.isValueEmpty(curObj) && !createPath)
|
5250
5237
|
return null;
|
5251
|
-
|
5238
|
+
curText = curText.substring(curName.length);
|
5252
5239
|
}
|
5253
5240
|
else {
|
5254
|
-
var objInArray = this.getObjInArray(
|
5241
|
+
var objInArray = this.getObjInArray(curObj, curText);
|
5255
5242
|
if (!objInArray)
|
5256
5243
|
return null;
|
5257
|
-
|
5258
|
-
|
5244
|
+
curObj = objInArray.value;
|
5245
|
+
curText = objInArray.text;
|
5259
5246
|
path.push(objInArray.index);
|
5260
5247
|
}
|
5261
|
-
if (!!
|
5262
|
-
|
5248
|
+
if (!!curText && curText[0] == ".") {
|
5249
|
+
curText = curText.substring(1);
|
5263
5250
|
}
|
5264
|
-
curName = this.getFirstPropertyName(
|
5251
|
+
curName = this.getFirstPropertyName(curText, curObj, createPath);
|
5265
5252
|
if (!!curName) {
|
5266
5253
|
path.push(curName);
|
5267
5254
|
}
|
5268
5255
|
}
|
5269
|
-
return { value:
|
5256
|
+
return { value: curObj, text: curText, path: path };
|
5270
5257
|
};
|
5271
5258
|
ProcessValue.prototype.getObjInArray = function (curValue, text) {
|
5272
5259
|
if (!Array.isArray(curValue))
|
@@ -5283,11 +5270,10 @@ var conditionProcessValue_ProcessValue = /** @class */ (function () {
|
|
5283
5270
|
return null;
|
5284
5271
|
return { value: curValue[index], text: text, index: index };
|
5285
5272
|
};
|
5286
|
-
ProcessValue.prototype.getFirstPropertyName = function (name, obj, createProp
|
5273
|
+
ProcessValue.prototype.getFirstPropertyName = function (name, obj, createProp) {
|
5287
5274
|
if (createProp === void 0) { createProp = false; }
|
5288
|
-
if (checkedKeys === void 0) { checkedKeys = undefined; }
|
5289
5275
|
if (!name)
|
5290
|
-
return
|
5276
|
+
return "";
|
5291
5277
|
if (!obj)
|
5292
5278
|
obj = {};
|
5293
5279
|
if (obj.hasOwnProperty(name))
|
@@ -5295,9 +5281,8 @@ var conditionProcessValue_ProcessValue = /** @class */ (function () {
|
|
5295
5281
|
var nameInLow = name.toLowerCase();
|
5296
5282
|
var A = nameInLow[0];
|
5297
5283
|
var a = A.toUpperCase();
|
5284
|
+
var keyWithDot = "";
|
5298
5285
|
for (var key in obj) {
|
5299
|
-
if (Array.isArray(checkedKeys) && checkedKeys.indexOf(key) > -1)
|
5300
|
-
continue;
|
5301
5286
|
var first = key[0];
|
5302
5287
|
if (first === a || first === A) {
|
5303
5288
|
var keyName = key.toLowerCase();
|
@@ -5308,10 +5293,15 @@ var conditionProcessValue_ProcessValue = /** @class */ (function () {
|
|
5308
5293
|
var ch = nameInLow[keyName.length];
|
5309
5294
|
if (ch != "." && ch != "[")
|
5310
5295
|
continue;
|
5311
|
-
if (keyName == nameInLow.substring(0, keyName.length))
|
5312
|
-
|
5296
|
+
if (keyName == nameInLow.substring(0, keyName.length)) {
|
5297
|
+
if (keyWithDot.length < key.length) {
|
5298
|
+
keyWithDot = key;
|
5299
|
+
}
|
5300
|
+
}
|
5313
5301
|
}
|
5314
5302
|
}
|
5303
|
+
if (keyWithDot)
|
5304
|
+
return keyWithDot;
|
5315
5305
|
if (createProp && name[0] !== "[") {
|
5316
5306
|
var ind = name.indexOf(".");
|
5317
5307
|
if (ind > -1) {
|
@@ -19056,8 +19046,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
19056
19046
|
_this.createLocalizableString("requiredErrorText", _this);
|
19057
19047
|
_this.addTriggerInfo("resetValueIf", function () { return !_this.isEmpty(); }, function () {
|
19058
19048
|
_this.startSetValueOnExpression();
|
19059
|
-
_this.
|
19060
|
-
_this.updateValueWithDefaults();
|
19049
|
+
_this.updateValueWithDefaultsOrClear();
|
19061
19050
|
_this.finishSetValueOnExpression();
|
19062
19051
|
});
|
19063
19052
|
var setValueIfInfo = _this.addTriggerInfo("setValueIf", function () { return true; }, function () { return _this.runSetValueExpression(); });
|
@@ -21466,6 +21455,16 @@ var question_Question = /** @class */ (function (_super) {
|
|
21466
21455
|
this.defaultValueRunner = this.getDefaultRunner(this.defaultValueRunner, this.defaultValueExpression);
|
21467
21456
|
this.setValueAndRunExpression(this.defaultValueRunner, this.getUnbindValue(this.defaultValue), function (val) { return func(val); });
|
21468
21457
|
};
|
21458
|
+
Question.prototype.updateValueWithDefaultsOrClear = function () {
|
21459
|
+
if (this.isDesignMode || this.isLoadingFromJson)
|
21460
|
+
return;
|
21461
|
+
if (this.isDefaultValueEmpty()) {
|
21462
|
+
this.clearValue();
|
21463
|
+
}
|
21464
|
+
else {
|
21465
|
+
this.setDefaultValue();
|
21466
|
+
}
|
21467
|
+
};
|
21469
21468
|
Question.prototype.isValueExpression = function (val) {
|
21470
21469
|
return !!val && typeof val == "string" && val.length > 0 && val[0] == "=";
|
21471
21470
|
};
|
@@ -28298,8 +28297,10 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable = /** @c
|
|
28298
28297
|
configurable: true
|
28299
28298
|
});
|
28300
28299
|
QuestionMatrixDropdownRenderedTable.prototype.isRequireReset = function () {
|
28301
|
-
return
|
28302
|
-
|
28300
|
+
return this.isRequireResetValue || this.hasRemoveRows != this.matrix.canRemoveRows || !this.matrix.isColumnLayoutHorizontal;
|
28301
|
+
};
|
28302
|
+
QuestionMatrixDropdownRenderedTable.prototype.requireReset = function () {
|
28303
|
+
this.isRequireResetValue = true;
|
28303
28304
|
};
|
28304
28305
|
Object.defineProperty(QuestionMatrixDropdownRenderedTable.prototype, "headerRow", {
|
28305
28306
|
get: function () {
|
@@ -30404,11 +30405,18 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
30404
30405
|
this.fireCallback(this.columnsChangedCallback);
|
30405
30406
|
};
|
30406
30407
|
//For internal use
|
30407
|
-
QuestionMatrixDropdownModelBase.prototype.resetRenderedTable = function () {
|
30408
|
-
if (this.
|
30408
|
+
QuestionMatrixDropdownModelBase.prototype.resetRenderedTable = function (columnVisibilityChanged) {
|
30409
|
+
if (!this.renderedTableValue)
|
30409
30410
|
return;
|
30410
|
-
this.
|
30411
|
-
|
30411
|
+
if (this.lockResetRenderedTable || this.isUpdateLocked) {
|
30412
|
+
if (columnVisibilityChanged) {
|
30413
|
+
this.renderedTableValue.requireReset();
|
30414
|
+
}
|
30415
|
+
}
|
30416
|
+
else {
|
30417
|
+
this.renderedTableValue = null;
|
30418
|
+
this.fireCallback(this.onRenderedTableResetCallback);
|
30419
|
+
}
|
30412
30420
|
};
|
30413
30421
|
QuestionMatrixDropdownModelBase.prototype.clearGeneratedRows = function () {
|
30414
30422
|
this.clearVisibleRows();
|
@@ -30760,7 +30768,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
30760
30768
|
hasChanged = this.isColumnVisibilityChanged(column, isCellsVisibilty) || hasChanged;
|
30761
30769
|
}
|
30762
30770
|
if (hasChanged) {
|
30763
|
-
this.resetRenderedTable();
|
30771
|
+
this.resetRenderedTable(true);
|
30764
30772
|
}
|
30765
30773
|
};
|
30766
30774
|
QuestionMatrixDropdownModelBase.prototype.checkColumnsRenderedRequired = function () {
|
@@ -66717,11 +66725,16 @@ var question_signaturepad_QuestionSignaturePadModel = /** @class */ (function (_
|
|
66717
66725
|
QuestionSignaturePadModel.prototype.fromDataUrl = function (data) {
|
66718
66726
|
this._loadedData = data;
|
66719
66727
|
if (this.signaturePad) {
|
66720
|
-
var
|
66721
|
-
var
|
66728
|
+
var ratio = 1;
|
66729
|
+
var scale = this.scale;
|
66730
|
+
if (this.dataFormat === "svg") {
|
66731
|
+
var devicePixelRatio_1 = DomWindowHelper.getDevicePixelRatio();
|
66732
|
+
ratio = devicePixelRatio_1 || 1;
|
66733
|
+
scale = 1;
|
66734
|
+
}
|
66722
66735
|
var options = {
|
66723
|
-
width: this.canvas.width *
|
66724
|
-
height: this.canvas.height *
|
66736
|
+
width: this.canvas.width * scale / ratio,
|
66737
|
+
height: this.canvas.height * scale / ratio
|
66725
66738
|
};
|
66726
66739
|
this.signaturePad.fromDataURL(data, options);
|
66727
66740
|
}
|
@@ -70758,7 +70771,7 @@ var trigger_SurveyTriggerComplete = /** @class */ (function (_super) {
|
|
70758
70771
|
/**
|
70759
70772
|
* If expression returns true, the value from property **setValue** will be set to **setToName**
|
70760
70773
|
*/
|
70761
|
-
var
|
70774
|
+
var trigger_SurveyTriggerSetValue = /** @class */ (function (_super) {
|
70762
70775
|
trigger_extends(SurveyTriggerSetValue, _super);
|
70763
70776
|
function SurveyTriggerSetValue() {
|
70764
70777
|
return _super.call(this) || this;
|
@@ -70811,7 +70824,7 @@ var SurveyTriggerSetValue = /** @class */ (function (_super) {
|
|
70811
70824
|
SurveyTriggerSetValue.prototype.onSuccess = function (values, properties) {
|
70812
70825
|
if (!this.setToName || !this.owner)
|
70813
70826
|
return;
|
70814
|
-
this.owner.setTriggerValue(this.setToName, this.setValue, this.isVariable);
|
70827
|
+
this.owner.setTriggerValue(this.setToName, helpers_Helpers.getUnbindValue(this.setValue), this.isVariable);
|
70815
70828
|
};
|
70816
70829
|
return SurveyTriggerSetValue;
|
70817
70830
|
}(SurveyTrigger));
|
@@ -70990,7 +71003,7 @@ Serializer.addClass("setvaluetrigger", [
|
|
70990
71003
|
},
|
70991
71004
|
{ name: "isVariable:boolean", visible: false },
|
70992
71005
|
], function () {
|
70993
|
-
return new
|
71006
|
+
return new trigger_SurveyTriggerSetValue();
|
70994
71007
|
}, "surveytrigger");
|
70995
71008
|
Serializer.addClass("copyvaluetrigger", [{ name: "!fromName:questionvalue" }, { name: "!setToName:questionvalue" },
|
70996
71009
|
{ name: "copyDisplayValue:boolean", visible: false }], function () {
|
@@ -73226,9 +73239,9 @@ Serializer.addClass("currencymask", [
|
|
73226
73239
|
|
73227
73240
|
var Version;
|
73228
73241
|
var ReleaseDate;
|
73229
|
-
Version = "" + "1.12.
|
73242
|
+
Version = "" + "1.12.40";
|
73230
73243
|
settings.version = Version;
|
73231
|
-
ReleaseDate = "" + "2025-
|
73244
|
+
ReleaseDate = "" + "2025-06-10";
|
73232
73245
|
function checkLibraryVersion(ver, libraryName) {
|
73233
73246
|
if (Version != ver) {
|
73234
73247
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
@@ -81508,7 +81521,7 @@ var slovakSurveyStrings = {
|
|
81508
81521
|
ok: "OK",
|
81509
81522
|
cancel: "Zrušiť"
|
81510
81523
|
};
|
81511
|
-
setupLocale({ localeCode: "sk", strings: slovakSurveyStrings, nativeName: "
|
81524
|
+
setupLocale({ localeCode: "sk", strings: slovakSurveyStrings, nativeName: "Slovenčina", englishName: "Slovak" });
|
81512
81525
|
// The following strings have been translated by a machine translation service
|
81513
81526
|
// Remove those strings that you have corrected manually
|
81514
81527
|
// indexText: "{0} of {1}" => "{0} {1}"
|