survey-react-ui 1.9.125 → 1.9.127
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/survey-react-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.9.
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.9.127
|
|
3
3
|
* Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
@@ -420,6 +420,20 @@ var Base = /** @class */ (function () {
|
|
|
420
420
|
}
|
|
421
421
|
return _helpers__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isValueEmpty(value);
|
|
422
422
|
};
|
|
423
|
+
Base.prototype.equals = function (obj) {
|
|
424
|
+
if (!obj)
|
|
425
|
+
return false;
|
|
426
|
+
if (this.isDisposed || obj.isDisposed)
|
|
427
|
+
return false;
|
|
428
|
+
if (this.getType() != obj.getType())
|
|
429
|
+
return false;
|
|
430
|
+
return this.equalsCore(obj);
|
|
431
|
+
};
|
|
432
|
+
Base.prototype.equalsCore = function (obj) {
|
|
433
|
+
if (this.name !== obj.name)
|
|
434
|
+
return false;
|
|
435
|
+
return _helpers__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(this.toJSON(), obj.toJSON(), false, true, false);
|
|
436
|
+
};
|
|
423
437
|
Base.prototype.trimValue = function (value) {
|
|
424
438
|
if (!!value && (typeof value === "string" || value instanceof String))
|
|
425
439
|
return value.trim();
|
|
@@ -547,8 +561,8 @@ var Base = /** @class */ (function () {
|
|
|
547
561
|
* Returns a JSON object that corresponds to the current SurveyJS object.
|
|
548
562
|
* @see fromJSON
|
|
549
563
|
*/
|
|
550
|
-
Base.prototype.toJSON = function () {
|
|
551
|
-
return new _jsonobject__WEBPACK_IMPORTED_MODULE_2__["JsonObject"]().toJsonObject(this);
|
|
564
|
+
Base.prototype.toJSON = function (options) {
|
|
565
|
+
return new _jsonobject__WEBPACK_IMPORTED_MODULE_2__["JsonObject"]().toJsonObject(this, options);
|
|
552
566
|
};
|
|
553
567
|
/**
|
|
554
568
|
* Assigns a new configuration to the current SurveyJS object. This configuration is taken from a passed JSON object.
|
|
@@ -2606,7 +2620,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2606
2620
|
|
|
2607
2621
|
|
|
2608
2622
|
|
|
2609
|
-
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.
|
|
2623
|
+
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.127", "survey-react-ui");
|
|
2610
2624
|
|
|
2611
2625
|
|
|
2612
2626
|
/***/ }),
|
|
@@ -6941,21 +6955,11 @@ var Helpers = /** @class */ (function () {
|
|
|
6941
6955
|
return x == y;
|
|
6942
6956
|
if (!Helpers.isValueObject(x) || !Helpers.isValueObject(y))
|
|
6943
6957
|
return false;
|
|
6944
|
-
if (x["equals"])
|
|
6958
|
+
if (x["equals"] && y["equals"])
|
|
6945
6959
|
return x.equals(y);
|
|
6946
|
-
if (
|
|
6947
|
-
if (x.isDisposed || y.isDisposed)
|
|
6948
|
-
return false;
|
|
6949
|
-
if (x.getType() !== y.getType())
|
|
6950
|
-
return false;
|
|
6951
|
-
if (!!x.name && x.name !== y.name)
|
|
6952
|
-
return false;
|
|
6953
|
-
return this.isTwoValueEquals(x.toJSON(), y.toJSON(), ignoreOrder, caseSensitive, trimStrings);
|
|
6954
|
-
}
|
|
6955
|
-
if (Array.isArray(x) && Array.isArray(y))
|
|
6960
|
+
if (Array.isArray(x) && Array.isArray(y)) {
|
|
6956
6961
|
return Helpers.isArraysEqual(x, y, ignoreOrder, caseSensitive, trimStrings);
|
|
6957
|
-
|
|
6958
|
-
return x.equalsTo(y);
|
|
6962
|
+
}
|
|
6959
6963
|
for (var p in x) {
|
|
6960
6964
|
if (!x.hasOwnProperty(p))
|
|
6961
6965
|
continue;
|
|
@@ -7231,6 +7235,27 @@ var Helpers = /** @class */ (function () {
|
|
|
7231
7235
|
}
|
|
7232
7236
|
return val;
|
|
7233
7237
|
};
|
|
7238
|
+
Helpers.compareVerions = function (ver1, ver2) {
|
|
7239
|
+
if (!ver1 && !ver2)
|
|
7240
|
+
return 0;
|
|
7241
|
+
var ver1Ar = ver1.split(".");
|
|
7242
|
+
var ver2Ar = ver2.split(".");
|
|
7243
|
+
var len1 = ver1Ar.length;
|
|
7244
|
+
var len2 = ver2Ar.length;
|
|
7245
|
+
for (var i = 0; i < len1 && i < len2; i++) {
|
|
7246
|
+
var str1 = ver1Ar[i];
|
|
7247
|
+
var str2 = ver2Ar[i];
|
|
7248
|
+
if (str1.length === str2.length) {
|
|
7249
|
+
if (str1 !== str2) {
|
|
7250
|
+
return str1 < str2 ? -1 : 1;
|
|
7251
|
+
}
|
|
7252
|
+
}
|
|
7253
|
+
else {
|
|
7254
|
+
return str1.length < str2.length ? -1 : 1;
|
|
7255
|
+
}
|
|
7256
|
+
}
|
|
7257
|
+
return len1 === len2 ? 0 : (len1 < len2 ? -1 : 1);
|
|
7258
|
+
};
|
|
7234
7259
|
return Helpers;
|
|
7235
7260
|
}());
|
|
7236
7261
|
|
|
@@ -7690,6 +7715,21 @@ var JsonObjectProperty = /** @class */ (function () {
|
|
|
7690
7715
|
enumerable: false,
|
|
7691
7716
|
configurable: true
|
|
7692
7717
|
});
|
|
7718
|
+
JsonObjectProperty.prototype.isAvailableInVersion = function (ver) {
|
|
7719
|
+
if (!!this.alternativeName)
|
|
7720
|
+
return true;
|
|
7721
|
+
return this.isAvailableInVersionCore(ver);
|
|
7722
|
+
};
|
|
7723
|
+
JsonObjectProperty.prototype.getSerializedName = function (ver) {
|
|
7724
|
+
if (!this.alternativeName)
|
|
7725
|
+
return this.name;
|
|
7726
|
+
return this.isAvailableInVersionCore(ver) ? this.name : this.alternativeName;
|
|
7727
|
+
};
|
|
7728
|
+
JsonObjectProperty.prototype.isAvailableInVersionCore = function (ver) {
|
|
7729
|
+
if (!ver || !this.version)
|
|
7730
|
+
return true;
|
|
7731
|
+
return _helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].compareVerions(this.version, ver) <= 0;
|
|
7732
|
+
};
|
|
7693
7733
|
Object.defineProperty(JsonObjectProperty.prototype, "isLocalizable", {
|
|
7694
7734
|
get: function () {
|
|
7695
7735
|
return this.isLocalizableValue != null ? this.isLocalizableValue : false;
|
|
@@ -7770,6 +7810,7 @@ var JsonObjectProperty = /** @class */ (function () {
|
|
|
7770
7810
|
"className",
|
|
7771
7811
|
"alternativeName",
|
|
7772
7812
|
"layout",
|
|
7813
|
+
"version",
|
|
7773
7814
|
"classNamePart",
|
|
7774
7815
|
"baseClassName",
|
|
7775
7816
|
"defaultValue",
|
|
@@ -8218,6 +8259,9 @@ var JsonMetadataClass = /** @class */ (function () {
|
|
|
8218
8259
|
if (propInfo.layout) {
|
|
8219
8260
|
prop.layout = propInfo.layout;
|
|
8220
8261
|
}
|
|
8262
|
+
if (propInfo.version) {
|
|
8263
|
+
prop.version = propInfo.version;
|
|
8264
|
+
}
|
|
8221
8265
|
if (propInfo.dependsOn) {
|
|
8222
8266
|
this.addDependsOnProperties(prop, propInfo.dependsOn);
|
|
8223
8267
|
}
|
|
@@ -8362,36 +8406,54 @@ var JsonMetadata = /** @class */ (function () {
|
|
|
8362
8406
|
JsonMetadata.prototype.getPropertiesByObj = function (obj) {
|
|
8363
8407
|
if (!obj || !obj.getType)
|
|
8364
8408
|
return [];
|
|
8365
|
-
var res = {};
|
|
8366
8409
|
var props = this.getProperties(obj.getType());
|
|
8367
|
-
|
|
8368
|
-
|
|
8369
|
-
|
|
8370
|
-
|
|
8371
|
-
|
|
8372
|
-
|
|
8373
|
-
|
|
8374
|
-
|
|
8375
|
-
|
|
8376
|
-
if (!!res[dProp.name])
|
|
8377
|
-
continue;
|
|
8378
|
-
res[dProp.name] = dProp;
|
|
8410
|
+
var dynamicProps = this.getDynamicPropertiesByObj(obj);
|
|
8411
|
+
return [].concat(props).concat(dynamicProps);
|
|
8412
|
+
};
|
|
8413
|
+
JsonMetadata.prototype.addDynamicPropertiesIntoObj = function (dest, src, props) {
|
|
8414
|
+
var _this = this;
|
|
8415
|
+
props.forEach(function (prop) {
|
|
8416
|
+
_this.addDynamicPropertyIntoObj(dest, src, prop.name, false);
|
|
8417
|
+
if (prop.serializationProperty) {
|
|
8418
|
+
_this.addDynamicPropertyIntoObj(dest, src, prop.serializationProperty, true);
|
|
8379
8419
|
}
|
|
8420
|
+
if (prop.alternativeName) {
|
|
8421
|
+
_this.addDynamicPropertyIntoObj(dest, src, prop.alternativeName, false);
|
|
8422
|
+
}
|
|
8423
|
+
});
|
|
8424
|
+
};
|
|
8425
|
+
JsonMetadata.prototype.addDynamicPropertyIntoObj = function (dest, src, propName, isReadOnly) {
|
|
8426
|
+
var desc = {
|
|
8427
|
+
configurable: true,
|
|
8428
|
+
get: function () {
|
|
8429
|
+
return src[propName];
|
|
8430
|
+
},
|
|
8431
|
+
};
|
|
8432
|
+
if (!isReadOnly) {
|
|
8433
|
+
desc["set"] = function (v) {
|
|
8434
|
+
src[propName] = v;
|
|
8435
|
+
};
|
|
8380
8436
|
}
|
|
8381
|
-
|
|
8437
|
+
Object.defineProperty(dest, propName, desc);
|
|
8382
8438
|
};
|
|
8383
8439
|
JsonMetadata.prototype.getDynamicPropertiesByObj = function (obj, dynamicType) {
|
|
8384
8440
|
if (dynamicType === void 0) { dynamicType = null; }
|
|
8385
|
-
if (!obj || !obj.getType
|
|
8441
|
+
if (!obj || !obj.getType)
|
|
8442
|
+
return [];
|
|
8443
|
+
if (!!obj.getDynamicProperties)
|
|
8444
|
+
return obj.getDynamicProperties();
|
|
8445
|
+
if (!obj.getDynamicType && !dynamicType)
|
|
8386
8446
|
return [];
|
|
8387
|
-
var objType = obj.getType();
|
|
8388
8447
|
var dType = !!dynamicType ? dynamicType : obj.getDynamicType();
|
|
8389
|
-
|
|
8448
|
+
return this.getDynamicPropertiesByTypes(obj.getType(), dType);
|
|
8449
|
+
};
|
|
8450
|
+
JsonMetadata.prototype.getDynamicPropertiesByTypes = function (objType, dynamicType, invalidNames) {
|
|
8451
|
+
if (!dynamicType)
|
|
8390
8452
|
return [];
|
|
8391
|
-
var cacheType =
|
|
8453
|
+
var cacheType = dynamicType + "-" + objType;
|
|
8392
8454
|
if (this.dynamicPropsCache[cacheType])
|
|
8393
8455
|
return this.dynamicPropsCache[cacheType];
|
|
8394
|
-
var dynamicProps = this.getProperties(
|
|
8456
|
+
var dynamicProps = this.getProperties(dynamicType);
|
|
8395
8457
|
if (!dynamicProps || dynamicProps.length == 0)
|
|
8396
8458
|
return [];
|
|
8397
8459
|
var hash = {};
|
|
@@ -8400,9 +8462,11 @@ var JsonMetadata = /** @class */ (function () {
|
|
|
8400
8462
|
hash[props[i].name] = props[i];
|
|
8401
8463
|
}
|
|
8402
8464
|
var res = [];
|
|
8403
|
-
|
|
8404
|
-
|
|
8405
|
-
|
|
8465
|
+
if (!invalidNames)
|
|
8466
|
+
invalidNames = [];
|
|
8467
|
+
for (var i_1 = 0; i_1 < dynamicProps.length; i_1++) {
|
|
8468
|
+
var dProp = dynamicProps[i_1];
|
|
8469
|
+
if (!hash[dProp.name] && invalidNames.indexOf(dProp.name) < 0) {
|
|
8406
8470
|
res.push(dProp);
|
|
8407
8471
|
}
|
|
8408
8472
|
}
|
|
@@ -8897,9 +8961,8 @@ var JsonObject = /** @class */ (function () {
|
|
|
8897
8961
|
enumerable: false,
|
|
8898
8962
|
configurable: true
|
|
8899
8963
|
});
|
|
8900
|
-
JsonObject.prototype.toJsonObject = function (obj,
|
|
8901
|
-
|
|
8902
|
-
return this.toJsonObjectCore(obj, null, storeDefaults);
|
|
8964
|
+
JsonObject.prototype.toJsonObject = function (obj, options) {
|
|
8965
|
+
return this.toJsonObjectCore(obj, null, options);
|
|
8903
8966
|
};
|
|
8904
8967
|
JsonObject.prototype.toObject = function (jsonObj, obj, options) {
|
|
8905
8968
|
this.toObjectCore(jsonObj, obj, options);
|
|
@@ -8948,8 +9011,7 @@ var JsonObject = /** @class */ (function () {
|
|
|
8948
9011
|
obj.endLoadingFromJson();
|
|
8949
9012
|
}
|
|
8950
9013
|
};
|
|
8951
|
-
JsonObject.prototype.toJsonObjectCore = function (obj, property,
|
|
8952
|
-
if (storeDefaults === void 0) { storeDefaults = false; }
|
|
9014
|
+
JsonObject.prototype.toJsonObjectCore = function (obj, property, options) {
|
|
8953
9015
|
if (!obj || !obj.getType)
|
|
8954
9016
|
return obj;
|
|
8955
9017
|
if (typeof obj.getData === "function")
|
|
@@ -8958,61 +9020,67 @@ var JsonObject = /** @class */ (function () {
|
|
|
8958
9020
|
if (property != null && !property.className) {
|
|
8959
9021
|
result[JsonObject.typePropertyName] = property.getObjType(obj.getType());
|
|
8960
9022
|
}
|
|
8961
|
-
|
|
8962
|
-
|
|
9023
|
+
var storeDefaults = options === true;
|
|
9024
|
+
if (!options || options === true) {
|
|
9025
|
+
options = {};
|
|
9026
|
+
}
|
|
9027
|
+
if (storeDefaults) {
|
|
9028
|
+
options.storeDefaults = storeDefaults;
|
|
9029
|
+
}
|
|
9030
|
+
this.propertiesToJson(obj, Serializer.getProperties(obj.getType()), result, options);
|
|
9031
|
+
this.propertiesToJson(obj, this.getDynamicProperties(obj), result, options);
|
|
8963
9032
|
return result;
|
|
8964
9033
|
};
|
|
8965
9034
|
JsonObject.prototype.getDynamicProperties = function (obj) {
|
|
8966
9035
|
return Serializer.getDynamicPropertiesByObj(obj);
|
|
8967
9036
|
};
|
|
8968
|
-
JsonObject.prototype.addDynamicProperties = function (obj, jsonObj,
|
|
8969
|
-
if (!obj.getDynamicPropertyName)
|
|
8970
|
-
return
|
|
8971
|
-
|
|
8972
|
-
|
|
8973
|
-
|
|
8974
|
-
|
|
8975
|
-
|
|
8976
|
-
|
|
8977
|
-
|
|
8978
|
-
var res = [];
|
|
8979
|
-
for (var i = 0; i < properties.length; i++) {
|
|
8980
|
-
res.push(properties[i]);
|
|
8981
|
-
}
|
|
8982
|
-
for (var i = 0; i < dynamicProperties.length; i++) {
|
|
8983
|
-
res.push(dynamicProperties[i]);
|
|
9037
|
+
JsonObject.prototype.addDynamicProperties = function (obj, jsonObj, props) {
|
|
9038
|
+
if (!obj.getDynamicPropertyName && !obj.getDynamicProperties)
|
|
9039
|
+
return props;
|
|
9040
|
+
if (obj.getDynamicPropertyName) {
|
|
9041
|
+
var dynamicPropName = obj.getDynamicPropertyName();
|
|
9042
|
+
if (!dynamicPropName)
|
|
9043
|
+
return props;
|
|
9044
|
+
if (dynamicPropName && jsonObj[dynamicPropName]) {
|
|
9045
|
+
obj[dynamicPropName] = jsonObj[dynamicPropName];
|
|
9046
|
+
}
|
|
8984
9047
|
}
|
|
8985
|
-
|
|
9048
|
+
var dynamicProps = this.getDynamicProperties(obj);
|
|
9049
|
+
return dynamicProps.length === 0 ? props : [].concat(props).concat(dynamicProps);
|
|
8986
9050
|
};
|
|
8987
|
-
JsonObject.prototype.propertiesToJson = function (obj, properties, json,
|
|
8988
|
-
if (storeDefaults === void 0) { storeDefaults = false; }
|
|
9051
|
+
JsonObject.prototype.propertiesToJson = function (obj, properties, json, options) {
|
|
8989
9052
|
for (var i = 0; i < properties.length; i++) {
|
|
8990
|
-
this.valueToJson(obj, json, properties[i],
|
|
9053
|
+
this.valueToJson(obj, json, properties[i], options);
|
|
8991
9054
|
}
|
|
8992
9055
|
};
|
|
8993
|
-
JsonObject.prototype.valueToJson = function (obj, result,
|
|
8994
|
-
if (
|
|
8995
|
-
|
|
8996
|
-
|
|
9056
|
+
JsonObject.prototype.valueToJson = function (obj, result, prop, options) {
|
|
9057
|
+
if (!options)
|
|
9058
|
+
options = {};
|
|
9059
|
+
if (prop.isSerializable === false || (prop.isLightSerializable === false && this.lightSerializing))
|
|
9060
|
+
return;
|
|
9061
|
+
if (options.version && !prop.isAvailableInVersion(options.version))
|
|
8997
9062
|
return;
|
|
8998
|
-
var value =
|
|
8999
|
-
if (!storeDefaults &&
|
|
9063
|
+
var value = prop.getSerializableValue(obj);
|
|
9064
|
+
if (!options.storeDefaults && prop.isDefaultValueByObj(obj, value))
|
|
9000
9065
|
return;
|
|
9001
9066
|
if (this.isValueArray(value)) {
|
|
9002
9067
|
var arrValue = [];
|
|
9003
9068
|
for (var i = 0; i < value.length; i++) {
|
|
9004
|
-
arrValue.push(this.toJsonObjectCore(value[i],
|
|
9069
|
+
arrValue.push(this.toJsonObjectCore(value[i], prop, options));
|
|
9005
9070
|
}
|
|
9006
9071
|
value = arrValue.length > 0 ? arrValue : null;
|
|
9007
9072
|
}
|
|
9008
9073
|
else {
|
|
9009
|
-
value = this.toJsonObjectCore(value,
|
|
9074
|
+
value = this.toJsonObjectCore(value, prop, options);
|
|
9010
9075
|
}
|
|
9076
|
+
if (value === undefined || value === null)
|
|
9077
|
+
return;
|
|
9078
|
+
var name = prop.getSerializedName(options.version);
|
|
9011
9079
|
var hasValue = typeof obj["getPropertyValue"] === "function" &&
|
|
9012
|
-
obj["getPropertyValue"](
|
|
9013
|
-
if ((storeDefaults && hasValue) || !
|
|
9014
|
-
if (!Serializer.onSerializingProperty || !Serializer.onSerializingProperty(obj,
|
|
9015
|
-
result[
|
|
9080
|
+
obj["getPropertyValue"](name, null) !== null;
|
|
9081
|
+
if ((options.storeDefaults && hasValue) || !prop.isDefaultValueByObj(obj, value)) {
|
|
9082
|
+
if (!Serializer.onSerializingProperty || !Serializer.onSerializingProperty(obj, prop, value, result)) {
|
|
9083
|
+
result[name] = this.removePosOnValueToJson(prop, value);
|
|
9016
9084
|
}
|
|
9017
9085
|
}
|
|
9018
9086
|
};
|
|
@@ -9052,6 +9120,14 @@ var JsonObject = /** @class */ (function () {
|
|
|
9052
9120
|
}
|
|
9053
9121
|
}
|
|
9054
9122
|
};
|
|
9123
|
+
JsonObject.prototype.removePosOnValueToJson = function (property, value) {
|
|
9124
|
+
if (!property.isCustom || !value)
|
|
9125
|
+
return value;
|
|
9126
|
+
if (!!value[JsonObject.positionPropertyName]) {
|
|
9127
|
+
delete value[JsonObject.positionPropertyName];
|
|
9128
|
+
}
|
|
9129
|
+
return value;
|
|
9130
|
+
};
|
|
9055
9131
|
JsonObject.prototype.removePos = function (property, value) {
|
|
9056
9132
|
if (!property || !property.type || property.type.indexOf("value") < 0)
|
|
9057
9133
|
return;
|
|
@@ -10172,7 +10248,7 @@ var SurveyQuestionBoolean = /** @class */ (function (_super) {
|
|
|
10172
10248
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { className: itemClass, onClick: this.handleOnClick },
|
|
10173
10249
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { ref: this.checkRef, type: "checkbox", name: this.question.name, value: this.question.booleanValue === null
|
|
10174
10250
|
? ""
|
|
10175
|
-
: this.question.booleanValue, id: this.question.inputId, className: cssClasses.control, disabled: this.isDisplayMode, checked: this.question.booleanValue || false, onChange: this.handleOnChange, "aria-required": this.question.
|
|
10251
|
+
: this.question.booleanValue, id: this.question.inputId, className: cssClasses.control, disabled: this.isDisplayMode, checked: this.question.booleanValue || false, onChange: this.handleOnChange, role: this.question.a11y_input_ariaRole, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-describedby": this.question.a11y_input_ariaDescribedBy }),
|
|
10176
10252
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.sliderGhost, onClick: function (event) { return _this.handleOnLabelClick(event, false); } },
|
|
10177
10253
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.question.getLabelCss(false) }, this.renderLocString(this.question.locLabelFalse))),
|
|
10178
10254
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.switch, onClick: this.handleOnSwitchClick },
|
|
@@ -11712,8 +11788,9 @@ var SurveyQuestionPanelDynamicAddButton = /** @class */ (function (_super) {
|
|
|
11712
11788
|
SurveyQuestionPanelDynamicAddButton.prototype.renderElement = function () {
|
|
11713
11789
|
if (!this.question.canAddPanel)
|
|
11714
11790
|
return null;
|
|
11791
|
+
var btnText = this.renderLocString(this.question.locPanelAddText);
|
|
11715
11792
|
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button", { type: "button", className: this.question.getAddButtonCss(), onClick: this.handleClick },
|
|
11716
|
-
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: this.question.cssClasses.buttonAddText },
|
|
11793
|
+
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: this.question.cssClasses.buttonAddText }, btnText)));
|
|
11717
11794
|
};
|
|
11718
11795
|
return SurveyQuestionPanelDynamicAddButton;
|
|
11719
11796
|
}(SurveyQuestionPanelDynamicAction));
|
|
@@ -11931,8 +12008,9 @@ var SurveyQuestionPanelDynamicRemoveButton = /** @class */ (function (_super) {
|
|
|
11931
12008
|
return _this;
|
|
11932
12009
|
}
|
|
11933
12010
|
SurveyQuestionPanelDynamicRemoveButton.prototype.renderElement = function () {
|
|
12011
|
+
var btnText = this.renderLocString(this.question.locPanelRemoveText);
|
|
11934
12012
|
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button", { className: this.question.getPanelRemoveButtonCss(), onClick: this.handleClick, type: "button" },
|
|
11935
|
-
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: this.question.cssClasses.buttonRemoveText },
|
|
12013
|
+
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: this.question.cssClasses.buttonRemoveText }, btnText),
|
|
11936
12014
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: this.question.cssClasses.iconRemove })));
|
|
11937
12015
|
};
|
|
11938
12016
|
return SurveyQuestionPanelDynamicRemoveButton;
|
|
@@ -14575,11 +14653,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14575
14653
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyWindow", function() { return SurveyWindow; });
|
|
14576
14654
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
14577
14655
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
14578
|
-
/* harmony import */ var
|
|
14579
|
-
/* harmony import */ var
|
|
14580
|
-
/* harmony import */ var
|
|
14581
|
-
/* harmony import */ var
|
|
14582
|
-
/* harmony import */ var _components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/svg-icon/svg-icon */ "./src/react/components/svg-icon/svg-icon.tsx");
|
|
14656
|
+
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "survey-core");
|
|
14657
|
+
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_1__);
|
|
14658
|
+
/* harmony import */ var _reactSurvey__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactSurvey */ "./src/react/reactSurvey.tsx");
|
|
14659
|
+
/* harmony import */ var _components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/svg-icon/svg-icon */ "./src/react/components/svg-icon/svg-icon.tsx");
|
|
14583
14660
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
14584
14661
|
var extendStatics = function (d, b) {
|
|
14585
14662
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -14599,7 +14676,6 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
|
14599
14676
|
|
|
14600
14677
|
|
|
14601
14678
|
|
|
14602
|
-
|
|
14603
14679
|
var PopupSurvey = /** @class */ (function (_super) {
|
|
14604
14680
|
__extends(PopupSurvey, _super);
|
|
14605
14681
|
function PopupSurvey(props) {
|
|
@@ -14617,46 +14693,65 @@ var PopupSurvey = /** @class */ (function (_super) {
|
|
|
14617
14693
|
return _super.prototype.canRender.call(this) && this.popup.isShowing;
|
|
14618
14694
|
};
|
|
14619
14695
|
PopupSurvey.prototype.renderElement = function () {
|
|
14696
|
+
var _this = this;
|
|
14620
14697
|
var header = this.renderWindowHeader();
|
|
14621
|
-
var body = this.
|
|
14622
|
-
var style = {
|
|
14623
|
-
position: "fixed",
|
|
14624
|
-
bottom: 3,
|
|
14625
|
-
right: 10
|
|
14626
|
-
};
|
|
14698
|
+
var body = this.renderBody();
|
|
14699
|
+
var style = {};
|
|
14627
14700
|
if (!!this.popup.renderedWidth) {
|
|
14628
14701
|
style.width = this.popup.renderedWidth;
|
|
14629
14702
|
style.maxWidth = this.popup.renderedWidth;
|
|
14630
14703
|
}
|
|
14631
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.popup.cssRoot, style: style },
|
|
14632
|
-
|
|
14633
|
-
|
|
14704
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.popup.cssRoot, style: style, onScroll: function () { return _this.popup.onScroll(); } },
|
|
14705
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.popup.cssRootContent },
|
|
14706
|
+
header,
|
|
14707
|
+
body)));
|
|
14634
14708
|
};
|
|
14635
14709
|
PopupSurvey.prototype.renderWindowHeader = function () {
|
|
14636
|
-
var
|
|
14637
|
-
var
|
|
14638
|
-
var
|
|
14639
|
-
var
|
|
14640
|
-
|
|
14641
|
-
|
|
14642
|
-
|
|
14643
|
-
|
|
14644
|
-
|
|
14645
|
-
|
|
14646
|
-
|
|
14647
|
-
|
|
14648
|
-
|
|
14649
|
-
|
|
14710
|
+
var popup = this.popup;
|
|
14711
|
+
var headerCss = popup.cssHeaderRoot;
|
|
14712
|
+
var titleCollapsed = null;
|
|
14713
|
+
var expandCollapseIcon;
|
|
14714
|
+
var closeButton = null;
|
|
14715
|
+
if (popup.isCollapsed) {
|
|
14716
|
+
headerCss += " " + popup.cssRootCollapsedMod;
|
|
14717
|
+
titleCollapsed = this.renderTitleCollapsed(popup);
|
|
14718
|
+
expandCollapseIcon = this.renderExpandIcon();
|
|
14719
|
+
}
|
|
14720
|
+
else {
|
|
14721
|
+
expandCollapseIcon = this.renderCollapseIcon();
|
|
14722
|
+
}
|
|
14723
|
+
if (popup.allowClose) {
|
|
14724
|
+
closeButton = this.renderCloseButton(this.popup);
|
|
14725
|
+
}
|
|
14726
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: popup.cssHeaderRoot },
|
|
14727
|
+
titleCollapsed,
|
|
14728
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: popup.cssHeaderButtonsContainer },
|
|
14729
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: popup.cssHeaderCollapseButton, onClick: this.handleOnExpanded }, expandCollapseIcon),
|
|
14730
|
+
closeButton)));
|
|
14731
|
+
};
|
|
14732
|
+
PopupSurvey.prototype.renderTitleCollapsed = function (popup) {
|
|
14733
|
+
if (!popup.locTitle)
|
|
14734
|
+
return null;
|
|
14735
|
+
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: popup.cssHeaderTitleCollapsed }, popup.locTitle.renderedHtml);
|
|
14736
|
+
};
|
|
14737
|
+
PopupSurvey.prototype.renderExpandIcon = function () {
|
|
14738
|
+
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { iconName: "icon-restore_16x16", size: 16 });
|
|
14739
|
+
};
|
|
14740
|
+
PopupSurvey.prototype.renderCollapseIcon = function () {
|
|
14741
|
+
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { iconName: "icon-minimize_16x16", size: 16 });
|
|
14742
|
+
};
|
|
14743
|
+
PopupSurvey.prototype.renderCloseButton = function (popup) {
|
|
14744
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: popup.cssHeaderCloseButton, onClick: function () { popup.hide(); } },
|
|
14745
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { iconName: "icon-close_16x16", size: 16 })));
|
|
14650
14746
|
};
|
|
14651
14747
|
PopupSurvey.prototype.renderBody = function () {
|
|
14652
|
-
|
|
14653
|
-
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.popup.cssBody, onScroll: function () { return _this.popup.onScroll(); } }, this.doRender());
|
|
14748
|
+
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.popup.cssBody }, this.doRender());
|
|
14654
14749
|
};
|
|
14655
14750
|
PopupSurvey.prototype.createSurvey = function (newProps) {
|
|
14656
14751
|
if (!newProps)
|
|
14657
14752
|
newProps = {};
|
|
14658
14753
|
_super.prototype.createSurvey.call(this, newProps);
|
|
14659
|
-
this.popup = new
|
|
14754
|
+
this.popup = new survey_core__WEBPACK_IMPORTED_MODULE_1__["PopupSurveyModel"](null, this.survey);
|
|
14660
14755
|
if (newProps.closeOnCompleteTimeout) {
|
|
14661
14756
|
this.popup.closeOnCompleteTimeout = newProps.closeOnCompleteTimeout;
|
|
14662
14757
|
}
|
|
@@ -14666,7 +14761,7 @@ var PopupSurvey = /** @class */ (function (_super) {
|
|
|
14666
14761
|
this.popup.expand();
|
|
14667
14762
|
};
|
|
14668
14763
|
return PopupSurvey;
|
|
14669
|
-
}(
|
|
14764
|
+
}(_reactSurvey__WEBPACK_IMPORTED_MODULE_2__["Survey"]));
|
|
14670
14765
|
|
|
14671
14766
|
/**
|
|
14672
14767
|
* Obsolete. Please use PopupSurvey
|
|
@@ -15319,13 +15414,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15319
15414
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyProgressToc", function() { return SurveyProgressToc; });
|
|
15320
15415
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
15321
15416
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
15322
|
-
/* harmony import */ var
|
|
15323
|
-
/* harmony import */ var
|
|
15324
|
-
/* harmony import */ var
|
|
15325
|
-
/* harmony import */ var
|
|
15326
|
-
/* harmony import */ var
|
|
15327
|
-
/* harmony import */ var _components_popup_popup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/popup/popup */ "./src/react/components/popup/popup.tsx");
|
|
15328
|
-
/* harmony import */ var _components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/svg-icon/svg-icon */ "./src/react/components/svg-icon/svg-icon.tsx");
|
|
15417
|
+
/* harmony import */ var _reactSurveyNavigationBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactSurveyNavigationBase */ "./src/react/reactSurveyNavigationBase.tsx");
|
|
15418
|
+
/* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./element-factory */ "./src/react/element-factory.tsx");
|
|
15419
|
+
/* harmony import */ var _components_list_list__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/list/list */ "./src/react/components/list/list.tsx");
|
|
15420
|
+
/* harmony import */ var _components_popup_popup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/popup/popup */ "./src/react/components/popup/popup.tsx");
|
|
15421
|
+
/* harmony import */ var _components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/svg-icon/svg-icon */ "./src/react/components/svg-icon/svg-icon.tsx");
|
|
15329
15422
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
15330
15423
|
var extendStatics = function (d, b) {
|
|
15331
15424
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -15347,29 +15440,28 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
|
15347
15440
|
|
|
15348
15441
|
|
|
15349
15442
|
|
|
15350
|
-
|
|
15351
15443
|
var SurveyProgressToc = /** @class */ (function (_super) {
|
|
15352
15444
|
__extends(SurveyProgressToc, _super);
|
|
15353
15445
|
function SurveyProgressToc() {
|
|
15354
15446
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
15355
15447
|
}
|
|
15356
15448
|
SurveyProgressToc.prototype.render = function () {
|
|
15357
|
-
var tocModel =
|
|
15449
|
+
var tocModel = this.props.model;
|
|
15358
15450
|
var content;
|
|
15359
15451
|
if (tocModel.isMobile) {
|
|
15360
15452
|
content = react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { onClick: tocModel.togglePopup },
|
|
15361
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](
|
|
15362
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](
|
|
15453
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_5__["SvgIcon"], { iconName: tocModel.icon, size: 24 }),
|
|
15454
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_popup_popup__WEBPACK_IMPORTED_MODULE_4__["Popup"], { model: tocModel.popupModel }));
|
|
15363
15455
|
}
|
|
15364
15456
|
else {
|
|
15365
|
-
content = react__WEBPACK_IMPORTED_MODULE_0__["createElement"](
|
|
15457
|
+
content = react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_list_list__WEBPACK_IMPORTED_MODULE_3__["List"], { model: tocModel.listModel });
|
|
15366
15458
|
}
|
|
15367
15459
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: tocModel.containerCss }, content));
|
|
15368
15460
|
};
|
|
15369
15461
|
return SurveyProgressToc;
|
|
15370
|
-
}(
|
|
15462
|
+
}(_reactSurveyNavigationBase__WEBPACK_IMPORTED_MODULE_1__["SurveyNavigationBase"]));
|
|
15371
15463
|
|
|
15372
|
-
|
|
15464
|
+
_element_factory__WEBPACK_IMPORTED_MODULE_2__["ReactElementFactory"].Instance.registerElement("sv-navigation-toc", function (props) {
|
|
15373
15465
|
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyProgressToc, props);
|
|
15374
15466
|
});
|
|
15375
15467
|
|
|
@@ -17283,7 +17375,7 @@ var SurveyQuestionMatrix = /** @class */ (function (_super) {
|
|
|
17283
17375
|
for (var i = 0; i < visibleRows.length; i++) {
|
|
17284
17376
|
var row = visibleRows[i];
|
|
17285
17377
|
var key = "row-" + row.name + "-" + i;
|
|
17286
|
-
rows.push(react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionMatrixRow, { key: key, question: this.question, cssClasses: cssClasses,
|
|
17378
|
+
rows.push(react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionMatrixRow, { key: key, question: this.question, cssClasses: cssClasses, row: row, isFirst: i == 0 }));
|
|
17287
17379
|
}
|
|
17288
17380
|
var header = !this.question.showHeader ? null : (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("thead", null,
|
|
17289
17381
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("tr", null,
|
|
@@ -17304,6 +17396,11 @@ var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
|
|
|
17304
17396
|
function SurveyQuestionMatrixRow(props) {
|
|
17305
17397
|
return _super.call(this, props) || this;
|
|
17306
17398
|
}
|
|
17399
|
+
SurveyQuestionMatrixRow.prototype.getStateElement = function () {
|
|
17400
|
+
if (!!this.row)
|
|
17401
|
+
return this.row.item;
|
|
17402
|
+
return _super.prototype.getStateElement.call(this);
|
|
17403
|
+
};
|
|
17307
17404
|
Object.defineProperty(SurveyQuestionMatrixRow.prototype, "question", {
|
|
17308
17405
|
get: function () {
|
|
17309
17406
|
return this.props.question;
|
|
@@ -17341,7 +17438,7 @@ var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
|
|
|
17341
17438
|
style.minWidth = this.question.rowTitleWidth;
|
|
17342
17439
|
style.width = this.question.rowTitleWidth;
|
|
17343
17440
|
}
|
|
17344
|
-
rowsTD = react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { style: style, className: this.
|
|
17441
|
+
rowsTD = react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { style: style, className: this.row.rowTextClasses }, this.wrapCell({ row: this.row }, rowText, "row-header"));
|
|
17345
17442
|
}
|
|
17346
17443
|
var tds = this.generateTds();
|
|
17347
17444
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("tr", { className: this.row.rowClasses || undefined },
|
|
@@ -17359,9 +17456,7 @@ var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
|
|
|
17359
17456
|
var key = "value" + i;
|
|
17360
17457
|
var itemClass = this_1.question.getItemClass(row, column);
|
|
17361
17458
|
if (this_1.question.hasCellText) {
|
|
17362
|
-
var getHandler =
|
|
17363
|
-
? function (column) { return function () { return _this.cellClick(row, column); }; }
|
|
17364
|
-
: null;
|
|
17459
|
+
var getHandler = function (column) { return function () { return _this.cellClick(row, column); }; };
|
|
17365
17460
|
td = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { key: key, className: itemClass, onClick: getHandler ? getHandler(column) : function () { } }, this_1.renderLocString(this_1.question.getCellDisplayLocText(row.name, column))));
|
|
17366
17461
|
}
|
|
17367
17462
|
else {
|
|
@@ -17371,7 +17466,6 @@ var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
|
|
|
17371
17466
|
column: column,
|
|
17372
17467
|
columnIndex: i,
|
|
17373
17468
|
cssClasses: this_1.cssClasses,
|
|
17374
|
-
isDisplayMode: this_1.isDisplayMode,
|
|
17375
17469
|
cellChanged: function () { _this.cellClick(_this.row, column); }
|
|
17376
17470
|
});
|
|
17377
17471
|
td = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { key: key, "data-responsive-title": column.locText.renderedHtml, className: this_1.question.cssClasses.cell }, renderedCell));
|
|
@@ -17454,7 +17548,7 @@ var SurveyQuestionMatrixCell = /** @class */ (function (_super) {
|
|
|
17454
17548
|
mobileSpan));
|
|
17455
17549
|
};
|
|
17456
17550
|
SurveyQuestionMatrixCell.prototype.renderInput = function (inputId, isChecked) {
|
|
17457
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { id: inputId, type: "radio", className: this.cssClasses.itemValue, name: this.row.fullName, value: this.column.value, disabled: this.
|
|
17551
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { id: inputId, type: "radio", className: this.cssClasses.itemValue, name: this.row.fullName, value: this.column.value, disabled: this.row.isReadOnly, checked: isChecked, onChange: this.handleOnChange, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.getCellAriaLabel(this.row.locText.renderedHtml, this.column.locText.renderedHtml), "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-describedby": this.question.a11y_input_ariaDescribedBy }));
|
|
17458
17552
|
};
|
|
17459
17553
|
return SurveyQuestionMatrixCell;
|
|
17460
17554
|
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElement"]));
|
|
@@ -19484,7 +19578,7 @@ var SurveyQuestionSignaturePad = /** @class */ (function (_super) {
|
|
|
19484
19578
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.placeholder, style: { display: this.question.needShowPlaceholder() ? "" : "none" } }, this.renderLocString(this.question.locPlaceholder)),
|
|
19485
19579
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", null,
|
|
19486
19580
|
this.renderBackgroundImage(),
|
|
19487
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("canvas", { tabIndex:
|
|
19581
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("canvas", { tabIndex: -1, className: this.question.cssClasses.canvas, onBlur: this.question.onBlur })),
|
|
19488
19582
|
clearButton,
|
|
19489
19583
|
loadingIndicator));
|
|
19490
19584
|
};
|
|
@@ -20391,8 +20485,8 @@ var settings = {
|
|
|
20391
20485
|
* @param message A message to be displayed in the confirm dialog window.
|
|
20392
20486
|
* @param callback A callback function that should be called with `true` if a user confirms an action or `false` otherwise.
|
|
20393
20487
|
*/
|
|
20394
|
-
confirmActionAsync: function (message, callback, applyTitle) {
|
|
20395
|
-
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["showConfirmDialog"])(message, callback, applyTitle);
|
|
20488
|
+
confirmActionAsync: function (message, callback, applyTitle, locale) {
|
|
20489
|
+
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["showConfirmDialog"])(message, callback, applyTitle, locale);
|
|
20396
20490
|
},
|
|
20397
20491
|
/**
|
|
20398
20492
|
* A minimum width value for all survey elements.
|
|
@@ -21000,7 +21094,7 @@ function confirmAction(message) {
|
|
|
21000
21094
|
return _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].confirmActionFunc(message);
|
|
21001
21095
|
return confirm(message);
|
|
21002
21096
|
}
|
|
21003
|
-
function confirmActionAsync(message, funcOnYes, funcOnNo) {
|
|
21097
|
+
function confirmActionAsync(message, funcOnYes, funcOnNo, locale) {
|
|
21004
21098
|
var callbackFunc = function (res) {
|
|
21005
21099
|
if (res)
|
|
21006
21100
|
funcOnYes();
|
|
@@ -21008,7 +21102,7 @@ function confirmActionAsync(message, funcOnYes, funcOnNo) {
|
|
|
21008
21102
|
funcOnNo();
|
|
21009
21103
|
};
|
|
21010
21104
|
if (!!_settings__WEBPACK_IMPORTED_MODULE_1__["settings"] && !!_settings__WEBPACK_IMPORTED_MODULE_1__["settings"].confirmActionAsync) {
|
|
21011
|
-
if (_settings__WEBPACK_IMPORTED_MODULE_1__["settings"].confirmActionAsync(message, callbackFunc))
|
|
21105
|
+
if (_settings__WEBPACK_IMPORTED_MODULE_1__["settings"].confirmActionAsync(message, callbackFunc, undefined, locale))
|
|
21012
21106
|
return;
|
|
21013
21107
|
}
|
|
21014
21108
|
callbackFunc(confirmAction(message));
|
|
@@ -21115,7 +21209,7 @@ function scrollElementByChildId(id) {
|
|
|
21115
21209
|
return;
|
|
21116
21210
|
var scrollableEl = findScrollableParent(el);
|
|
21117
21211
|
if (!!scrollableEl) {
|
|
21118
|
-
scrollableEl.dispatchEvent(new CustomEvent("scroll"));
|
|
21212
|
+
setTimeout(function () { return scrollableEl.dispatchEvent(new CustomEvent("scroll")); }, 10);
|
|
21119
21213
|
}
|
|
21120
21214
|
}
|
|
21121
21215
|
function navigateToUrl(url) {
|
|
@@ -21357,7 +21451,7 @@ var Logger = /** @class */ (function () {
|
|
|
21357
21451
|
return Logger;
|
|
21358
21452
|
}());
|
|
21359
21453
|
|
|
21360
|
-
function showConfirmDialog(message, callback, applyTitle) {
|
|
21454
|
+
function showConfirmDialog(message, callback, applyTitle, locale) {
|
|
21361
21455
|
var locStr = new _localizablestring__WEBPACK_IMPORTED_MODULE_0__["LocalizableString"](undefined);
|
|
21362
21456
|
var popupViewModel = _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].showDialog({
|
|
21363
21457
|
componentName: "sv-string-viewer",
|
|
@@ -21378,9 +21472,9 @@ function showConfirmDialog(message, callback, applyTitle) {
|
|
|
21378
21472
|
var toolbar = popupViewModel.footerToolbar;
|
|
21379
21473
|
var applyBtn = toolbar.getActionById("apply");
|
|
21380
21474
|
var cancelBtn = toolbar.getActionById("cancel");
|
|
21381
|
-
cancelBtn.title = _surveyStrings__WEBPACK_IMPORTED_MODULE_2__["surveyLocalization"].getString("cancel");
|
|
21475
|
+
cancelBtn.title = _surveyStrings__WEBPACK_IMPORTED_MODULE_2__["surveyLocalization"].getString("cancel", locale);
|
|
21382
21476
|
cancelBtn.innerCss = "sv-popup__body-footer-item sv-popup__button sd-btn sd-btn--small";
|
|
21383
|
-
applyBtn.title = applyTitle || _surveyStrings__WEBPACK_IMPORTED_MODULE_2__["surveyLocalization"].getString("ok");
|
|
21477
|
+
applyBtn.title = applyTitle || _surveyStrings__WEBPACK_IMPORTED_MODULE_2__["surveyLocalization"].getString("ok", locale);
|
|
21384
21478
|
applyBtn.innerCss = "sv-popup__body-footer-item sv-popup__button sv-popup__button--danger sd-btn sd-btn--small sd-btn--danger";
|
|
21385
21479
|
popupViewModel.width = "452px";
|
|
21386
21480
|
return true;
|