survey-react-ui 1.9.126 → 1.9.128
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/package.json +1 -1
- package/survey-react-ui.js +878 -755
- package/survey-react-ui.js.map +1 -1
- package/survey-react-ui.min.js +2 -2
- package/typings/entries/react-ui-model.d.ts +3 -3
- package/typings/react/progress.d.ts +9 -0
- package/typings/react/progressButtons.d.ts +19 -0
- package/typings/react/progressToc.d.ts +5 -0
- package/typings/react/reactSurveyProgress.d.ts +9 -9
- package/typings/react/reactSurveyProgressButtons.d.ts +19 -19
- package/typings/react/reactSurveyProgressToc.d.ts +5 -5
- package/typings/react/reactquestion_comment.d.ts +5 -1
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.128
|
|
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
|
*/
|
|
@@ -561,8 +561,8 @@ var Base = /** @class */ (function () {
|
|
|
561
561
|
* Returns a JSON object that corresponds to the current SurveyJS object.
|
|
562
562
|
* @see fromJSON
|
|
563
563
|
*/
|
|
564
|
-
Base.prototype.toJSON = function () {
|
|
565
|
-
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);
|
|
566
566
|
};
|
|
567
567
|
/**
|
|
568
568
|
* Assigns a new configuration to the current SurveyJS object. This configuration is taken from a passed JSON object.
|
|
@@ -2166,14 +2166,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2166
2166
|
/* harmony import */ var _react_reactquestion_paneldynamic__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ../react/reactquestion_paneldynamic */ "./src/react/reactquestion_paneldynamic.tsx");
|
|
2167
2167
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionPanelDynamic", function() { return _react_reactquestion_paneldynamic__WEBPACK_IMPORTED_MODULE_39__["SurveyQuestionPanelDynamic"]; });
|
|
2168
2168
|
|
|
2169
|
-
/* harmony import */ var
|
|
2170
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyProgress", function() { return
|
|
2169
|
+
/* harmony import */ var _react_progress__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ../react/progress */ "./src/react/progress.tsx");
|
|
2170
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyProgress", function() { return _react_progress__WEBPACK_IMPORTED_MODULE_40__["SurveyProgress"]; });
|
|
2171
2171
|
|
|
2172
|
-
/* harmony import */ var
|
|
2173
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyProgressButtons", function() { return
|
|
2172
|
+
/* harmony import */ var _react_progressButtons__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ../react/progressButtons */ "./src/react/progressButtons.tsx");
|
|
2173
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyProgressButtons", function() { return _react_progressButtons__WEBPACK_IMPORTED_MODULE_41__["SurveyProgressButtons"]; });
|
|
2174
2174
|
|
|
2175
|
-
/* harmony import */ var
|
|
2176
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyProgressToc", function() { return
|
|
2175
|
+
/* harmony import */ var _react_progressToc__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../react/progressToc */ "./src/react/progressToc.tsx");
|
|
2176
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyProgressToc", function() { return _react_progressToc__WEBPACK_IMPORTED_MODULE_42__["SurveyProgressToc"]; });
|
|
2177
2177
|
|
|
2178
2178
|
/* harmony import */ var _react_reactquestion_rating__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../react/reactquestion_rating */ "./src/react/reactquestion_rating.tsx");
|
|
2179
2179
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionRating", function() { return _react_reactquestion_rating__WEBPACK_IMPORTED_MODULE_43__["SurveyQuestionRating"]; });
|
|
@@ -2620,7 +2620,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2620
2620
|
|
|
2621
2621
|
|
|
2622
2622
|
|
|
2623
|
-
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.
|
|
2623
|
+
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.128", "survey-react-ui");
|
|
2624
2624
|
|
|
2625
2625
|
|
|
2626
2626
|
/***/ }),
|
|
@@ -7235,6 +7235,27 @@ var Helpers = /** @class */ (function () {
|
|
|
7235
7235
|
}
|
|
7236
7236
|
return val;
|
|
7237
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
|
+
};
|
|
7238
7259
|
return Helpers;
|
|
7239
7260
|
}());
|
|
7240
7261
|
|
|
@@ -7680,8 +7701,15 @@ var JsonObjectProperty = /** @class */ (function () {
|
|
|
7680
7701
|
var isLayout = !this.layout || this.layout == layout;
|
|
7681
7702
|
if (!this.visible || !isLayout)
|
|
7682
7703
|
return false;
|
|
7683
|
-
if (!!this.visibleIf && !!obj)
|
|
7704
|
+
if (!!this.visibleIf && !!obj) {
|
|
7705
|
+
if (obj.getOriginalObj) {
|
|
7706
|
+
var orjObj = obj.getOriginalObj();
|
|
7707
|
+
if (orjObj && Serializer.findProperty(orjObj.getType(), this.name)) {
|
|
7708
|
+
obj = orjObj;
|
|
7709
|
+
}
|
|
7710
|
+
}
|
|
7684
7711
|
return this.visibleIf(obj);
|
|
7712
|
+
}
|
|
7685
7713
|
return true;
|
|
7686
7714
|
};
|
|
7687
7715
|
Object.defineProperty(JsonObjectProperty.prototype, "visible", {
|
|
@@ -7694,6 +7722,21 @@ var JsonObjectProperty = /** @class */ (function () {
|
|
|
7694
7722
|
enumerable: false,
|
|
7695
7723
|
configurable: true
|
|
7696
7724
|
});
|
|
7725
|
+
JsonObjectProperty.prototype.isAvailableInVersion = function (ver) {
|
|
7726
|
+
if (!!this.alternativeName)
|
|
7727
|
+
return true;
|
|
7728
|
+
return this.isAvailableInVersionCore(ver);
|
|
7729
|
+
};
|
|
7730
|
+
JsonObjectProperty.prototype.getSerializedName = function (ver) {
|
|
7731
|
+
if (!this.alternativeName)
|
|
7732
|
+
return this.name;
|
|
7733
|
+
return this.isAvailableInVersionCore(ver) ? this.name : this.alternativeName;
|
|
7734
|
+
};
|
|
7735
|
+
JsonObjectProperty.prototype.isAvailableInVersionCore = function (ver) {
|
|
7736
|
+
if (!ver || !this.version)
|
|
7737
|
+
return true;
|
|
7738
|
+
return _helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].compareVerions(this.version, ver) <= 0;
|
|
7739
|
+
};
|
|
7697
7740
|
Object.defineProperty(JsonObjectProperty.prototype, "isLocalizable", {
|
|
7698
7741
|
get: function () {
|
|
7699
7742
|
return this.isLocalizableValue != null ? this.isLocalizableValue : false;
|
|
@@ -7774,6 +7817,7 @@ var JsonObjectProperty = /** @class */ (function () {
|
|
|
7774
7817
|
"className",
|
|
7775
7818
|
"alternativeName",
|
|
7776
7819
|
"layout",
|
|
7820
|
+
"version",
|
|
7777
7821
|
"classNamePart",
|
|
7778
7822
|
"baseClassName",
|
|
7779
7823
|
"defaultValue",
|
|
@@ -8222,6 +8266,9 @@ var JsonMetadataClass = /** @class */ (function () {
|
|
|
8222
8266
|
if (propInfo.layout) {
|
|
8223
8267
|
prop.layout = propInfo.layout;
|
|
8224
8268
|
}
|
|
8269
|
+
if (propInfo.version) {
|
|
8270
|
+
prop.version = propInfo.version;
|
|
8271
|
+
}
|
|
8225
8272
|
if (propInfo.dependsOn) {
|
|
8226
8273
|
this.addDependsOnProperties(prop, propInfo.dependsOn);
|
|
8227
8274
|
}
|
|
@@ -8366,36 +8413,54 @@ var JsonMetadata = /** @class */ (function () {
|
|
|
8366
8413
|
JsonMetadata.prototype.getPropertiesByObj = function (obj) {
|
|
8367
8414
|
if (!obj || !obj.getType)
|
|
8368
8415
|
return [];
|
|
8369
|
-
var res = {};
|
|
8370
8416
|
var props = this.getProperties(obj.getType());
|
|
8371
|
-
|
|
8372
|
-
|
|
8373
|
-
|
|
8374
|
-
|
|
8375
|
-
|
|
8376
|
-
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
|
|
8381
|
-
|
|
8382
|
-
|
|
8417
|
+
var dynamicProps = this.getDynamicPropertiesByObj(obj);
|
|
8418
|
+
return [].concat(props).concat(dynamicProps);
|
|
8419
|
+
};
|
|
8420
|
+
JsonMetadata.prototype.addDynamicPropertiesIntoObj = function (dest, src, props) {
|
|
8421
|
+
var _this = this;
|
|
8422
|
+
props.forEach(function (prop) {
|
|
8423
|
+
_this.addDynamicPropertyIntoObj(dest, src, prop.name, false);
|
|
8424
|
+
if (prop.serializationProperty) {
|
|
8425
|
+
_this.addDynamicPropertyIntoObj(dest, src, prop.serializationProperty, true);
|
|
8426
|
+
}
|
|
8427
|
+
if (prop.alternativeName) {
|
|
8428
|
+
_this.addDynamicPropertyIntoObj(dest, src, prop.alternativeName, false);
|
|
8383
8429
|
}
|
|
8430
|
+
});
|
|
8431
|
+
};
|
|
8432
|
+
JsonMetadata.prototype.addDynamicPropertyIntoObj = function (dest, src, propName, isReadOnly) {
|
|
8433
|
+
var desc = {
|
|
8434
|
+
configurable: true,
|
|
8435
|
+
get: function () {
|
|
8436
|
+
return src[propName];
|
|
8437
|
+
},
|
|
8438
|
+
};
|
|
8439
|
+
if (!isReadOnly) {
|
|
8440
|
+
desc["set"] = function (v) {
|
|
8441
|
+
src[propName] = v;
|
|
8442
|
+
};
|
|
8384
8443
|
}
|
|
8385
|
-
|
|
8444
|
+
Object.defineProperty(dest, propName, desc);
|
|
8386
8445
|
};
|
|
8387
8446
|
JsonMetadata.prototype.getDynamicPropertiesByObj = function (obj, dynamicType) {
|
|
8388
8447
|
if (dynamicType === void 0) { dynamicType = null; }
|
|
8389
|
-
if (!obj || !obj.getType
|
|
8448
|
+
if (!obj || !obj.getType)
|
|
8449
|
+
return [];
|
|
8450
|
+
if (!!obj.getDynamicProperties)
|
|
8451
|
+
return obj.getDynamicProperties();
|
|
8452
|
+
if (!obj.getDynamicType && !dynamicType)
|
|
8390
8453
|
return [];
|
|
8391
|
-
var objType = obj.getType();
|
|
8392
8454
|
var dType = !!dynamicType ? dynamicType : obj.getDynamicType();
|
|
8393
|
-
|
|
8455
|
+
return this.getDynamicPropertiesByTypes(obj.getType(), dType);
|
|
8456
|
+
};
|
|
8457
|
+
JsonMetadata.prototype.getDynamicPropertiesByTypes = function (objType, dynamicType, invalidNames) {
|
|
8458
|
+
if (!dynamicType)
|
|
8394
8459
|
return [];
|
|
8395
|
-
var cacheType =
|
|
8460
|
+
var cacheType = dynamicType + "-" + objType;
|
|
8396
8461
|
if (this.dynamicPropsCache[cacheType])
|
|
8397
8462
|
return this.dynamicPropsCache[cacheType];
|
|
8398
|
-
var dynamicProps = this.getProperties(
|
|
8463
|
+
var dynamicProps = this.getProperties(dynamicType);
|
|
8399
8464
|
if (!dynamicProps || dynamicProps.length == 0)
|
|
8400
8465
|
return [];
|
|
8401
8466
|
var hash = {};
|
|
@@ -8404,9 +8469,11 @@ var JsonMetadata = /** @class */ (function () {
|
|
|
8404
8469
|
hash[props[i].name] = props[i];
|
|
8405
8470
|
}
|
|
8406
8471
|
var res = [];
|
|
8407
|
-
|
|
8408
|
-
|
|
8409
|
-
|
|
8472
|
+
if (!invalidNames)
|
|
8473
|
+
invalidNames = [];
|
|
8474
|
+
for (var i_1 = 0; i_1 < dynamicProps.length; i_1++) {
|
|
8475
|
+
var dProp = dynamicProps[i_1];
|
|
8476
|
+
if (!hash[dProp.name] && invalidNames.indexOf(dProp.name) < 0) {
|
|
8410
8477
|
res.push(dProp);
|
|
8411
8478
|
}
|
|
8412
8479
|
}
|
|
@@ -8901,9 +8968,8 @@ var JsonObject = /** @class */ (function () {
|
|
|
8901
8968
|
enumerable: false,
|
|
8902
8969
|
configurable: true
|
|
8903
8970
|
});
|
|
8904
|
-
JsonObject.prototype.toJsonObject = function (obj,
|
|
8905
|
-
|
|
8906
|
-
return this.toJsonObjectCore(obj, null, storeDefaults);
|
|
8971
|
+
JsonObject.prototype.toJsonObject = function (obj, options) {
|
|
8972
|
+
return this.toJsonObjectCore(obj, null, options);
|
|
8907
8973
|
};
|
|
8908
8974
|
JsonObject.prototype.toObject = function (jsonObj, obj, options) {
|
|
8909
8975
|
this.toObjectCore(jsonObj, obj, options);
|
|
@@ -8952,8 +9018,7 @@ var JsonObject = /** @class */ (function () {
|
|
|
8952
9018
|
obj.endLoadingFromJson();
|
|
8953
9019
|
}
|
|
8954
9020
|
};
|
|
8955
|
-
JsonObject.prototype.toJsonObjectCore = function (obj, property,
|
|
8956
|
-
if (storeDefaults === void 0) { storeDefaults = false; }
|
|
9021
|
+
JsonObject.prototype.toJsonObjectCore = function (obj, property, options) {
|
|
8957
9022
|
if (!obj || !obj.getType)
|
|
8958
9023
|
return obj;
|
|
8959
9024
|
if (typeof obj.getData === "function")
|
|
@@ -8962,61 +9027,67 @@ var JsonObject = /** @class */ (function () {
|
|
|
8962
9027
|
if (property != null && !property.className) {
|
|
8963
9028
|
result[JsonObject.typePropertyName] = property.getObjType(obj.getType());
|
|
8964
9029
|
}
|
|
8965
|
-
|
|
8966
|
-
|
|
9030
|
+
var storeDefaults = options === true;
|
|
9031
|
+
if (!options || options === true) {
|
|
9032
|
+
options = {};
|
|
9033
|
+
}
|
|
9034
|
+
if (storeDefaults) {
|
|
9035
|
+
options.storeDefaults = storeDefaults;
|
|
9036
|
+
}
|
|
9037
|
+
this.propertiesToJson(obj, Serializer.getProperties(obj.getType()), result, options);
|
|
9038
|
+
this.propertiesToJson(obj, this.getDynamicProperties(obj), result, options);
|
|
8967
9039
|
return result;
|
|
8968
9040
|
};
|
|
8969
9041
|
JsonObject.prototype.getDynamicProperties = function (obj) {
|
|
8970
9042
|
return Serializer.getDynamicPropertiesByObj(obj);
|
|
8971
9043
|
};
|
|
8972
|
-
JsonObject.prototype.addDynamicProperties = function (obj, jsonObj,
|
|
8973
|
-
if (!obj.getDynamicPropertyName)
|
|
8974
|
-
return
|
|
8975
|
-
|
|
8976
|
-
|
|
8977
|
-
|
|
8978
|
-
|
|
8979
|
-
|
|
8980
|
-
|
|
8981
|
-
|
|
8982
|
-
var res = [];
|
|
8983
|
-
for (var i = 0; i < properties.length; i++) {
|
|
8984
|
-
res.push(properties[i]);
|
|
8985
|
-
}
|
|
8986
|
-
for (var i = 0; i < dynamicProperties.length; i++) {
|
|
8987
|
-
res.push(dynamicProperties[i]);
|
|
9044
|
+
JsonObject.prototype.addDynamicProperties = function (obj, jsonObj, props) {
|
|
9045
|
+
if (!obj.getDynamicPropertyName && !obj.getDynamicProperties)
|
|
9046
|
+
return props;
|
|
9047
|
+
if (obj.getDynamicPropertyName) {
|
|
9048
|
+
var dynamicPropName = obj.getDynamicPropertyName();
|
|
9049
|
+
if (!dynamicPropName)
|
|
9050
|
+
return props;
|
|
9051
|
+
if (dynamicPropName && jsonObj[dynamicPropName]) {
|
|
9052
|
+
obj[dynamicPropName] = jsonObj[dynamicPropName];
|
|
9053
|
+
}
|
|
8988
9054
|
}
|
|
8989
|
-
|
|
9055
|
+
var dynamicProps = this.getDynamicProperties(obj);
|
|
9056
|
+
return dynamicProps.length === 0 ? props : [].concat(props).concat(dynamicProps);
|
|
8990
9057
|
};
|
|
8991
|
-
JsonObject.prototype.propertiesToJson = function (obj, properties, json,
|
|
8992
|
-
if (storeDefaults === void 0) { storeDefaults = false; }
|
|
9058
|
+
JsonObject.prototype.propertiesToJson = function (obj, properties, json, options) {
|
|
8993
9059
|
for (var i = 0; i < properties.length; i++) {
|
|
8994
|
-
this.valueToJson(obj, json, properties[i],
|
|
9060
|
+
this.valueToJson(obj, json, properties[i], options);
|
|
8995
9061
|
}
|
|
8996
9062
|
};
|
|
8997
|
-
JsonObject.prototype.valueToJson = function (obj, result,
|
|
8998
|
-
if (
|
|
8999
|
-
|
|
9000
|
-
|
|
9063
|
+
JsonObject.prototype.valueToJson = function (obj, result, prop, options) {
|
|
9064
|
+
if (!options)
|
|
9065
|
+
options = {};
|
|
9066
|
+
if (prop.isSerializable === false || (prop.isLightSerializable === false && this.lightSerializing))
|
|
9067
|
+
return;
|
|
9068
|
+
if (options.version && !prop.isAvailableInVersion(options.version))
|
|
9001
9069
|
return;
|
|
9002
|
-
var value =
|
|
9003
|
-
if (!storeDefaults &&
|
|
9070
|
+
var value = prop.getSerializableValue(obj);
|
|
9071
|
+
if (!options.storeDefaults && prop.isDefaultValueByObj(obj, value))
|
|
9004
9072
|
return;
|
|
9005
9073
|
if (this.isValueArray(value)) {
|
|
9006
9074
|
var arrValue = [];
|
|
9007
9075
|
for (var i = 0; i < value.length; i++) {
|
|
9008
|
-
arrValue.push(this.toJsonObjectCore(value[i],
|
|
9076
|
+
arrValue.push(this.toJsonObjectCore(value[i], prop, options));
|
|
9009
9077
|
}
|
|
9010
9078
|
value = arrValue.length > 0 ? arrValue : null;
|
|
9011
9079
|
}
|
|
9012
9080
|
else {
|
|
9013
|
-
value = this.toJsonObjectCore(value,
|
|
9081
|
+
value = this.toJsonObjectCore(value, prop, options);
|
|
9014
9082
|
}
|
|
9083
|
+
if (value === undefined || value === null)
|
|
9084
|
+
return;
|
|
9085
|
+
var name = prop.getSerializedName(options.version);
|
|
9015
9086
|
var hasValue = typeof obj["getPropertyValue"] === "function" &&
|
|
9016
|
-
obj["getPropertyValue"](
|
|
9017
|
-
if ((storeDefaults && hasValue) || !
|
|
9018
|
-
if (!Serializer.onSerializingProperty || !Serializer.onSerializingProperty(obj,
|
|
9019
|
-
result[
|
|
9087
|
+
obj["getPropertyValue"](name, null) !== null;
|
|
9088
|
+
if ((options.storeDefaults && hasValue) || !prop.isDefaultValueByObj(obj, value)) {
|
|
9089
|
+
if (!Serializer.onSerializingProperty || !Serializer.onSerializingProperty(obj, prop, value, result)) {
|
|
9090
|
+
result[name] = this.removePosOnValueToJson(prop, value);
|
|
9020
9091
|
}
|
|
9021
9092
|
}
|
|
9022
9093
|
};
|
|
@@ -9056,6 +9127,14 @@ var JsonObject = /** @class */ (function () {
|
|
|
9056
9127
|
}
|
|
9057
9128
|
}
|
|
9058
9129
|
};
|
|
9130
|
+
JsonObject.prototype.removePosOnValueToJson = function (property, value) {
|
|
9131
|
+
if (!property.isCustom || !value)
|
|
9132
|
+
return value;
|
|
9133
|
+
if (!!value[JsonObject.positionPropertyName]) {
|
|
9134
|
+
delete value[JsonObject.positionPropertyName];
|
|
9135
|
+
}
|
|
9136
|
+
return value;
|
|
9137
|
+
};
|
|
9059
9138
|
JsonObject.prototype.removePos = function (property, value) {
|
|
9060
9139
|
if (!property || !property.type || property.type.indexOf("value") < 0)
|
|
9061
9140
|
return;
|
|
@@ -9831,6 +9910,8 @@ var englishStrings = {
|
|
|
9831
9910
|
startSurveyText: "Start",
|
|
9832
9911
|
otherItemText: "Other (describe)",
|
|
9833
9912
|
noneItemText: "None",
|
|
9913
|
+
refuseItemText: "Refuse to answer",
|
|
9914
|
+
dontKnowItemText: "Don't know",
|
|
9834
9915
|
selectAllItemText: "Select All",
|
|
9835
9916
|
progressText: "Page {0} of {1}",
|
|
9836
9917
|
indexText: "{0} of {1}",
|
|
@@ -10176,7 +10257,7 @@ var SurveyQuestionBoolean = /** @class */ (function (_super) {
|
|
|
10176
10257
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { className: itemClass, onClick: this.handleOnClick },
|
|
10177
10258
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { ref: this.checkRef, type: "checkbox", name: this.question.name, value: this.question.booleanValue === null
|
|
10178
10259
|
? ""
|
|
10179
|
-
: 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.
|
|
10260
|
+
: 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 }),
|
|
10180
10261
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.sliderGhost, onClick: function (event) { return _this.handleOnLabelClick(event, false); } },
|
|
10181
10262
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.question.getLabelCss(false) }, this.renderLocString(this.question.locLabelFalse))),
|
|
10182
10263
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.switch, onClick: this.handleOnSwitchClick },
|
|
@@ -14508,25 +14589,22 @@ _element_factory__WEBPACK_IMPORTED_MODULE_3__["ReactElementFactory"].Instance.re
|
|
|
14508
14589
|
|
|
14509
14590
|
/***/ }),
|
|
14510
14591
|
|
|
14511
|
-
/***/ "./src/react/
|
|
14512
|
-
|
|
14513
|
-
!*** ./src/react/
|
|
14514
|
-
|
|
14515
|
-
/*! exports provided:
|
|
14592
|
+
/***/ "./src/react/progress.tsx":
|
|
14593
|
+
/*!********************************!*\
|
|
14594
|
+
!*** ./src/react/progress.tsx ***!
|
|
14595
|
+
\********************************/
|
|
14596
|
+
/*! exports provided: SurveyProgress */
|
|
14516
14597
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
14517
14598
|
|
|
14518
14599
|
"use strict";
|
|
14519
14600
|
__webpack_require__.r(__webpack_exports__);
|
|
14520
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
14601
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyProgress", function() { return SurveyProgress; });
|
|
14521
14602
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
14522
14603
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
14523
14604
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "survey-core");
|
|
14524
14605
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_1__);
|
|
14525
|
-
/* harmony import */ var
|
|
14526
|
-
/* harmony import */ var
|
|
14527
|
-
/* harmony import */ var _components_rating_rating_dropdown_item__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/rating/rating-dropdown-item */ "./src/react/components/rating/rating-dropdown-item.tsx");
|
|
14528
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RatingDropdownItem", function() { return _components_rating_rating_dropdown_item__WEBPACK_IMPORTED_MODULE_4__["RatingDropdownItem"]; });
|
|
14529
|
-
|
|
14606
|
+
/* harmony import */ var _reactSurveyNavigationBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactSurveyNavigationBase */ "./src/react/reactSurveyNavigationBase.tsx");
|
|
14607
|
+
/* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./element-factory */ "./src/react/element-factory.tsx");
|
|
14530
14608
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
14531
14609
|
var extendStatics = function (d, b) {
|
|
14532
14610
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -14546,45 +14624,76 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
|
14546
14624
|
|
|
14547
14625
|
|
|
14548
14626
|
|
|
14549
|
-
|
|
14550
|
-
|
|
14551
|
-
|
|
14552
|
-
function SurveyQuestionRatingDropdown(props) {
|
|
14627
|
+
var SurveyProgress = /** @class */ (function (_super) {
|
|
14628
|
+
__extends(SurveyProgress, _super);
|
|
14629
|
+
function SurveyProgress(props) {
|
|
14553
14630
|
return _super.call(this, props) || this;
|
|
14554
14631
|
}
|
|
14555
|
-
|
|
14556
|
-
|
|
14557
|
-
|
|
14558
|
-
|
|
14632
|
+
Object.defineProperty(SurveyProgress.prototype, "isTop", {
|
|
14633
|
+
get: function () {
|
|
14634
|
+
return this.props.isTop;
|
|
14635
|
+
},
|
|
14636
|
+
enumerable: false,
|
|
14637
|
+
configurable: true
|
|
14638
|
+
});
|
|
14639
|
+
Object.defineProperty(SurveyProgress.prototype, "progress", {
|
|
14640
|
+
get: function () {
|
|
14641
|
+
return this.survey.progressValue;
|
|
14642
|
+
},
|
|
14643
|
+
enumerable: false,
|
|
14644
|
+
configurable: true
|
|
14645
|
+
});
|
|
14646
|
+
Object.defineProperty(SurveyProgress.prototype, "progressText", {
|
|
14647
|
+
get: function () {
|
|
14648
|
+
return this.survey.progressText;
|
|
14649
|
+
},
|
|
14650
|
+
enumerable: false,
|
|
14651
|
+
configurable: true
|
|
14652
|
+
});
|
|
14653
|
+
SurveyProgress.prototype.render = function () {
|
|
14654
|
+
var progressStyle = {
|
|
14655
|
+
width: this.progress + "%",
|
|
14656
|
+
};
|
|
14657
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.survey.getProgressCssClasses(this.props.container) },
|
|
14658
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { style: progressStyle, className: this.css.progressBar, role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": "progress" },
|
|
14659
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: survey_core__WEBPACK_IMPORTED_MODULE_1__["SurveyProgressModel"].getProgressTextInBarCss(this.css) }, this.progressText)),
|
|
14660
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: survey_core__WEBPACK_IMPORTED_MODULE_1__["SurveyProgressModel"].getProgressTextUnderBarCss(this.css) }, this.progressText)));
|
|
14559
14661
|
};
|
|
14560
|
-
return
|
|
14561
|
-
}(
|
|
14662
|
+
return SurveyProgress;
|
|
14663
|
+
}(_reactSurveyNavigationBase__WEBPACK_IMPORTED_MODULE_2__["SurveyNavigationBase"]));
|
|
14562
14664
|
|
|
14563
|
-
|
|
14564
|
-
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](
|
|
14665
|
+
_element_factory__WEBPACK_IMPORTED_MODULE_3__["ReactElementFactory"].Instance.registerElement("sv-progress-pages", function (props) {
|
|
14666
|
+
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyProgress, props);
|
|
14667
|
+
});
|
|
14668
|
+
_element_factory__WEBPACK_IMPORTED_MODULE_3__["ReactElementFactory"].Instance.registerElement("sv-progress-questions", function (props) {
|
|
14669
|
+
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyProgress, props);
|
|
14670
|
+
});
|
|
14671
|
+
_element_factory__WEBPACK_IMPORTED_MODULE_3__["ReactElementFactory"].Instance.registerElement("sv-progress-correctquestions", function (props) {
|
|
14672
|
+
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyProgress, props);
|
|
14673
|
+
});
|
|
14674
|
+
_element_factory__WEBPACK_IMPORTED_MODULE_3__["ReactElementFactory"].Instance.registerElement("sv-progress-requiredquestions", function (props) {
|
|
14675
|
+
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyProgress, props);
|
|
14565
14676
|
});
|
|
14566
|
-
survey_core__WEBPACK_IMPORTED_MODULE_1__["RendererFactory"].Instance.registerRenderer("rating", "dropdown", "sv-rating-dropdown");
|
|
14567
14677
|
|
|
14568
14678
|
|
|
14569
14679
|
/***/ }),
|
|
14570
14680
|
|
|
14571
|
-
/***/ "./src/react/
|
|
14572
|
-
|
|
14573
|
-
!*** ./src/react/
|
|
14574
|
-
|
|
14575
|
-
/*! exports provided:
|
|
14681
|
+
/***/ "./src/react/progressButtons.tsx":
|
|
14682
|
+
/*!***************************************!*\
|
|
14683
|
+
!*** ./src/react/progressButtons.tsx ***!
|
|
14684
|
+
\***************************************/
|
|
14685
|
+
/*! exports provided: SurveyProgressButtons */
|
|
14576
14686
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
14577
14687
|
|
|
14578
14688
|
"use strict";
|
|
14579
14689
|
__webpack_require__.r(__webpack_exports__);
|
|
14580
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
14581
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyWindow", function() { return SurveyWindow; });
|
|
14690
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyProgressButtons", function() { return SurveyProgressButtons; });
|
|
14582
14691
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
14583
14692
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
14584
14693
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "survey-core");
|
|
14585
14694
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_1__);
|
|
14586
|
-
/* harmony import */ var
|
|
14587
|
-
/* harmony import */ var
|
|
14695
|
+
/* harmony import */ var _reactSurveyNavigationBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactSurveyNavigationBase */ "./src/react/reactSurveyNavigationBase.tsx");
|
|
14696
|
+
/* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./element-factory */ "./src/react/element-factory.tsx");
|
|
14588
14697
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
14589
14698
|
var extendStatics = function (d, b) {
|
|
14590
14699
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -14604,133 +14713,184 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
|
14604
14713
|
|
|
14605
14714
|
|
|
14606
14715
|
|
|
14607
|
-
var
|
|
14608
|
-
__extends(
|
|
14609
|
-
function
|
|
14716
|
+
var SurveyProgressButtons = /** @class */ (function (_super) {
|
|
14717
|
+
__extends(SurveyProgressButtons, _super);
|
|
14718
|
+
function SurveyProgressButtons(props) {
|
|
14610
14719
|
var _this = _super.call(this, props) || this;
|
|
14611
|
-
_this.
|
|
14720
|
+
_this.listContainerRef = react__WEBPACK_IMPORTED_MODULE_0__["createRef"]();
|
|
14612
14721
|
return _this;
|
|
14613
14722
|
}
|
|
14614
|
-
|
|
14615
|
-
|
|
14723
|
+
Object.defineProperty(SurveyProgressButtons.prototype, "model", {
|
|
14724
|
+
get: function () {
|
|
14725
|
+
return this.props.model;
|
|
14726
|
+
},
|
|
14727
|
+
enumerable: false,
|
|
14728
|
+
configurable: true
|
|
14729
|
+
});
|
|
14730
|
+
Object.defineProperty(SurveyProgressButtons.prototype, "container", {
|
|
14731
|
+
get: function () {
|
|
14732
|
+
return this.props.container;
|
|
14733
|
+
},
|
|
14734
|
+
enumerable: false,
|
|
14735
|
+
configurable: true
|
|
14736
|
+
});
|
|
14737
|
+
SurveyProgressButtons.prototype.onResize = function (canShowItemTitles) {
|
|
14738
|
+
this.setState({ canShowItemTitles: canShowItemTitles });
|
|
14739
|
+
this.setState({ canShowHeader: !canShowItemTitles });
|
|
14616
14740
|
};
|
|
14617
|
-
|
|
14618
|
-
this.
|
|
14741
|
+
SurveyProgressButtons.prototype.onUpdateScroller = function (hasScroller) {
|
|
14742
|
+
this.setState({ hasScroller: hasScroller });
|
|
14619
14743
|
};
|
|
14620
|
-
|
|
14621
|
-
|
|
14744
|
+
SurveyProgressButtons.prototype.onUpdateSettings = function () {
|
|
14745
|
+
this.setState({ canShowItemTitles: this.model.showItemTitles });
|
|
14746
|
+
this.setState({ canShowFooter: !this.model.showItemTitles });
|
|
14622
14747
|
};
|
|
14623
|
-
|
|
14748
|
+
SurveyProgressButtons.prototype.render = function () {
|
|
14624
14749
|
var _this = this;
|
|
14625
|
-
|
|
14626
|
-
|
|
14627
|
-
|
|
14628
|
-
|
|
14629
|
-
|
|
14630
|
-
|
|
14631
|
-
|
|
14632
|
-
|
|
14633
|
-
|
|
14634
|
-
|
|
14635
|
-
|
|
14636
|
-
|
|
14637
|
-
|
|
14638
|
-
|
|
14639
|
-
var headerCss = popup.cssHeaderRoot;
|
|
14640
|
-
var titleCollapsed = null;
|
|
14641
|
-
var expandCollapseIcon;
|
|
14642
|
-
var closeButton = null;
|
|
14643
|
-
if (popup.isCollapsed) {
|
|
14644
|
-
headerCss += " " + popup.cssRootCollapsedMod;
|
|
14645
|
-
titleCollapsed = this.renderTitleCollapsed(popup);
|
|
14646
|
-
expandCollapseIcon = this.renderExpandIcon();
|
|
14647
|
-
}
|
|
14648
|
-
else {
|
|
14649
|
-
expandCollapseIcon = this.renderCollapseIcon();
|
|
14650
|
-
}
|
|
14651
|
-
if (popup.allowClose) {
|
|
14652
|
-
closeButton = this.renderCloseButton(this.popup);
|
|
14653
|
-
}
|
|
14654
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: popup.cssHeaderRoot },
|
|
14655
|
-
titleCollapsed,
|
|
14656
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: popup.cssHeaderButtonsContainer },
|
|
14657
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: popup.cssHeaderCollapseButton, onClick: this.handleOnExpanded }, expandCollapseIcon),
|
|
14658
|
-
closeButton)));
|
|
14659
|
-
};
|
|
14660
|
-
PopupSurvey.prototype.renderTitleCollapsed = function (popup) {
|
|
14661
|
-
if (!popup.locTitle)
|
|
14662
|
-
return null;
|
|
14663
|
-
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: popup.cssHeaderTitleCollapsed }, popup.locTitle.renderedHtml);
|
|
14750
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.model.getRootCss(this.props.container), role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": "progress" },
|
|
14751
|
+
this.state.canShowHeader ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.progressButtonsHeader },
|
|
14752
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.progressButtonsPageTitle, title: this.model.headerText }, this.model.headerText)) : null,
|
|
14753
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.progressButtonsContainer },
|
|
14754
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.model.getScrollButtonCss(this.state.hasScroller, true), role: "button", onClick: function () {
|
|
14755
|
+
return _this.clickScrollButton(_this.listContainerRef.current, true);
|
|
14756
|
+
} }),
|
|
14757
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.progressButtonsListContainer, ref: this.listContainerRef },
|
|
14758
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("ul", { className: this.css.progressButtonsList }, this.getListElements())),
|
|
14759
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.model.getScrollButtonCss(this.state.hasScroller, false), role: "button", onClick: function () {
|
|
14760
|
+
return _this.clickScrollButton(_this.listContainerRef.current, false);
|
|
14761
|
+
} })),
|
|
14762
|
+
this.state.canShowFooter ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.progressButtonsFooter },
|
|
14763
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.progressButtonsPageTitle, title: this.model.footerText }, this.model.footerText)) : null));
|
|
14664
14764
|
};
|
|
14665
|
-
|
|
14666
|
-
|
|
14765
|
+
SurveyProgressButtons.prototype.getListElements = function () {
|
|
14766
|
+
var _this = this;
|
|
14767
|
+
var buttons = [];
|
|
14768
|
+
this.survey.visiblePages.forEach(function (page, index) {
|
|
14769
|
+
buttons.push(_this.renderListElement(page, index));
|
|
14770
|
+
});
|
|
14771
|
+
return buttons;
|
|
14667
14772
|
};
|
|
14668
|
-
|
|
14669
|
-
|
|
14773
|
+
SurveyProgressButtons.prototype.renderListElement = function (page, index) {
|
|
14774
|
+
var _this = this;
|
|
14775
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("li", { key: "listelement" + index, className: this.model.getListElementCss(index), onClick: this.model.isListElementClickable(index)
|
|
14776
|
+
? function () { return _this.model.clickListElement(page); }
|
|
14777
|
+
: undefined, "data-page-number": this.model.getItemNumber(page) },
|
|
14778
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.progressButtonsConnector }),
|
|
14779
|
+
this.state.canShowItemTitles ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null,
|
|
14780
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.progressButtonsPageTitle, title: page.renderedNavigationTitle }, page.renderedNavigationTitle),
|
|
14781
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.progressButtonsPageDescription, title: page.navigationDescription }, page.navigationDescription)) : null));
|
|
14670
14782
|
};
|
|
14671
|
-
|
|
14672
|
-
|
|
14673
|
-
|
|
14783
|
+
SurveyProgressButtons.prototype.clickScrollButton = function (listContainerElement, isLeftScroll) {
|
|
14784
|
+
if (!!listContainerElement) {
|
|
14785
|
+
listContainerElement.scrollLeft += (isLeftScroll ? -1 : 1) * 70;
|
|
14786
|
+
}
|
|
14674
14787
|
};
|
|
14675
|
-
|
|
14676
|
-
|
|
14788
|
+
SurveyProgressButtons.prototype.componentDidMount = function () {
|
|
14789
|
+
var _this = this;
|
|
14790
|
+
_super.prototype.componentDidMount.call(this);
|
|
14791
|
+
setTimeout(function () {
|
|
14792
|
+
_this.respManager = new survey_core__WEBPACK_IMPORTED_MODULE_1__["ProgressButtonsResponsivityManager"](_this.model, _this.listContainerRef.current, _this);
|
|
14793
|
+
}, 10);
|
|
14677
14794
|
};
|
|
14678
|
-
|
|
14679
|
-
|
|
14680
|
-
|
|
14681
|
-
_super.prototype.createSurvey.call(this, newProps);
|
|
14682
|
-
this.popup = new survey_core__WEBPACK_IMPORTED_MODULE_1__["PopupSurveyModel"](null, this.survey);
|
|
14683
|
-
if (newProps.closeOnCompleteTimeout) {
|
|
14684
|
-
this.popup.closeOnCompleteTimeout = newProps.closeOnCompleteTimeout;
|
|
14685
|
-
}
|
|
14686
|
-
this.popup.allowClose = newProps.allowClose;
|
|
14687
|
-
this.popup.isShowing = true;
|
|
14688
|
-
if (!this.popup.isExpanded && (newProps.expanded || newProps.isExpanded))
|
|
14689
|
-
this.popup.expand();
|
|
14795
|
+
SurveyProgressButtons.prototype.componentWillUnmount = function () {
|
|
14796
|
+
this.respManager.dispose();
|
|
14797
|
+
_super.prototype.componentWillUnmount.call(this);
|
|
14690
14798
|
};
|
|
14691
|
-
return
|
|
14692
|
-
}(
|
|
14799
|
+
return SurveyProgressButtons;
|
|
14800
|
+
}(_reactSurveyNavigationBase__WEBPACK_IMPORTED_MODULE_2__["SurveyNavigationBase"]));
|
|
14693
14801
|
|
|
14694
|
-
|
|
14695
|
-
|
|
14696
|
-
|
|
14697
|
-
|
|
14698
|
-
|
|
14699
|
-
|
|
14802
|
+
_element_factory__WEBPACK_IMPORTED_MODULE_3__["ReactElementFactory"].Instance.registerElement("sv-progress-buttons", function (props) {
|
|
14803
|
+
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyProgressButtons, props);
|
|
14804
|
+
});
|
|
14805
|
+
|
|
14806
|
+
|
|
14807
|
+
/***/ }),
|
|
14808
|
+
|
|
14809
|
+
/***/ "./src/react/progressToc.tsx":
|
|
14810
|
+
/*!***********************************!*\
|
|
14811
|
+
!*** ./src/react/progressToc.tsx ***!
|
|
14812
|
+
\***********************************/
|
|
14813
|
+
/*! exports provided: SurveyProgressToc */
|
|
14814
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
14815
|
+
|
|
14816
|
+
"use strict";
|
|
14817
|
+
__webpack_require__.r(__webpack_exports__);
|
|
14818
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyProgressToc", function() { return SurveyProgressToc; });
|
|
14819
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
14820
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
14821
|
+
/* harmony import */ var _reactSurveyNavigationBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactSurveyNavigationBase */ "./src/react/reactSurveyNavigationBase.tsx");
|
|
14822
|
+
/* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./element-factory */ "./src/react/element-factory.tsx");
|
|
14823
|
+
/* harmony import */ var _components_list_list__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/list/list */ "./src/react/components/list/list.tsx");
|
|
14824
|
+
/* harmony import */ var _components_popup_popup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/popup/popup */ "./src/react/components/popup/popup.tsx");
|
|
14825
|
+
/* 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");
|
|
14826
|
+
var __extends = (undefined && undefined.__extends) || (function () {
|
|
14827
|
+
var extendStatics = function (d, b) {
|
|
14828
|
+
extendStatics = Object.setPrototypeOf ||
|
|
14829
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
14830
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
14831
|
+
return extendStatics(d, b);
|
|
14832
|
+
};
|
|
14833
|
+
return function (d, b) {
|
|
14834
|
+
if (typeof b !== "function" && b !== null)
|
|
14835
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
14836
|
+
extendStatics(d, b);
|
|
14837
|
+
function __() { this.constructor = d; }
|
|
14838
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14839
|
+
};
|
|
14840
|
+
})();
|
|
14841
|
+
|
|
14842
|
+
|
|
14843
|
+
|
|
14844
|
+
|
|
14845
|
+
|
|
14846
|
+
|
|
14847
|
+
var SurveyProgressToc = /** @class */ (function (_super) {
|
|
14848
|
+
__extends(SurveyProgressToc, _super);
|
|
14849
|
+
function SurveyProgressToc() {
|
|
14700
14850
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
14701
14851
|
}
|
|
14702
|
-
|
|
14703
|
-
|
|
14852
|
+
SurveyProgressToc.prototype.render = function () {
|
|
14853
|
+
var tocModel = this.props.model;
|
|
14854
|
+
var content;
|
|
14855
|
+
if (tocModel.isMobile) {
|
|
14856
|
+
content = react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { onClick: tocModel.togglePopup },
|
|
14857
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_5__["SvgIcon"], { iconName: tocModel.icon, size: 24 }),
|
|
14858
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_popup_popup__WEBPACK_IMPORTED_MODULE_4__["Popup"], { model: tocModel.popupModel }));
|
|
14859
|
+
}
|
|
14860
|
+
else {
|
|
14861
|
+
content = react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_list_list__WEBPACK_IMPORTED_MODULE_3__["List"], { model: tocModel.listModel });
|
|
14862
|
+
}
|
|
14863
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: tocModel.containerCss }, content));
|
|
14864
|
+
};
|
|
14865
|
+
return SurveyProgressToc;
|
|
14866
|
+
}(_reactSurveyNavigationBase__WEBPACK_IMPORTED_MODULE_1__["SurveyNavigationBase"]));
|
|
14704
14867
|
|
|
14868
|
+
_element_factory__WEBPACK_IMPORTED_MODULE_2__["ReactElementFactory"].Instance.registerElement("sv-navigation-toc", function (props) {
|
|
14869
|
+
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyProgressToc, props);
|
|
14870
|
+
});
|
|
14705
14871
|
|
|
14706
14872
|
|
|
14707
14873
|
/***/ }),
|
|
14708
14874
|
|
|
14709
|
-
/***/ "./src/react/
|
|
14710
|
-
|
|
14711
|
-
!*** ./src/react/
|
|
14712
|
-
|
|
14713
|
-
/*! exports provided:
|
|
14875
|
+
/***/ "./src/react/rating-dropdown.tsx":
|
|
14876
|
+
/*!***************************************!*\
|
|
14877
|
+
!*** ./src/react/rating-dropdown.tsx ***!
|
|
14878
|
+
\***************************************/
|
|
14879
|
+
/*! exports provided: RatingDropdownItem, SurveyQuestionRatingDropdown */
|
|
14714
14880
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
14715
14881
|
|
|
14716
14882
|
"use strict";
|
|
14717
14883
|
__webpack_require__.r(__webpack_exports__);
|
|
14718
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
14719
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "attachKey2click", function() { return attachKey2click; });
|
|
14884
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionRatingDropdown", function() { return SurveyQuestionRatingDropdown; });
|
|
14720
14885
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
14721
14886
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
14722
14887
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "survey-core");
|
|
14723
14888
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_1__);
|
|
14724
|
-
/* harmony import */ var
|
|
14725
|
-
/* harmony import */ var
|
|
14726
|
-
/* harmony import */ var
|
|
14727
|
-
/* harmony
|
|
14728
|
-
|
|
14729
|
-
/* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./element-factory */ "./src/react/element-factory.tsx");
|
|
14730
|
-
/* harmony import */ var _components_brand_info__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./components/brand-info */ "./src/react/components/brand-info.tsx");
|
|
14731
|
-
/* harmony import */ var _components_notifier__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./components/notifier */ "./src/react/components/notifier.tsx");
|
|
14732
|
-
/* harmony import */ var _components_components_container__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./components/components-container */ "./src/react/components/components-container.tsx");
|
|
14733
|
-
/* harmony import */ var _svgbundle__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./svgbundle */ "./src/react/svgbundle.tsx");
|
|
14889
|
+
/* harmony import */ var _dropdown_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dropdown-base */ "./src/react/dropdown-base.tsx");
|
|
14890
|
+
/* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactquestion_factory */ "./src/react/reactquestion_factory.tsx");
|
|
14891
|
+
/* harmony import */ var _components_rating_rating_dropdown_item__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/rating/rating-dropdown-item */ "./src/react/components/rating/rating-dropdown-item.tsx");
|
|
14892
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RatingDropdownItem", function() { return _components_rating_rating_dropdown_item__WEBPACK_IMPORTED_MODULE_4__["RatingDropdownItem"]; });
|
|
14893
|
+
|
|
14734
14894
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
14735
14895
|
var extendStatics = function (d, b) {
|
|
14736
14896
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -14746,105 +14906,309 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
|
14746
14906
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14747
14907
|
};
|
|
14748
14908
|
})();
|
|
14749
|
-
var __assign = (undefined && undefined.__assign) || function () {
|
|
14750
|
-
__assign = Object.assign || function(t) {
|
|
14751
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
14752
|
-
s = arguments[i];
|
|
14753
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
14754
|
-
t[p] = s[p];
|
|
14755
|
-
}
|
|
14756
|
-
return t;
|
|
14757
|
-
};
|
|
14758
|
-
return __assign.apply(this, arguments);
|
|
14759
|
-
};
|
|
14760
14909
|
|
|
14761
14910
|
|
|
14762
14911
|
|
|
14763
14912
|
|
|
14764
14913
|
|
|
14914
|
+
var SurveyQuestionRatingDropdown = /** @class */ (function (_super) {
|
|
14915
|
+
__extends(SurveyQuestionRatingDropdown, _super);
|
|
14916
|
+
function SurveyQuestionRatingDropdown(props) {
|
|
14917
|
+
return _super.call(this, props) || this;
|
|
14918
|
+
}
|
|
14919
|
+
SurveyQuestionRatingDropdown.prototype.renderElement = function () {
|
|
14920
|
+
var cssClasses = this.question.cssClasses;
|
|
14921
|
+
var select = this.renderSelect(cssClasses);
|
|
14922
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.rootDropdown }, select));
|
|
14923
|
+
};
|
|
14924
|
+
return SurveyQuestionRatingDropdown;
|
|
14925
|
+
}(_dropdown_base__WEBPACK_IMPORTED_MODULE_2__["SurveyQuestionDropdownBase"]));
|
|
14926
|
+
|
|
14927
|
+
_reactquestion_factory__WEBPACK_IMPORTED_MODULE_3__["ReactQuestionFactory"].Instance.registerQuestion("sv-rating-dropdown", function (props) {
|
|
14928
|
+
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionRatingDropdown, props);
|
|
14929
|
+
});
|
|
14930
|
+
survey_core__WEBPACK_IMPORTED_MODULE_1__["RendererFactory"].Instance.registerRenderer("rating", "dropdown", "sv-rating-dropdown");
|
|
14931
|
+
|
|
14765
14932
|
|
|
14933
|
+
/***/ }),
|
|
14766
14934
|
|
|
14935
|
+
/***/ "./src/react/react-popup-survey.tsx":
|
|
14936
|
+
/*!******************************************!*\
|
|
14937
|
+
!*** ./src/react/react-popup-survey.tsx ***!
|
|
14938
|
+
\******************************************/
|
|
14939
|
+
/*! exports provided: PopupSurvey, SurveyWindow */
|
|
14940
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
14767
14941
|
|
|
14942
|
+
"use strict";
|
|
14943
|
+
__webpack_require__.r(__webpack_exports__);
|
|
14944
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PopupSurvey", function() { return PopupSurvey; });
|
|
14945
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyWindow", function() { return SurveyWindow; });
|
|
14946
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
14947
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
14948
|
+
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "survey-core");
|
|
14949
|
+
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_1__);
|
|
14950
|
+
/* harmony import */ var _reactSurvey__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactSurvey */ "./src/react/reactSurvey.tsx");
|
|
14951
|
+
/* 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");
|
|
14952
|
+
var __extends = (undefined && undefined.__extends) || (function () {
|
|
14953
|
+
var extendStatics = function (d, b) {
|
|
14954
|
+
extendStatics = Object.setPrototypeOf ||
|
|
14955
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
14956
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
14957
|
+
return extendStatics(d, b);
|
|
14958
|
+
};
|
|
14959
|
+
return function (d, b) {
|
|
14960
|
+
if (typeof b !== "function" && b !== null)
|
|
14961
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
14962
|
+
extendStatics(d, b);
|
|
14963
|
+
function __() { this.constructor = d; }
|
|
14964
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14965
|
+
};
|
|
14966
|
+
})();
|
|
14768
14967
|
|
|
14769
14968
|
|
|
14770
14969
|
|
|
14771
14970
|
|
|
14772
|
-
var
|
|
14773
|
-
__extends(
|
|
14774
|
-
function
|
|
14971
|
+
var PopupSurvey = /** @class */ (function (_super) {
|
|
14972
|
+
__extends(PopupSurvey, _super);
|
|
14973
|
+
function PopupSurvey(props) {
|
|
14775
14974
|
var _this = _super.call(this, props) || this;
|
|
14776
|
-
_this.
|
|
14777
|
-
_this.isSurveyUpdated = false;
|
|
14778
|
-
_this.createSurvey(props);
|
|
14779
|
-
_this.updateSurvey(props, {});
|
|
14780
|
-
_this.rootRef = react__WEBPACK_IMPORTED_MODULE_0__["createRef"]();
|
|
14781
|
-
_this.rootNodeId = props.id || null;
|
|
14782
|
-
_this.rootNodeClassName = props.className || "";
|
|
14975
|
+
_this.handleOnExpanded = _this.handleOnExpanded.bind(_this);
|
|
14783
14976
|
return _this;
|
|
14784
14977
|
}
|
|
14785
|
-
|
|
14786
|
-
|
|
14787
|
-
return survey_core__WEBPACK_IMPORTED_MODULE_1__["surveyCss"].currentType;
|
|
14788
|
-
},
|
|
14789
|
-
set: function (value) {
|
|
14790
|
-
survey_core__WEBPACK_IMPORTED_MODULE_1__["StylesManager"].applyTheme(value);
|
|
14791
|
-
},
|
|
14792
|
-
enumerable: false,
|
|
14793
|
-
configurable: true
|
|
14794
|
-
});
|
|
14795
|
-
Survey.prototype.getStateElement = function () {
|
|
14796
|
-
return this.survey;
|
|
14797
|
-
};
|
|
14798
|
-
Survey.prototype.onSurveyUpdated = function () {
|
|
14799
|
-
if (!!this.survey) {
|
|
14800
|
-
var el = this.rootRef.current;
|
|
14801
|
-
if (!!el)
|
|
14802
|
-
this.survey.afterRenderSurvey(el);
|
|
14803
|
-
this.survey.startTimerFromUI();
|
|
14804
|
-
}
|
|
14805
|
-
};
|
|
14806
|
-
Survey.prototype.shouldComponentUpdate = function (nextProps, nextState) {
|
|
14807
|
-
if (!_super.prototype.shouldComponentUpdate.call(this, nextProps, nextState))
|
|
14808
|
-
return false;
|
|
14809
|
-
if (this.isModelJSONChanged(nextProps)) {
|
|
14810
|
-
this.destroySurvey();
|
|
14811
|
-
this.createSurvey(nextProps);
|
|
14812
|
-
this.updateSurvey(nextProps, {});
|
|
14813
|
-
this.isSurveyUpdated = true;
|
|
14814
|
-
}
|
|
14815
|
-
return true;
|
|
14978
|
+
PopupSurvey.prototype.getStateElements = function () {
|
|
14979
|
+
return [this.popup, this.popup.survey];
|
|
14816
14980
|
};
|
|
14817
|
-
|
|
14818
|
-
|
|
14819
|
-
this.updateSurvey(this.props, prevProps);
|
|
14820
|
-
if (this.isSurveyUpdated) {
|
|
14821
|
-
this.onSurveyUpdated();
|
|
14822
|
-
this.isSurveyUpdated = false;
|
|
14823
|
-
}
|
|
14981
|
+
PopupSurvey.prototype.handleOnExpanded = function (event) {
|
|
14982
|
+
this.popup.changeExpandCollapse();
|
|
14824
14983
|
};
|
|
14825
|
-
|
|
14826
|
-
_super.prototype.
|
|
14827
|
-
this.onSurveyUpdated();
|
|
14984
|
+
PopupSurvey.prototype.canRender = function () {
|
|
14985
|
+
return _super.prototype.canRender.call(this) && this.popup.isShowing;
|
|
14828
14986
|
};
|
|
14829
|
-
|
|
14830
|
-
|
|
14831
|
-
|
|
14832
|
-
|
|
14833
|
-
|
|
14834
|
-
|
|
14987
|
+
PopupSurvey.prototype.renderElement = function () {
|
|
14988
|
+
var _this = this;
|
|
14989
|
+
var header = this.renderWindowHeader();
|
|
14990
|
+
var body = this.renderBody();
|
|
14991
|
+
var style = {};
|
|
14992
|
+
if (!!this.popup.renderedWidth) {
|
|
14993
|
+
style.width = this.popup.renderedWidth;
|
|
14994
|
+
style.maxWidth = this.popup.renderedWidth;
|
|
14835
14995
|
}
|
|
14996
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.popup.cssRoot, style: style, onScroll: function () { return _this.popup.onScroll(); } },
|
|
14997
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.popup.cssRootContent },
|
|
14998
|
+
header,
|
|
14999
|
+
body)));
|
|
14836
15000
|
};
|
|
14837
|
-
|
|
14838
|
-
|
|
14839
|
-
|
|
14840
|
-
|
|
14841
|
-
|
|
14842
|
-
var
|
|
14843
|
-
if (
|
|
14844
|
-
|
|
15001
|
+
PopupSurvey.prototype.renderWindowHeader = function () {
|
|
15002
|
+
var popup = this.popup;
|
|
15003
|
+
var headerCss = popup.cssHeaderRoot;
|
|
15004
|
+
var titleCollapsed = null;
|
|
15005
|
+
var expandCollapseIcon;
|
|
15006
|
+
var closeButton = null;
|
|
15007
|
+
if (popup.isCollapsed) {
|
|
15008
|
+
headerCss += " " + popup.cssRootCollapsedMod;
|
|
15009
|
+
titleCollapsed = this.renderTitleCollapsed(popup);
|
|
15010
|
+
expandCollapseIcon = this.renderExpandIcon();
|
|
14845
15011
|
}
|
|
14846
|
-
else
|
|
14847
|
-
|
|
15012
|
+
else {
|
|
15013
|
+
expandCollapseIcon = this.renderCollapseIcon();
|
|
15014
|
+
}
|
|
15015
|
+
if (popup.allowClose) {
|
|
15016
|
+
closeButton = this.renderCloseButton(this.popup);
|
|
15017
|
+
}
|
|
15018
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: popup.cssHeaderRoot },
|
|
15019
|
+
titleCollapsed,
|
|
15020
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: popup.cssHeaderButtonsContainer },
|
|
15021
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: popup.cssHeaderCollapseButton, onClick: this.handleOnExpanded }, expandCollapseIcon),
|
|
15022
|
+
closeButton)));
|
|
15023
|
+
};
|
|
15024
|
+
PopupSurvey.prototype.renderTitleCollapsed = function (popup) {
|
|
15025
|
+
if (!popup.locTitle)
|
|
15026
|
+
return null;
|
|
15027
|
+
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: popup.cssHeaderTitleCollapsed }, popup.locTitle.renderedHtml);
|
|
15028
|
+
};
|
|
15029
|
+
PopupSurvey.prototype.renderExpandIcon = function () {
|
|
15030
|
+
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { iconName: "icon-restore_16x16", size: 16 });
|
|
15031
|
+
};
|
|
15032
|
+
PopupSurvey.prototype.renderCollapseIcon = function () {
|
|
15033
|
+
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { iconName: "icon-minimize_16x16", size: 16 });
|
|
15034
|
+
};
|
|
15035
|
+
PopupSurvey.prototype.renderCloseButton = function (popup) {
|
|
15036
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: popup.cssHeaderCloseButton, onClick: function () { popup.hide(); } },
|
|
15037
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { iconName: "icon-close_16x16", size: 16 })));
|
|
15038
|
+
};
|
|
15039
|
+
PopupSurvey.prototype.renderBody = function () {
|
|
15040
|
+
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.popup.cssBody }, this.doRender());
|
|
15041
|
+
};
|
|
15042
|
+
PopupSurvey.prototype.createSurvey = function (newProps) {
|
|
15043
|
+
if (!newProps)
|
|
15044
|
+
newProps = {};
|
|
15045
|
+
_super.prototype.createSurvey.call(this, newProps);
|
|
15046
|
+
this.popup = new survey_core__WEBPACK_IMPORTED_MODULE_1__["PopupSurveyModel"](null, this.survey);
|
|
15047
|
+
if (newProps.closeOnCompleteTimeout) {
|
|
15048
|
+
this.popup.closeOnCompleteTimeout = newProps.closeOnCompleteTimeout;
|
|
15049
|
+
}
|
|
15050
|
+
this.popup.allowClose = newProps.allowClose;
|
|
15051
|
+
this.popup.isShowing = true;
|
|
15052
|
+
if (!this.popup.isExpanded && (newProps.expanded || newProps.isExpanded))
|
|
15053
|
+
this.popup.expand();
|
|
15054
|
+
};
|
|
15055
|
+
return PopupSurvey;
|
|
15056
|
+
}(_reactSurvey__WEBPACK_IMPORTED_MODULE_2__["Survey"]));
|
|
15057
|
+
|
|
15058
|
+
/**
|
|
15059
|
+
* Obsolete. Please use PopupSurvey
|
|
15060
|
+
*/
|
|
15061
|
+
var SurveyWindow = /** @class */ (function (_super) {
|
|
15062
|
+
__extends(SurveyWindow, _super);
|
|
15063
|
+
function SurveyWindow() {
|
|
15064
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
15065
|
+
}
|
|
15066
|
+
return SurveyWindow;
|
|
15067
|
+
}(PopupSurvey));
|
|
15068
|
+
|
|
15069
|
+
|
|
15070
|
+
|
|
15071
|
+
/***/ }),
|
|
15072
|
+
|
|
15073
|
+
/***/ "./src/react/reactSurvey.tsx":
|
|
15074
|
+
/*!***********************************!*\
|
|
15075
|
+
!*** ./src/react/reactSurvey.tsx ***!
|
|
15076
|
+
\***********************************/
|
|
15077
|
+
/*! exports provided: Survey, attachKey2click */
|
|
15078
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
15079
|
+
|
|
15080
|
+
"use strict";
|
|
15081
|
+
__webpack_require__.r(__webpack_exports__);
|
|
15082
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Survey", function() { return Survey; });
|
|
15083
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "attachKey2click", function() { return attachKey2click; });
|
|
15084
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
15085
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
15086
|
+
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "survey-core");
|
|
15087
|
+
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_1__);
|
|
15088
|
+
/* harmony import */ var _page__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./page */ "./src/react/page.tsx");
|
|
15089
|
+
/* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactquestion_element */ "./src/react/reactquestion_element.tsx");
|
|
15090
|
+
/* harmony import */ var _string_viewer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./string-viewer */ "./src/react/string-viewer.tsx");
|
|
15091
|
+
/* harmony import */ var _components_survey_header_survey_header__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/survey-header/survey-header */ "./src/react/components/survey-header/survey-header.tsx");
|
|
15092
|
+
/* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./reactquestion_factory */ "./src/react/reactquestion_factory.tsx");
|
|
15093
|
+
/* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./element-factory */ "./src/react/element-factory.tsx");
|
|
15094
|
+
/* harmony import */ var _components_brand_info__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./components/brand-info */ "./src/react/components/brand-info.tsx");
|
|
15095
|
+
/* harmony import */ var _components_notifier__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./components/notifier */ "./src/react/components/notifier.tsx");
|
|
15096
|
+
/* harmony import */ var _components_components_container__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./components/components-container */ "./src/react/components/components-container.tsx");
|
|
15097
|
+
/* harmony import */ var _svgbundle__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./svgbundle */ "./src/react/svgbundle.tsx");
|
|
15098
|
+
var __extends = (undefined && undefined.__extends) || (function () {
|
|
15099
|
+
var extendStatics = function (d, b) {
|
|
15100
|
+
extendStatics = Object.setPrototypeOf ||
|
|
15101
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
15102
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
15103
|
+
return extendStatics(d, b);
|
|
15104
|
+
};
|
|
15105
|
+
return function (d, b) {
|
|
15106
|
+
if (typeof b !== "function" && b !== null)
|
|
15107
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
15108
|
+
extendStatics(d, b);
|
|
15109
|
+
function __() { this.constructor = d; }
|
|
15110
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15111
|
+
};
|
|
15112
|
+
})();
|
|
15113
|
+
var __assign = (undefined && undefined.__assign) || function () {
|
|
15114
|
+
__assign = Object.assign || function(t) {
|
|
15115
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
15116
|
+
s = arguments[i];
|
|
15117
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
15118
|
+
t[p] = s[p];
|
|
15119
|
+
}
|
|
15120
|
+
return t;
|
|
15121
|
+
};
|
|
15122
|
+
return __assign.apply(this, arguments);
|
|
15123
|
+
};
|
|
15124
|
+
|
|
15125
|
+
|
|
15126
|
+
|
|
15127
|
+
|
|
15128
|
+
|
|
15129
|
+
|
|
15130
|
+
|
|
15131
|
+
|
|
15132
|
+
|
|
15133
|
+
|
|
15134
|
+
|
|
15135
|
+
|
|
15136
|
+
var Survey = /** @class */ (function (_super) {
|
|
15137
|
+
__extends(Survey, _super);
|
|
15138
|
+
function Survey(props) {
|
|
15139
|
+
var _this = _super.call(this, props) || this;
|
|
15140
|
+
_this.previousJSON = {};
|
|
15141
|
+
_this.isSurveyUpdated = false;
|
|
15142
|
+
_this.createSurvey(props);
|
|
15143
|
+
_this.updateSurvey(props, {});
|
|
15144
|
+
_this.rootRef = react__WEBPACK_IMPORTED_MODULE_0__["createRef"]();
|
|
15145
|
+
_this.rootNodeId = props.id || null;
|
|
15146
|
+
_this.rootNodeClassName = props.className || "";
|
|
15147
|
+
return _this;
|
|
15148
|
+
}
|
|
15149
|
+
Object.defineProperty(Survey, "cssType", {
|
|
15150
|
+
get: function () {
|
|
15151
|
+
return survey_core__WEBPACK_IMPORTED_MODULE_1__["surveyCss"].currentType;
|
|
15152
|
+
},
|
|
15153
|
+
set: function (value) {
|
|
15154
|
+
survey_core__WEBPACK_IMPORTED_MODULE_1__["StylesManager"].applyTheme(value);
|
|
15155
|
+
},
|
|
15156
|
+
enumerable: false,
|
|
15157
|
+
configurable: true
|
|
15158
|
+
});
|
|
15159
|
+
Survey.prototype.getStateElement = function () {
|
|
15160
|
+
return this.survey;
|
|
15161
|
+
};
|
|
15162
|
+
Survey.prototype.onSurveyUpdated = function () {
|
|
15163
|
+
if (!!this.survey) {
|
|
15164
|
+
var el = this.rootRef.current;
|
|
15165
|
+
if (!!el)
|
|
15166
|
+
this.survey.afterRenderSurvey(el);
|
|
15167
|
+
this.survey.startTimerFromUI();
|
|
15168
|
+
}
|
|
15169
|
+
};
|
|
15170
|
+
Survey.prototype.shouldComponentUpdate = function (nextProps, nextState) {
|
|
15171
|
+
if (!_super.prototype.shouldComponentUpdate.call(this, nextProps, nextState))
|
|
15172
|
+
return false;
|
|
15173
|
+
if (this.isModelJSONChanged(nextProps)) {
|
|
15174
|
+
this.destroySurvey();
|
|
15175
|
+
this.createSurvey(nextProps);
|
|
15176
|
+
this.updateSurvey(nextProps, {});
|
|
15177
|
+
this.isSurveyUpdated = true;
|
|
15178
|
+
}
|
|
15179
|
+
return true;
|
|
15180
|
+
};
|
|
15181
|
+
Survey.prototype.componentDidUpdate = function (prevProps, prevState) {
|
|
15182
|
+
_super.prototype.componentDidUpdate.call(this, prevProps, prevState);
|
|
15183
|
+
this.updateSurvey(this.props, prevProps);
|
|
15184
|
+
if (this.isSurveyUpdated) {
|
|
15185
|
+
this.onSurveyUpdated();
|
|
15186
|
+
this.isSurveyUpdated = false;
|
|
15187
|
+
}
|
|
15188
|
+
};
|
|
15189
|
+
Survey.prototype.componentDidMount = function () {
|
|
15190
|
+
_super.prototype.componentDidMount.call(this);
|
|
15191
|
+
this.onSurveyUpdated();
|
|
15192
|
+
};
|
|
15193
|
+
Survey.prototype.destroySurvey = function () {
|
|
15194
|
+
if (this.survey) {
|
|
15195
|
+
this.survey.renderCallback = undefined;
|
|
15196
|
+
this.survey.onPartialSend.clear();
|
|
15197
|
+
this.survey.stopTimer();
|
|
15198
|
+
this.survey.destroyResizeObserver();
|
|
15199
|
+
}
|
|
15200
|
+
};
|
|
15201
|
+
Survey.prototype.componentWillUnmount = function () {
|
|
15202
|
+
_super.prototype.componentWillUnmount.call(this);
|
|
15203
|
+
this.destroySurvey();
|
|
15204
|
+
};
|
|
15205
|
+
Survey.prototype.doRender = function () {
|
|
15206
|
+
var renderResult;
|
|
15207
|
+
if (this.survey.state == "completed") {
|
|
15208
|
+
renderResult = this.renderCompleted();
|
|
15209
|
+
}
|
|
15210
|
+
else if (this.survey.state == "completedbefore") {
|
|
15211
|
+
renderResult = this.renderCompletedBefore();
|
|
14848
15212
|
}
|
|
14849
15213
|
else if (this.survey.state == "loading") {
|
|
14850
15214
|
renderResult = this.renderLoading();
|
|
@@ -14902,451 +15266,171 @@ var Survey = /** @class */ (function (_super) {
|
|
|
14902
15266
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_components_container__WEBPACK_IMPORTED_MODULE_10__["ComponentsContainer"], { survey: this.survey, container: "completePage", needRenderWrapper: false })));
|
|
14903
15267
|
};
|
|
14904
15268
|
Survey.prototype.renderCompletedBefore = function () {
|
|
14905
|
-
var htmlValue = { __html: this.survey.processedCompletedBeforeHtml };
|
|
14906
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { dangerouslySetInnerHTML: htmlValue, className: this.survey.completedBeforeCss }));
|
|
14907
|
-
};
|
|
14908
|
-
Survey.prototype.renderLoading = function () {
|
|
14909
|
-
var htmlValue = { __html: this.survey.processedLoadingHtml };
|
|
14910
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { dangerouslySetInnerHTML: htmlValue, className: this.survey.loadingBodyCss }));
|
|
14911
|
-
};
|
|
14912
|
-
Survey.prototype.renderSurvey = function () {
|
|
14913
|
-
var activePage = this.survey.activePage
|
|
14914
|
-
? this.renderPage(this.survey.activePage)
|
|
14915
|
-
: null;
|
|
14916
|
-
var isStaring = this.survey.isShowStartingPage;
|
|
14917
|
-
var pageId = this.survey.activePage ? this.survey.activePage.id : "";
|
|
14918
|
-
var className = this.survey.bodyCss;
|
|
14919
|
-
var style = {};
|
|
14920
|
-
if (!!this.survey.renderedWidth) {
|
|
14921
|
-
style.maxWidth = this.survey.renderedWidth;
|
|
14922
|
-
}
|
|
14923
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.survey.bodyContainerCss },
|
|
14924
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_components_container__WEBPACK_IMPORTED_MODULE_10__["ComponentsContainer"], { survey: this.survey, container: "left" }),
|
|
14925
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: "sv-components-column sv-components-column--expandable" },
|
|
14926
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_components_container__WEBPACK_IMPORTED_MODULE_10__["ComponentsContainer"], { survey: this.survey, container: "center" }),
|
|
14927
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: pageId, className: className, style: style },
|
|
14928
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_components_container__WEBPACK_IMPORTED_MODULE_10__["ComponentsContainer"], { survey: this.survey, container: "contentTop" }),
|
|
14929
|
-
activePage,
|
|
14930
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_components_container__WEBPACK_IMPORTED_MODULE_10__["ComponentsContainer"], { survey: this.survey, container: "contentBottom" }))),
|
|
14931
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_components_container__WEBPACK_IMPORTED_MODULE_10__["ComponentsContainer"], { survey: this.survey, container: "right" })));
|
|
14932
|
-
};
|
|
14933
|
-
Survey.prototype.renderPage = function (page) {
|
|
14934
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_page__WEBPACK_IMPORTED_MODULE_2__["SurveyPage"], { survey: this.survey, page: page, css: this.css, creator: this }));
|
|
14935
|
-
};
|
|
14936
|
-
Survey.prototype.renderEmptySurvey = function () {
|
|
14937
|
-
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.bodyEmpty }, this.survey.emptySurveyText);
|
|
14938
|
-
};
|
|
14939
|
-
Survey.prototype.createSurvey = function (newProps) {
|
|
14940
|
-
if (!newProps)
|
|
14941
|
-
newProps = {};
|
|
14942
|
-
this.previousJSON = {};
|
|
14943
|
-
if (newProps) {
|
|
14944
|
-
if (newProps.model) {
|
|
14945
|
-
this.survey = newProps.model;
|
|
14946
|
-
}
|
|
14947
|
-
else {
|
|
14948
|
-
if (newProps.json) {
|
|
14949
|
-
this.previousJSON = newProps.json;
|
|
14950
|
-
this.survey = new survey_core__WEBPACK_IMPORTED_MODULE_1__["SurveyModel"](newProps.json);
|
|
14951
|
-
}
|
|
14952
|
-
}
|
|
14953
|
-
}
|
|
14954
|
-
else {
|
|
14955
|
-
this.survey = new survey_core__WEBPACK_IMPORTED_MODULE_1__["SurveyModel"]();
|
|
14956
|
-
}
|
|
14957
|
-
if (!!newProps.css) {
|
|
14958
|
-
this.survey.css = this.css;
|
|
14959
|
-
}
|
|
14960
|
-
this.setSurveyEvents();
|
|
14961
|
-
};
|
|
14962
|
-
Survey.prototype.isModelJSONChanged = function (newProps) {
|
|
14963
|
-
if (!!newProps["model"]) {
|
|
14964
|
-
return this.survey !== newProps["model"];
|
|
14965
|
-
}
|
|
14966
|
-
if (!!newProps["json"]) {
|
|
14967
|
-
return !survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(newProps["json"], this.previousJSON);
|
|
14968
|
-
}
|
|
14969
|
-
return false;
|
|
14970
|
-
};
|
|
14971
|
-
Survey.prototype.updateSurvey = function (newProps, oldProps) {
|
|
14972
|
-
if (!newProps)
|
|
14973
|
-
return;
|
|
14974
|
-
oldProps = oldProps || {};
|
|
14975
|
-
for (var key in newProps) {
|
|
14976
|
-
if (key == "model" || key == "children" || key == "json") {
|
|
14977
|
-
continue;
|
|
14978
|
-
}
|
|
14979
|
-
if (key == "css") {
|
|
14980
|
-
this.survey.mergeValues(newProps.css, this.survey.getCss());
|
|
14981
|
-
this.survey["updateNavigationCss"]();
|
|
14982
|
-
this.survey["updateElementCss"]();
|
|
14983
|
-
continue;
|
|
14984
|
-
}
|
|
14985
|
-
if (newProps[key] === oldProps[key])
|
|
14986
|
-
continue;
|
|
14987
|
-
if (key.indexOf("on") == 0 && this.survey[key] && this.survey[key].add) {
|
|
14988
|
-
if (!!oldProps[key]) {
|
|
14989
|
-
this.survey[key].remove(oldProps[key]);
|
|
14990
|
-
}
|
|
14991
|
-
this.survey[key].add(newProps[key]);
|
|
14992
|
-
}
|
|
14993
|
-
else {
|
|
14994
|
-
this.survey[key] = newProps[key];
|
|
14995
|
-
}
|
|
14996
|
-
}
|
|
14997
|
-
};
|
|
14998
|
-
Survey.prototype.setSurveyEvents = function () {
|
|
14999
|
-
var self = this;
|
|
15000
|
-
this.survey.renderCallback = function () {
|
|
15001
|
-
var counter = !!self.state && !!self.state.modelChanged ? self.state.modelChanged : 0;
|
|
15002
|
-
self.setState({ modelChanged: counter + 1 });
|
|
15003
|
-
};
|
|
15004
|
-
this.survey.onPartialSend.add(function (sender) {
|
|
15005
|
-
if (!!self.state) {
|
|
15006
|
-
self.setState(self.state);
|
|
15007
|
-
}
|
|
15008
|
-
});
|
|
15009
|
-
};
|
|
15010
|
-
//ISurveyCreator
|
|
15011
|
-
Survey.prototype.createQuestionElement = function (question) {
|
|
15012
|
-
return _reactquestion_factory__WEBPACK_IMPORTED_MODULE_6__["ReactQuestionFactory"].Instance.createQuestion(question.isDefaultRendering() ? question.getTemplate() : question.getComponentName(), {
|
|
15013
|
-
question: question,
|
|
15014
|
-
isDisplayMode: question.isInputReadOnly,
|
|
15015
|
-
creator: this,
|
|
15016
|
-
});
|
|
15017
|
-
};
|
|
15018
|
-
Survey.prototype.renderError = function (key, error, cssClasses) {
|
|
15019
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { key: key },
|
|
15020
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: cssClasses.error.icon || undefined, "aria-hidden": "true" }),
|
|
15021
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: cssClasses.error.item || undefined },
|
|
15022
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_string_viewer__WEBPACK_IMPORTED_MODULE_4__["SurveyLocStringViewer"], { locStr: error.locText }))));
|
|
15023
|
-
};
|
|
15024
|
-
Survey.prototype.questionTitleLocation = function () {
|
|
15025
|
-
return this.survey.questionTitleLocation;
|
|
15026
|
-
};
|
|
15027
|
-
Survey.prototype.questionErrorLocation = function () {
|
|
15028
|
-
return this.survey.questionErrorLocation;
|
|
15029
|
-
};
|
|
15030
|
-
return Survey;
|
|
15031
|
-
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElementBase"]));
|
|
15032
|
-
|
|
15033
|
-
_element_factory__WEBPACK_IMPORTED_MODULE_7__["ReactElementFactory"].Instance.registerElement("survey", function (props) {
|
|
15034
|
-
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](Survey, props);
|
|
15035
|
-
});
|
|
15036
|
-
function attachKey2click(element, viewModel, options) {
|
|
15037
|
-
if (options === void 0) { options = { processEsc: true, disableTabStop: false }; }
|
|
15038
|
-
if ((!!viewModel && viewModel.disableTabStop) || (!!options && options.disableTabStop)) {
|
|
15039
|
-
return react__WEBPACK_IMPORTED_MODULE_0__["cloneElement"](element, { tabIndex: -1 });
|
|
15040
|
-
}
|
|
15041
|
-
options = __assign({}, options);
|
|
15042
|
-
return react__WEBPACK_IMPORTED_MODULE_0__["cloneElement"](element, {
|
|
15043
|
-
tabIndex: 0,
|
|
15044
|
-
onKeyUp: function (evt) {
|
|
15045
|
-
evt.preventDefault();
|
|
15046
|
-
evt.stopPropagation();
|
|
15047
|
-
Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["doKey2ClickUp"])(evt, options);
|
|
15048
|
-
return false;
|
|
15049
|
-
},
|
|
15050
|
-
onKeyDown: function (evt) { return Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["doKey2ClickDown"])(evt, options); },
|
|
15051
|
-
onBlur: function (evt) { return Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["doKey2ClickBlur"])(evt); }
|
|
15052
|
-
});
|
|
15053
|
-
}
|
|
15054
|
-
|
|
15055
|
-
|
|
15056
|
-
/***/ }),
|
|
15057
|
-
|
|
15058
|
-
/***/ "./src/react/reactSurveyNavigationBase.tsx":
|
|
15059
|
-
/*!*************************************************!*\
|
|
15060
|
-
!*** ./src/react/reactSurveyNavigationBase.tsx ***!
|
|
15061
|
-
\*************************************************/
|
|
15062
|
-
/*! exports provided: SurveyNavigationBase */
|
|
15063
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
15064
|
-
|
|
15065
|
-
"use strict";
|
|
15066
|
-
__webpack_require__.r(__webpack_exports__);
|
|
15067
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyNavigationBase", function() { return SurveyNavigationBase; });
|
|
15068
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
15069
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
15070
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
15071
|
-
var extendStatics = function (d, b) {
|
|
15072
|
-
extendStatics = Object.setPrototypeOf ||
|
|
15073
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
15074
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
15075
|
-
return extendStatics(d, b);
|
|
15076
|
-
};
|
|
15077
|
-
return function (d, b) {
|
|
15078
|
-
if (typeof b !== "function" && b !== null)
|
|
15079
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
15080
|
-
extendStatics(d, b);
|
|
15081
|
-
function __() { this.constructor = d; }
|
|
15082
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15083
|
-
};
|
|
15084
|
-
})();
|
|
15085
|
-
|
|
15086
|
-
var SurveyNavigationBase = /** @class */ (function (_super) {
|
|
15087
|
-
__extends(SurveyNavigationBase, _super);
|
|
15088
|
-
function SurveyNavigationBase(props) {
|
|
15089
|
-
var _this = _super.call(this, props) || this;
|
|
15090
|
-
_this.updateStateFunction = null;
|
|
15091
|
-
_this.state = { update: 0 };
|
|
15092
|
-
return _this;
|
|
15093
|
-
}
|
|
15094
|
-
Object.defineProperty(SurveyNavigationBase.prototype, "survey", {
|
|
15095
|
-
get: function () {
|
|
15096
|
-
return this.props.survey;
|
|
15097
|
-
},
|
|
15098
|
-
enumerable: false,
|
|
15099
|
-
configurable: true
|
|
15100
|
-
});
|
|
15101
|
-
Object.defineProperty(SurveyNavigationBase.prototype, "css", {
|
|
15102
|
-
get: function () {
|
|
15103
|
-
return this.props.css || this.survey.css;
|
|
15104
|
-
},
|
|
15105
|
-
enumerable: false,
|
|
15106
|
-
configurable: true
|
|
15107
|
-
});
|
|
15108
|
-
SurveyNavigationBase.prototype.componentDidMount = function () {
|
|
15109
|
-
if (this.survey) {
|
|
15110
|
-
var self = this;
|
|
15111
|
-
this.updateStateFunction = function () {
|
|
15112
|
-
self.setState({ update: self.state.update + 1 });
|
|
15113
|
-
};
|
|
15114
|
-
this.survey.onPageVisibleChanged.add(this.updateStateFunction);
|
|
15115
|
-
}
|
|
15116
|
-
};
|
|
15117
|
-
SurveyNavigationBase.prototype.componentWillUnmount = function () {
|
|
15118
|
-
if (this.survey && this.updateStateFunction) {
|
|
15119
|
-
this.survey.onPageVisibleChanged.remove(this.updateStateFunction);
|
|
15120
|
-
this.updateStateFunction = null;
|
|
15121
|
-
}
|
|
15122
|
-
};
|
|
15123
|
-
return SurveyNavigationBase;
|
|
15124
|
-
}(react__WEBPACK_IMPORTED_MODULE_0__["Component"]));
|
|
15125
|
-
|
|
15126
|
-
|
|
15127
|
-
|
|
15128
|
-
/***/ }),
|
|
15129
|
-
|
|
15130
|
-
/***/ "./src/react/reactSurveyProgress.tsx":
|
|
15131
|
-
/*!*******************************************!*\
|
|
15132
|
-
!*** ./src/react/reactSurveyProgress.tsx ***!
|
|
15133
|
-
\*******************************************/
|
|
15134
|
-
/*! exports provided: SurveyProgress */
|
|
15135
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
15136
|
-
|
|
15137
|
-
"use strict";
|
|
15138
|
-
__webpack_require__.r(__webpack_exports__);
|
|
15139
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyProgress", function() { return SurveyProgress; });
|
|
15140
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
15141
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
15142
|
-
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "survey-core");
|
|
15143
|
-
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_1__);
|
|
15144
|
-
/* harmony import */ var _reactSurveyNavigationBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactSurveyNavigationBase */ "./src/react/reactSurveyNavigationBase.tsx");
|
|
15145
|
-
/* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./element-factory */ "./src/react/element-factory.tsx");
|
|
15146
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
15147
|
-
var extendStatics = function (d, b) {
|
|
15148
|
-
extendStatics = Object.setPrototypeOf ||
|
|
15149
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
15150
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
15151
|
-
return extendStatics(d, b);
|
|
15152
|
-
};
|
|
15153
|
-
return function (d, b) {
|
|
15154
|
-
if (typeof b !== "function" && b !== null)
|
|
15155
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
15156
|
-
extendStatics(d, b);
|
|
15157
|
-
function __() { this.constructor = d; }
|
|
15158
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15159
|
-
};
|
|
15160
|
-
})();
|
|
15161
|
-
|
|
15162
|
-
|
|
15163
|
-
|
|
15164
|
-
|
|
15165
|
-
var SurveyProgress = /** @class */ (function (_super) {
|
|
15166
|
-
__extends(SurveyProgress, _super);
|
|
15167
|
-
function SurveyProgress(props) {
|
|
15168
|
-
return _super.call(this, props) || this;
|
|
15169
|
-
}
|
|
15170
|
-
Object.defineProperty(SurveyProgress.prototype, "isTop", {
|
|
15171
|
-
get: function () {
|
|
15172
|
-
return this.props.isTop;
|
|
15173
|
-
},
|
|
15174
|
-
enumerable: false,
|
|
15175
|
-
configurable: true
|
|
15176
|
-
});
|
|
15177
|
-
Object.defineProperty(SurveyProgress.prototype, "progress", {
|
|
15178
|
-
get: function () {
|
|
15179
|
-
return this.survey.progressValue;
|
|
15180
|
-
},
|
|
15181
|
-
enumerable: false,
|
|
15182
|
-
configurable: true
|
|
15183
|
-
});
|
|
15184
|
-
Object.defineProperty(SurveyProgress.prototype, "progressText", {
|
|
15185
|
-
get: function () {
|
|
15186
|
-
return this.survey.progressText;
|
|
15187
|
-
},
|
|
15188
|
-
enumerable: false,
|
|
15189
|
-
configurable: true
|
|
15190
|
-
});
|
|
15191
|
-
SurveyProgress.prototype.render = function () {
|
|
15192
|
-
var progressStyle = {
|
|
15193
|
-
width: this.progress + "%",
|
|
15194
|
-
};
|
|
15195
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.survey.getProgressCssClasses(this.props.container) },
|
|
15196
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { style: progressStyle, className: this.css.progressBar, role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": "progress" },
|
|
15197
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: survey_core__WEBPACK_IMPORTED_MODULE_1__["SurveyProgressModel"].getProgressTextInBarCss(this.css) }, this.progressText)),
|
|
15198
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: survey_core__WEBPACK_IMPORTED_MODULE_1__["SurveyProgressModel"].getProgressTextUnderBarCss(this.css) }, this.progressText)));
|
|
15199
|
-
};
|
|
15200
|
-
return SurveyProgress;
|
|
15201
|
-
}(_reactSurveyNavigationBase__WEBPACK_IMPORTED_MODULE_2__["SurveyNavigationBase"]));
|
|
15202
|
-
|
|
15203
|
-
_element_factory__WEBPACK_IMPORTED_MODULE_3__["ReactElementFactory"].Instance.registerElement("sv-progress-pages", function (props) {
|
|
15204
|
-
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyProgress, props);
|
|
15205
|
-
});
|
|
15206
|
-
_element_factory__WEBPACK_IMPORTED_MODULE_3__["ReactElementFactory"].Instance.registerElement("sv-progress-questions", function (props) {
|
|
15207
|
-
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyProgress, props);
|
|
15208
|
-
});
|
|
15209
|
-
_element_factory__WEBPACK_IMPORTED_MODULE_3__["ReactElementFactory"].Instance.registerElement("sv-progress-correctquestions", function (props) {
|
|
15210
|
-
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyProgress, props);
|
|
15211
|
-
});
|
|
15212
|
-
_element_factory__WEBPACK_IMPORTED_MODULE_3__["ReactElementFactory"].Instance.registerElement("sv-progress-requiredquestions", function (props) {
|
|
15213
|
-
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyProgress, props);
|
|
15214
|
-
});
|
|
15215
|
-
|
|
15216
|
-
|
|
15217
|
-
/***/ }),
|
|
15218
|
-
|
|
15219
|
-
/***/ "./src/react/reactSurveyProgressButtons.tsx":
|
|
15220
|
-
/*!**************************************************!*\
|
|
15221
|
-
!*** ./src/react/reactSurveyProgressButtons.tsx ***!
|
|
15222
|
-
\**************************************************/
|
|
15223
|
-
/*! exports provided: SurveyProgressButtons */
|
|
15224
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
15225
|
-
|
|
15226
|
-
"use strict";
|
|
15227
|
-
__webpack_require__.r(__webpack_exports__);
|
|
15228
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyProgressButtons", function() { return SurveyProgressButtons; });
|
|
15229
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
15230
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
15231
|
-
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "survey-core");
|
|
15232
|
-
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_1__);
|
|
15233
|
-
/* harmony import */ var _reactSurveyNavigationBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactSurveyNavigationBase */ "./src/react/reactSurveyNavigationBase.tsx");
|
|
15234
|
-
/* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./element-factory */ "./src/react/element-factory.tsx");
|
|
15235
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
15236
|
-
var extendStatics = function (d, b) {
|
|
15237
|
-
extendStatics = Object.setPrototypeOf ||
|
|
15238
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
15239
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
15240
|
-
return extendStatics(d, b);
|
|
15241
|
-
};
|
|
15242
|
-
return function (d, b) {
|
|
15243
|
-
if (typeof b !== "function" && b !== null)
|
|
15244
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
15245
|
-
extendStatics(d, b);
|
|
15246
|
-
function __() { this.constructor = d; }
|
|
15247
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15248
|
-
};
|
|
15249
|
-
})();
|
|
15250
|
-
|
|
15251
|
-
|
|
15252
|
-
|
|
15253
|
-
|
|
15254
|
-
var SurveyProgressButtons = /** @class */ (function (_super) {
|
|
15255
|
-
__extends(SurveyProgressButtons, _super);
|
|
15256
|
-
function SurveyProgressButtons(props) {
|
|
15257
|
-
var _this = _super.call(this, props) || this;
|
|
15258
|
-
_this.updateScroller = undefined;
|
|
15259
|
-
_this.progressButtonsModel = new survey_core__WEBPACK_IMPORTED_MODULE_1__["SurveyProgressButtonsModel"](_this.survey);
|
|
15260
|
-
_this.listContainerRef = react__WEBPACK_IMPORTED_MODULE_0__["createRef"]();
|
|
15261
|
-
return _this;
|
|
15262
|
-
}
|
|
15263
|
-
SurveyProgressButtons.prototype.render = function () {
|
|
15264
|
-
var _this = this;
|
|
15265
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.progressButtonsContainerCenter },
|
|
15266
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.progressButtonsContainer },
|
|
15267
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.getScrollButtonCss(true), role: "button", onClick: function () {
|
|
15268
|
-
return _this.clickScrollButton(_this.listContainerRef.current, true);
|
|
15269
|
-
} }),
|
|
15270
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.progressButtonsListContainer, ref: this.listContainerRef },
|
|
15271
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("ul", { className: this.css.progressButtonsList }, this.getListElements())),
|
|
15272
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.getScrollButtonCss(false), role: "button", onClick: function () {
|
|
15273
|
-
return _this.clickScrollButton(_this.listContainerRef.current, false);
|
|
15274
|
-
} }))));
|
|
15269
|
+
var htmlValue = { __html: this.survey.processedCompletedBeforeHtml };
|
|
15270
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { dangerouslySetInnerHTML: htmlValue, className: this.survey.completedBeforeCss }));
|
|
15275
15271
|
};
|
|
15276
|
-
|
|
15277
|
-
var
|
|
15278
|
-
|
|
15279
|
-
this.survey.visiblePages.forEach(function (page, index) {
|
|
15280
|
-
buttons.push(_this.renderListElement(page, index));
|
|
15281
|
-
});
|
|
15282
|
-
return buttons;
|
|
15272
|
+
Survey.prototype.renderLoading = function () {
|
|
15273
|
+
var htmlValue = { __html: this.survey.processedLoadingHtml };
|
|
15274
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { dangerouslySetInnerHTML: htmlValue, className: this.survey.loadingBodyCss }));
|
|
15283
15275
|
};
|
|
15284
|
-
|
|
15285
|
-
var
|
|
15286
|
-
|
|
15287
|
-
|
|
15288
|
-
|
|
15289
|
-
|
|
15290
|
-
|
|
15276
|
+
Survey.prototype.renderSurvey = function () {
|
|
15277
|
+
var activePage = this.survey.activePage
|
|
15278
|
+
? this.renderPage(this.survey.activePage)
|
|
15279
|
+
: null;
|
|
15280
|
+
var isStaring = this.survey.isShowStartingPage;
|
|
15281
|
+
var pageId = this.survey.activePage ? this.survey.activePage.id : "";
|
|
15282
|
+
var className = this.survey.bodyCss;
|
|
15283
|
+
var style = {};
|
|
15284
|
+
if (!!this.survey.renderedWidth) {
|
|
15285
|
+
style.maxWidth = this.survey.renderedWidth;
|
|
15286
|
+
}
|
|
15287
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.survey.bodyContainerCss },
|
|
15288
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_components_container__WEBPACK_IMPORTED_MODULE_10__["ComponentsContainer"], { survey: this.survey, container: "left" }),
|
|
15289
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: "sv-components-column sv-components-column--expandable" },
|
|
15290
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_components_container__WEBPACK_IMPORTED_MODULE_10__["ComponentsContainer"], { survey: this.survey, container: "center" }),
|
|
15291
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: pageId, className: className, style: style },
|
|
15292
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_components_container__WEBPACK_IMPORTED_MODULE_10__["ComponentsContainer"], { survey: this.survey, container: "contentTop" }),
|
|
15293
|
+
activePage,
|
|
15294
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_components_container__WEBPACK_IMPORTED_MODULE_10__["ComponentsContainer"], { survey: this.survey, container: "contentBottom" }))),
|
|
15295
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_components_container__WEBPACK_IMPORTED_MODULE_10__["ComponentsContainer"], { survey: this.survey, container: "right" })));
|
|
15291
15296
|
};
|
|
15292
|
-
|
|
15293
|
-
return this.
|
|
15297
|
+
Survey.prototype.renderPage = function (page) {
|
|
15298
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_page__WEBPACK_IMPORTED_MODULE_2__["SurveyPage"], { survey: this.survey, page: page, css: this.css, creator: this }));
|
|
15294
15299
|
};
|
|
15295
|
-
|
|
15296
|
-
return this.
|
|
15300
|
+
Survey.prototype.renderEmptySurvey = function () {
|
|
15301
|
+
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.bodyEmpty }, this.survey.emptySurveyText);
|
|
15297
15302
|
};
|
|
15298
|
-
|
|
15299
|
-
|
|
15303
|
+
Survey.prototype.createSurvey = function (newProps) {
|
|
15304
|
+
if (!newProps)
|
|
15305
|
+
newProps = {};
|
|
15306
|
+
this.previousJSON = {};
|
|
15307
|
+
if (newProps) {
|
|
15308
|
+
if (newProps.model) {
|
|
15309
|
+
this.survey = newProps.model;
|
|
15310
|
+
}
|
|
15311
|
+
else {
|
|
15312
|
+
if (newProps.json) {
|
|
15313
|
+
this.previousJSON = newProps.json;
|
|
15314
|
+
this.survey = new survey_core__WEBPACK_IMPORTED_MODULE_1__["SurveyModel"](newProps.json);
|
|
15315
|
+
}
|
|
15316
|
+
}
|
|
15317
|
+
}
|
|
15318
|
+
else {
|
|
15319
|
+
this.survey = new survey_core__WEBPACK_IMPORTED_MODULE_1__["SurveyModel"]();
|
|
15320
|
+
}
|
|
15321
|
+
if (!!newProps.css) {
|
|
15322
|
+
this.survey.css = this.css;
|
|
15323
|
+
}
|
|
15324
|
+
this.setSurveyEvents();
|
|
15300
15325
|
};
|
|
15301
|
-
|
|
15302
|
-
|
|
15326
|
+
Survey.prototype.isModelJSONChanged = function (newProps) {
|
|
15327
|
+
if (!!newProps["model"]) {
|
|
15328
|
+
return this.survey !== newProps["model"];
|
|
15329
|
+
}
|
|
15330
|
+
if (!!newProps["json"]) {
|
|
15331
|
+
return !survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(newProps["json"], this.previousJSON);
|
|
15332
|
+
}
|
|
15333
|
+
return false;
|
|
15303
15334
|
};
|
|
15304
|
-
|
|
15305
|
-
if (
|
|
15306
|
-
|
|
15335
|
+
Survey.prototype.updateSurvey = function (newProps, oldProps) {
|
|
15336
|
+
if (!newProps)
|
|
15337
|
+
return;
|
|
15338
|
+
oldProps = oldProps || {};
|
|
15339
|
+
for (var key in newProps) {
|
|
15340
|
+
if (key == "model" || key == "children" || key == "json") {
|
|
15341
|
+
continue;
|
|
15342
|
+
}
|
|
15343
|
+
if (key == "css") {
|
|
15344
|
+
this.survey.mergeValues(newProps.css, this.survey.getCss());
|
|
15345
|
+
this.survey["updateNavigationCss"]();
|
|
15346
|
+
this.survey["updateElementCss"]();
|
|
15347
|
+
continue;
|
|
15348
|
+
}
|
|
15349
|
+
if (newProps[key] === oldProps[key])
|
|
15350
|
+
continue;
|
|
15351
|
+
if (key.indexOf("on") == 0 && this.survey[key] && this.survey[key].add) {
|
|
15352
|
+
if (!!oldProps[key]) {
|
|
15353
|
+
this.survey[key].remove(oldProps[key]);
|
|
15354
|
+
}
|
|
15355
|
+
this.survey[key].add(newProps[key]);
|
|
15356
|
+
}
|
|
15357
|
+
else {
|
|
15358
|
+
this.survey[key] = newProps[key];
|
|
15359
|
+
}
|
|
15307
15360
|
}
|
|
15308
15361
|
};
|
|
15309
|
-
|
|
15310
|
-
var
|
|
15311
|
-
this.
|
|
15312
|
-
|
|
15313
|
-
|
|
15362
|
+
Survey.prototype.setSurveyEvents = function () {
|
|
15363
|
+
var self = this;
|
|
15364
|
+
this.survey.renderCallback = function () {
|
|
15365
|
+
var counter = !!self.state && !!self.state.modelChanged ? self.state.modelChanged : 0;
|
|
15366
|
+
self.setState({ modelChanged: counter + 1 });
|
|
15367
|
+
};
|
|
15368
|
+
this.survey.onPartialSend.add(function (sender) {
|
|
15369
|
+
if (!!self.state) {
|
|
15370
|
+
self.setState(self.state);
|
|
15314
15371
|
}
|
|
15315
|
-
}
|
|
15372
|
+
});
|
|
15316
15373
|
};
|
|
15317
|
-
|
|
15318
|
-
|
|
15319
|
-
|
|
15320
|
-
|
|
15321
|
-
|
|
15374
|
+
//ISurveyCreator
|
|
15375
|
+
Survey.prototype.createQuestionElement = function (question) {
|
|
15376
|
+
return _reactquestion_factory__WEBPACK_IMPORTED_MODULE_6__["ReactQuestionFactory"].Instance.createQuestion(question.isDefaultRendering() ? question.getTemplate() : question.getComponentName(), {
|
|
15377
|
+
question: question,
|
|
15378
|
+
isDisplayMode: question.isInputReadOnly,
|
|
15379
|
+
creator: this,
|
|
15380
|
+
});
|
|
15322
15381
|
};
|
|
15323
|
-
|
|
15324
|
-
|
|
15382
|
+
Survey.prototype.renderError = function (key, error, cssClasses) {
|
|
15383
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { key: key },
|
|
15384
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: cssClasses.error.icon || undefined, "aria-hidden": "true" }),
|
|
15385
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: cssClasses.error.item || undefined },
|
|
15386
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_string_viewer__WEBPACK_IMPORTED_MODULE_4__["SurveyLocStringViewer"], { locStr: error.locText }))));
|
|
15387
|
+
};
|
|
15388
|
+
Survey.prototype.questionTitleLocation = function () {
|
|
15389
|
+
return this.survey.questionTitleLocation;
|
|
15390
|
+
};
|
|
15391
|
+
Survey.prototype.questionErrorLocation = function () {
|
|
15392
|
+
return this.survey.questionErrorLocation;
|
|
15393
|
+
};
|
|
15394
|
+
return Survey;
|
|
15395
|
+
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElementBase"]));
|
|
15325
15396
|
|
|
15326
|
-
|
|
15327
|
-
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](
|
|
15397
|
+
_element_factory__WEBPACK_IMPORTED_MODULE_7__["ReactElementFactory"].Instance.registerElement("survey", function (props) {
|
|
15398
|
+
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](Survey, props);
|
|
15328
15399
|
});
|
|
15400
|
+
function attachKey2click(element, viewModel, options) {
|
|
15401
|
+
if (options === void 0) { options = { processEsc: true, disableTabStop: false }; }
|
|
15402
|
+
if ((!!viewModel && viewModel.disableTabStop) || (!!options && options.disableTabStop)) {
|
|
15403
|
+
return react__WEBPACK_IMPORTED_MODULE_0__["cloneElement"](element, { tabIndex: -1 });
|
|
15404
|
+
}
|
|
15405
|
+
options = __assign({}, options);
|
|
15406
|
+
return react__WEBPACK_IMPORTED_MODULE_0__["cloneElement"](element, {
|
|
15407
|
+
tabIndex: 0,
|
|
15408
|
+
onKeyUp: function (evt) {
|
|
15409
|
+
evt.preventDefault();
|
|
15410
|
+
evt.stopPropagation();
|
|
15411
|
+
Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["doKey2ClickUp"])(evt, options);
|
|
15412
|
+
return false;
|
|
15413
|
+
},
|
|
15414
|
+
onKeyDown: function (evt) { return Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["doKey2ClickDown"])(evt, options); },
|
|
15415
|
+
onBlur: function (evt) { return Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["doKey2ClickBlur"])(evt); }
|
|
15416
|
+
});
|
|
15417
|
+
}
|
|
15329
15418
|
|
|
15330
15419
|
|
|
15331
15420
|
/***/ }),
|
|
15332
15421
|
|
|
15333
|
-
/***/ "./src/react/
|
|
15334
|
-
|
|
15335
|
-
!*** ./src/react/
|
|
15336
|
-
|
|
15337
|
-
/*! exports provided:
|
|
15422
|
+
/***/ "./src/react/reactSurveyNavigationBase.tsx":
|
|
15423
|
+
/*!*************************************************!*\
|
|
15424
|
+
!*** ./src/react/reactSurveyNavigationBase.tsx ***!
|
|
15425
|
+
\*************************************************/
|
|
15426
|
+
/*! exports provided: SurveyNavigationBase */
|
|
15338
15427
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
15339
15428
|
|
|
15340
15429
|
"use strict";
|
|
15341
15430
|
__webpack_require__.r(__webpack_exports__);
|
|
15342
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
15431
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyNavigationBase", function() { return SurveyNavigationBase; });
|
|
15343
15432
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
15344
15433
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
15345
|
-
/* harmony import */ var _reactSurveyNavigationBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactSurveyNavigationBase */ "./src/react/reactSurveyNavigationBase.tsx");
|
|
15346
|
-
/* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./element-factory */ "./src/react/element-factory.tsx");
|
|
15347
|
-
/* harmony import */ var _components_list_list__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/list/list */ "./src/react/components/list/list.tsx");
|
|
15348
|
-
/* harmony import */ var _components_popup_popup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/popup/popup */ "./src/react/components/popup/popup.tsx");
|
|
15349
|
-
/* 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");
|
|
15350
15434
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
15351
15435
|
var extendStatics = function (d, b) {
|
|
15352
15436
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -15363,35 +15447,46 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
|
15363
15447
|
};
|
|
15364
15448
|
})();
|
|
15365
15449
|
|
|
15366
|
-
|
|
15367
|
-
|
|
15368
|
-
|
|
15369
|
-
|
|
15370
|
-
|
|
15371
|
-
|
|
15372
|
-
|
|
15373
|
-
function SurveyProgressToc() {
|
|
15374
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
15450
|
+
var SurveyNavigationBase = /** @class */ (function (_super) {
|
|
15451
|
+
__extends(SurveyNavigationBase, _super);
|
|
15452
|
+
function SurveyNavigationBase(props) {
|
|
15453
|
+
var _this = _super.call(this, props) || this;
|
|
15454
|
+
_this.updateStateFunction = null;
|
|
15455
|
+
_this.state = { update: 0 };
|
|
15456
|
+
return _this;
|
|
15375
15457
|
}
|
|
15376
|
-
|
|
15377
|
-
|
|
15378
|
-
|
|
15379
|
-
|
|
15380
|
-
|
|
15381
|
-
|
|
15382
|
-
|
|
15458
|
+
Object.defineProperty(SurveyNavigationBase.prototype, "survey", {
|
|
15459
|
+
get: function () {
|
|
15460
|
+
return this.props.survey;
|
|
15461
|
+
},
|
|
15462
|
+
enumerable: false,
|
|
15463
|
+
configurable: true
|
|
15464
|
+
});
|
|
15465
|
+
Object.defineProperty(SurveyNavigationBase.prototype, "css", {
|
|
15466
|
+
get: function () {
|
|
15467
|
+
return this.props.css || this.survey.css;
|
|
15468
|
+
},
|
|
15469
|
+
enumerable: false,
|
|
15470
|
+
configurable: true
|
|
15471
|
+
});
|
|
15472
|
+
SurveyNavigationBase.prototype.componentDidMount = function () {
|
|
15473
|
+
if (this.survey) {
|
|
15474
|
+
var self = this;
|
|
15475
|
+
this.updateStateFunction = function () {
|
|
15476
|
+
self.setState({ update: self.state.update + 1 });
|
|
15477
|
+
};
|
|
15478
|
+
this.survey.onPageVisibleChanged.add(this.updateStateFunction);
|
|
15383
15479
|
}
|
|
15384
|
-
|
|
15385
|
-
|
|
15480
|
+
};
|
|
15481
|
+
SurveyNavigationBase.prototype.componentWillUnmount = function () {
|
|
15482
|
+
if (this.survey && this.updateStateFunction) {
|
|
15483
|
+
this.survey.onPageVisibleChanged.remove(this.updateStateFunction);
|
|
15484
|
+
this.updateStateFunction = null;
|
|
15386
15485
|
}
|
|
15387
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: tocModel.containerCss }, content));
|
|
15388
15486
|
};
|
|
15389
|
-
return
|
|
15390
|
-
}(
|
|
15487
|
+
return SurveyNavigationBase;
|
|
15488
|
+
}(react__WEBPACK_IMPORTED_MODULE_0__["Component"]));
|
|
15391
15489
|
|
|
15392
|
-
_element_factory__WEBPACK_IMPORTED_MODULE_2__["ReactElementFactory"].Instance.registerElement("sv-navigation-toc", function (props) {
|
|
15393
|
-
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyProgressToc, props);
|
|
15394
|
-
});
|
|
15395
15490
|
|
|
15396
15491
|
|
|
15397
15492
|
/***/ }),
|
|
@@ -16273,13 +16368,27 @@ var SurveyQuestionCommentItem = /** @class */ (function (_super) {
|
|
|
16273
16368
|
_this.state = { comment: _this.getComment() || "" };
|
|
16274
16369
|
return _this;
|
|
16275
16370
|
}
|
|
16276
|
-
SurveyQuestionCommentItem.prototype.
|
|
16277
|
-
|
|
16278
|
-
|
|
16279
|
-
|
|
16280
|
-
|
|
16371
|
+
SurveyQuestionCommentItem.prototype.componentDidUpdate = function (prevProps, prevState) {
|
|
16372
|
+
_super.prototype.componentDidUpdate.call(this, prevProps, prevState);
|
|
16373
|
+
this.updateDomElement();
|
|
16374
|
+
};
|
|
16375
|
+
SurveyQuestionCommentItem.prototype.componentDidMount = function () {
|
|
16376
|
+
_super.prototype.componentDidMount.call(this);
|
|
16377
|
+
this.updateDomElement();
|
|
16378
|
+
};
|
|
16379
|
+
SurveyQuestionCommentItem.prototype.updateDomElement = function () {
|
|
16380
|
+
if (!!this.control) {
|
|
16381
|
+
var control = this.control;
|
|
16382
|
+
var newValue = this.getComment() || "";
|
|
16383
|
+
if (!survey_core__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isTwoValueEquals(newValue, control.value, false, true, false)) {
|
|
16384
|
+
control.value = newValue;
|
|
16385
|
+
}
|
|
16386
|
+
}
|
|
16387
|
+
};
|
|
16388
|
+
SurveyQuestionCommentItem.prototype.setControl = function (element) {
|
|
16389
|
+
if (!!element) {
|
|
16390
|
+
this.control = element;
|
|
16281
16391
|
}
|
|
16282
|
-
return stateComment !== undefined ? stateComment : comment || "";
|
|
16283
16392
|
};
|
|
16284
16393
|
SurveyQuestionCommentItem.prototype.canRender = function () {
|
|
16285
16394
|
return !!this.props.question;
|
|
@@ -16306,18 +16415,11 @@ var SurveyQuestionCommentItem = /** @class */ (function (_super) {
|
|
|
16306
16415
|
var _this = this;
|
|
16307
16416
|
var question = this.props.question;
|
|
16308
16417
|
var className = this.props.otherCss || this.cssClasses.comment;
|
|
16309
|
-
var handleOnChange = function (event) {
|
|
16310
|
-
_this.setState({ comment: event.target.value });
|
|
16311
|
-
// https://github.com/surveyjs/survey-library/issues/7252
|
|
16312
|
-
if (!survey_core__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isTwoValueEquals(_this.getComment(), event.target.value, false, true, false)) {
|
|
16313
|
-
_this.setComment(event.target.value);
|
|
16314
|
-
}
|
|
16315
|
-
};
|
|
16316
|
-
var comment = this.getStateComment();
|
|
16317
16418
|
if (question.isReadOnlyRenderDiv()) {
|
|
16419
|
+
var comment = this.getComment() || "";
|
|
16318
16420
|
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", null, comment);
|
|
16319
16421
|
}
|
|
16320
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("textarea", { id: this.getId(), className: className,
|
|
16422
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("textarea", { id: this.getId(), className: className, ref: function (textarea) { return (_this.setControl(textarea)); }, disabled: this.isDisplayMode, maxLength: question.getOthersMaxLength(), placeholder: this.getPlaceholder(), onBlur: function (e) { _this.onCommentChange(e); }, onInput: function (e) { return _this.onCommentInput(e); }, "aria-required": question.isRequired || question.a11y_input_ariaRequired, "aria-label": question.ariaLabel || question.a11y_input_ariaLabel, style: { resize: question.resizeStyle } }));
|
|
16321
16423
|
};
|
|
16322
16424
|
return SurveyQuestionCommentItem;
|
|
16323
16425
|
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElement"]));
|
|
@@ -19506,7 +19608,7 @@ var SurveyQuestionSignaturePad = /** @class */ (function (_super) {
|
|
|
19506
19608
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.placeholder, style: { display: this.question.needShowPlaceholder() ? "" : "none" } }, this.renderLocString(this.question.locPlaceholder)),
|
|
19507
19609
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", null,
|
|
19508
19610
|
this.renderBackgroundImage(),
|
|
19509
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("canvas", { tabIndex:
|
|
19611
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("canvas", { tabIndex: -1, className: this.question.cssClasses.canvas, onBlur: this.question.onBlur })),
|
|
19510
19612
|
clearButton,
|
|
19511
19613
|
loadingIndicator));
|
|
19512
19614
|
};
|
|
@@ -20413,8 +20515,8 @@ var settings = {
|
|
|
20413
20515
|
* @param message A message to be displayed in the confirm dialog window.
|
|
20414
20516
|
* @param callback A callback function that should be called with `true` if a user confirms an action or `false` otherwise.
|
|
20415
20517
|
*/
|
|
20416
|
-
confirmActionAsync: function (message, callback, applyTitle) {
|
|
20417
|
-
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["showConfirmDialog"])(message, callback, applyTitle);
|
|
20518
|
+
confirmActionAsync: function (message, callback, applyTitle, locale) {
|
|
20519
|
+
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["showConfirmDialog"])(message, callback, applyTitle, locale);
|
|
20418
20520
|
},
|
|
20419
20521
|
/**
|
|
20420
20522
|
* A minimum width value for all survey elements.
|
|
@@ -20465,15 +20567,27 @@ var settings = {
|
|
|
20465
20567
|
*/
|
|
20466
20568
|
showItemsInOrder: "default",
|
|
20467
20569
|
/**
|
|
20468
|
-
* A value to save in survey results when respondents select the None choice item.
|
|
20570
|
+
* A value to save in survey results when respondents select the "None" choice item.
|
|
20469
20571
|
*
|
|
20470
20572
|
* Default value: `"none"`
|
|
20471
20573
|
*/
|
|
20472
20574
|
noneItemValue: "none",
|
|
20473
20575
|
/**
|
|
20474
|
-
*
|
|
20576
|
+
* A value to save in survey results when respondents select the "Refuse to answer" choice item.
|
|
20577
|
+
*
|
|
20578
|
+
* Default value: `"refused"`
|
|
20579
|
+
*/
|
|
20580
|
+
refuseItemValue: "refused",
|
|
20581
|
+
/**
|
|
20582
|
+
* A value to save in survey results when respondents select the "Don't know" choice item.
|
|
20583
|
+
*
|
|
20584
|
+
* Default value: `"dontknow"`
|
|
20585
|
+
*/
|
|
20586
|
+
dontKnowItemValue: "dontknow",
|
|
20587
|
+
/**
|
|
20588
|
+
* An object whose properties specify the order of the special choice items ("None", "Other", "Select All", "Refuse to answer", "Don't know") in select-based questions.
|
|
20475
20589
|
*
|
|
20476
|
-
* Default value: `{ selectAllItem: [-1], noneItem: [1], otherItem: [2] }`
|
|
20590
|
+
* Default value: `{ selectAllItem: [-1], noneItem: [1], otherItem: [2], dontKnowItem: [3], otherItem: [4] }`
|
|
20477
20591
|
*
|
|
20478
20592
|
* Use this object to reorder special choices. Each property accepts an array of integer numbers. Negative numbers place a special choice item above regular choice items, positive numbers place it below them. For instance, the code below specifies the following order of choices: None, Select All, regular choices, Other.
|
|
20479
20593
|
*
|
|
@@ -20494,7 +20608,9 @@ var settings = {
|
|
|
20494
20608
|
specialChoicesOrder: {
|
|
20495
20609
|
selectAllItem: [-1],
|
|
20496
20610
|
noneItem: [1],
|
|
20497
|
-
|
|
20611
|
+
refuseItem: [2],
|
|
20612
|
+
dontKnowItem: [3],
|
|
20613
|
+
otherItem: [4]
|
|
20498
20614
|
},
|
|
20499
20615
|
/**
|
|
20500
20616
|
* A list of supported validators by question type.
|
|
@@ -20548,6 +20664,12 @@ var settings = {
|
|
|
20548
20664
|
* Default value: `true`
|
|
20549
20665
|
*/
|
|
20550
20666
|
showMaxLengthIndicator: true,
|
|
20667
|
+
/**
|
|
20668
|
+
* Set to `false` to disable animations
|
|
20669
|
+
*
|
|
20670
|
+
* Default value: `true`
|
|
20671
|
+
*/
|
|
20672
|
+
animationEnabled: true,
|
|
20551
20673
|
/**
|
|
20552
20674
|
* An object that specifies heading levels (`<h1>`, `<h2>`, etc.) to use when rendering survey, page, panel, and question titles.
|
|
20553
20675
|
*
|
|
@@ -20633,7 +20755,8 @@ var settings = {
|
|
|
20633
20755
|
"email",
|
|
20634
20756
|
"impp",
|
|
20635
20757
|
]
|
|
20636
|
-
}
|
|
20758
|
+
},
|
|
20759
|
+
legacyProgressBarView: false
|
|
20637
20760
|
};
|
|
20638
20761
|
|
|
20639
20762
|
|
|
@@ -21022,7 +21145,7 @@ function confirmAction(message) {
|
|
|
21022
21145
|
return _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].confirmActionFunc(message);
|
|
21023
21146
|
return confirm(message);
|
|
21024
21147
|
}
|
|
21025
|
-
function confirmActionAsync(message, funcOnYes, funcOnNo) {
|
|
21148
|
+
function confirmActionAsync(message, funcOnYes, funcOnNo, locale) {
|
|
21026
21149
|
var callbackFunc = function (res) {
|
|
21027
21150
|
if (res)
|
|
21028
21151
|
funcOnYes();
|
|
@@ -21030,7 +21153,7 @@ function confirmActionAsync(message, funcOnYes, funcOnNo) {
|
|
|
21030
21153
|
funcOnNo();
|
|
21031
21154
|
};
|
|
21032
21155
|
if (!!_settings__WEBPACK_IMPORTED_MODULE_1__["settings"] && !!_settings__WEBPACK_IMPORTED_MODULE_1__["settings"].confirmActionAsync) {
|
|
21033
|
-
if (_settings__WEBPACK_IMPORTED_MODULE_1__["settings"].confirmActionAsync(message, callbackFunc))
|
|
21156
|
+
if (_settings__WEBPACK_IMPORTED_MODULE_1__["settings"].confirmActionAsync(message, callbackFunc, undefined, locale))
|
|
21034
21157
|
return;
|
|
21035
21158
|
}
|
|
21036
21159
|
callbackFunc(confirmAction(message));
|
|
@@ -21379,7 +21502,7 @@ var Logger = /** @class */ (function () {
|
|
|
21379
21502
|
return Logger;
|
|
21380
21503
|
}());
|
|
21381
21504
|
|
|
21382
|
-
function showConfirmDialog(message, callback, applyTitle) {
|
|
21505
|
+
function showConfirmDialog(message, callback, applyTitle, locale) {
|
|
21383
21506
|
var locStr = new _localizablestring__WEBPACK_IMPORTED_MODULE_0__["LocalizableString"](undefined);
|
|
21384
21507
|
var popupViewModel = _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].showDialog({
|
|
21385
21508
|
componentName: "sv-string-viewer",
|
|
@@ -21400,9 +21523,9 @@ function showConfirmDialog(message, callback, applyTitle) {
|
|
|
21400
21523
|
var toolbar = popupViewModel.footerToolbar;
|
|
21401
21524
|
var applyBtn = toolbar.getActionById("apply");
|
|
21402
21525
|
var cancelBtn = toolbar.getActionById("cancel");
|
|
21403
|
-
cancelBtn.title = _surveyStrings__WEBPACK_IMPORTED_MODULE_2__["surveyLocalization"].getString("cancel");
|
|
21526
|
+
cancelBtn.title = _surveyStrings__WEBPACK_IMPORTED_MODULE_2__["surveyLocalization"].getString("cancel", locale);
|
|
21404
21527
|
cancelBtn.innerCss = "sv-popup__body-footer-item sv-popup__button sd-btn sd-btn--small";
|
|
21405
|
-
applyBtn.title = applyTitle || _surveyStrings__WEBPACK_IMPORTED_MODULE_2__["surveyLocalization"].getString("ok");
|
|
21528
|
+
applyBtn.title = applyTitle || _surveyStrings__WEBPACK_IMPORTED_MODULE_2__["surveyLocalization"].getString("ok", locale);
|
|
21406
21529
|
applyBtn.innerCss = "sv-popup__body-footer-item sv-popup__button sv-popup__button--danger sd-btn sd-btn--small sd-btn--danger";
|
|
21407
21530
|
popupViewModel.width = "452px";
|
|
21408
21531
|
return true;
|