survey-react 1.12.38 → 1.12.39
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 -1
- package/survey.react.js +44 -45
- 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;
|
@@ -14157,6 +14156,7 @@ declare module "packages/survey-core/src/question" {
|
|
14157
14156
|
protected getDefaultRunner(runner: ExpressionRunner, expression: string): ExpressionRunner;
|
14158
14157
|
protected setDefaultValue(): void;
|
14159
14158
|
private setDefaultValueCore;
|
14159
|
+
protected updateValueWithDefaultsOrClear(): void;
|
14160
14160
|
protected isValueExpression(val: any): boolean;
|
14161
14161
|
protected setValueAndRunExpression(runner: ExpressionRunner, defaultValue: any, setFunc: (val: any) => void, values?: HashTable<any>, properties?: HashTable<any>): void;
|
14162
14162
|
protected convertFuncValuetoQuestionValue(val: any): 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.39
|
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
|
*/
|
@@ -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
|
};
|
@@ -73226,9 +73225,9 @@ Serializer.addClass("currencymask", [
|
|
73226
73225
|
|
73227
73226
|
var Version;
|
73228
73227
|
var ReleaseDate;
|
73229
|
-
Version = "" + "1.12.
|
73228
|
+
Version = "" + "1.12.39";
|
73230
73229
|
settings.version = Version;
|
73231
|
-
ReleaseDate = "" + "2025-
|
73230
|
+
ReleaseDate = "" + "2025-06-03";
|
73232
73231
|
function checkLibraryVersion(ver, libraryName) {
|
73233
73232
|
if (Version != ver) {
|
73234
73233
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|