survey-react-ui 1.9.121 → 1.9.123

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/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # SurveyJS React Form Library
2
2
 
3
+
4
+ <video src="https://github.com/surveyjs/survey-library/assets/22315929/b24a68bf-d703-4096-835b-752f5f610aa6"></video>
5
+
6
+
3
7
  [![Build Status](https://dev.azure.com/SurveyJS/SurveyJS%20Integration%20Tests/_apis/build/status/SurveyJS%20Library?branchName=master)](https://dev.azure.com/SurveyJS/SurveyJS%20Integration%20Tests/_build/latest?definitionId=7&branchName=master)
4
8
  [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE)
5
9
  <a href="https://github.com/DevExpress/testcafe">
@@ -44,4 +48,4 @@ Refer to instructions in the root README file: [Build the SurveyJS Form Library
44
48
 
45
49
  ## Licensing
46
50
 
47
- SurveyJS Form Library is distributed under the [MIT license](https://github.com/surveyjs/survey-library/blob/master/LICENSE).
51
+ SurveyJS Form Library is distributed under the [MIT license](https://github.com/surveyjs/survey-library/blob/master/LICENSE).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "survey-react-ui",
3
- "version": "1.9.121",
3
+ "version": "1.9.123",
4
4
  "description": "survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.",
5
5
  "keywords": [
6
6
  "Survey",
@@ -20,9 +20,9 @@
20
20
  "url": "https://github.com/surveyjs/surveyjs.git"
21
21
  },
22
22
  "typings": "survey-react-ui.d.ts",
23
- "dependencies": {
24
- "survey-core": "1.9.121",
25
- "react": "^16.5.0 || ^17.0.1 || ^18.1.0",
26
- "react-dom": "^16.5.0 || ^17.0.1 || ^18.1.0"
23
+ "peerDependencies": {
24
+ "survey-core": "*",
25
+ "react": "^16.5.0 || ^17.0.1 || ^18.2.0",
26
+ "react-dom": "^16.5.0 || ^17.0.1 || ^18.2.0"
27
27
  }
28
28
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.121
2
+ * surveyjs - Survey JavaScript library v1.9.123
3
3
  * Copyright (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -411,7 +411,7 @@ var Base = /** @class */ (function () {
411
411
  * Returns `true` if a passed `value` is an empty string, array, or object or if it equals to `undefined` or `null`.
412
412
  *
413
413
  * @param value A value to be checked.
414
- * @param trimString (Optional) When this parameter is `true`, the method ignores whitespace characters at the beginning and end of a string value. Pass `false` to disable this functionality.
414
+ * @param trimString *(Optional)* When this parameter is `true`, the method ignores whitespace characters at the beginning and end of a string value. Pass `false` to disable this functionality.
415
415
  */
416
416
  Base.prototype.isValueEmpty = function (value, trimString) {
417
417
  if (trimString === void 0) { trimString = true; }
@@ -549,10 +549,12 @@ var Base = /** @class */ (function () {
549
549
  * The JSON object should contain only serializable properties of this SurveyJS object. Event handlers and properties that do not belong to the SurveyJS object are ignored.
550
550
  *
551
551
  * @param json A JSON object with properties that you want to apply to the current SurveyJS object.
552
+ * @param options An object with configuration options.
553
+ * @param {boolean} options.validatePropertyValues Pass `true` if you want to validate property values. Use the [`jsonErrors`](#jsonErrors) array to access validation errors.
552
554
  * @see toJSON
553
555
  */
554
- Base.prototype.fromJSON = function (json) {
555
- new _jsonobject__WEBPACK_IMPORTED_MODULE_2__["JsonObject"]().toObject(json, this);
556
+ Base.prototype.fromJSON = function (json, options) {
557
+ new _jsonobject__WEBPACK_IMPORTED_MODULE_2__["JsonObject"]().toObject(json, this, options);
556
558
  this.onSurveyLoad();
557
559
  };
558
560
  Base.prototype.onSurveyLoad = function () { };
@@ -618,7 +620,7 @@ var Base = /** @class */ (function () {
618
620
  * If the property is not found or does not have a value, this method returns either `undefined`, `defaultValue` specified in the property configuration, or a value passed as the `defaultValue` parameter.
619
621
  *
620
622
  * @param name A property name.
621
- * @param defaultValue (Optional) A value to return if the property is not found or does not have a value.
623
+ * @param defaultValue *(Optional)* A value to return if the property is not found or does not have a value.
622
624
  */
623
625
  Base.prototype.getPropertyValue = function (name, defaultValue) {
624
626
  if (defaultValue === void 0) { defaultValue = null; }
@@ -889,7 +891,7 @@ var Base = /** @class */ (function () {
889
891
  * Registers a function to call when a property value changes.
890
892
  * @param propertyNames An array of one or multiple property names.
891
893
  * @param handler A function to call when one of the listed properties change.
892
- * @param key (Optional) A key that identifies the current registration. If a function for one of the properties is already registered with the same key, the function will be overwritten. You can also use the key to subsequently unregister handlers.
894
+ * @param key *(Optional)* A key that identifies the current registration. If a function for one of the properties is already registered with the same key, the function will be overwritten. You can also use the key to subsequently unregister handlers.
893
895
  * @see unregisterPropertyChangedHandlers
894
896
  */
895
897
  Base.prototype.registerPropertyChangedHandlers = function (propertyNames, handler, key) {
@@ -901,7 +903,7 @@ var Base = /** @class */ (function () {
901
903
  /**
902
904
  * Unregisters value change event handlers for the specified properties.
903
905
  * @param propertyNames An array of one or multiple property names.
904
- * @param key (Optional) A key of the registration that you want to cancel.
906
+ * @param key *(Optional)* A key of the registration that you want to cancel.
905
907
  * @see registerPropertyChangedHandlers
906
908
  */
907
909
  Base.prototype.unregisterPropertyChangedHandlers = function (propertyNames, key) {
@@ -2592,7 +2594,7 @@ __webpack_require__.r(__webpack_exports__);
2592
2594
 
2593
2595
 
2594
2596
 
2595
- Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.121", "survey-react-ui");
2597
+ Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.123", "survey-react-ui");
2596
2598
 
2597
2599
 
2598
2600
  /***/ }),
@@ -6930,7 +6932,7 @@ var Helpers = /** @class */ (function () {
6930
6932
  if (x["equals"])
6931
6933
  return x.equals(y);
6932
6934
  if (!!x.toJSON && !!y.toJSON && !!x.getType && !!y.getType) {
6933
- if (x.isDiposed || y.isDiposed)
6935
+ if (x.isDisposed || y.isDisposed)
6934
6936
  return false;
6935
6937
  if (x.getType() !== y.getType())
6936
6938
  return false;
@@ -7236,7 +7238,7 @@ if (!String.prototype["format"]) {
7236
7238
  /*!***************************!*\
7237
7239
  !*** ./src/jsonobject.ts ***!
7238
7240
  \***************************/
7239
- /*! exports provided: property, propertyArray, JsonObjectProperty, CustomPropertiesCollection, JsonMetadataClass, JsonMetadata, JsonError, JsonUnknownPropertyError, JsonMissingTypeErrorBase, JsonMissingTypeError, JsonIncorrectTypeError, JsonRequiredPropertyError, JsonRequiredArrayPropertyError, JsonObject, Serializer */
7241
+ /*! exports provided: property, propertyArray, JsonObjectProperty, CustomPropertiesCollection, JsonMetadataClass, JsonMetadata, JsonError, JsonUnknownPropertyError, JsonMissingTypeErrorBase, JsonMissingTypeError, JsonIncorrectTypeError, JsonRequiredPropertyError, JsonRequiredArrayPropertyError, JsonIncorrectPropertyValueError, JsonObject, Serializer */
7240
7242
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
7241
7243
 
7242
7244
  "use strict";
@@ -7254,6 +7256,7 @@ __webpack_require__.r(__webpack_exports__);
7254
7256
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonIncorrectTypeError", function() { return JsonIncorrectTypeError; });
7255
7257
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonRequiredPropertyError", function() { return JsonRequiredPropertyError; });
7256
7258
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonRequiredArrayPropertyError", function() { return JsonRequiredArrayPropertyError; });
7259
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonIncorrectPropertyValueError", function() { return JsonIncorrectPropertyValueError; });
7257
7260
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonObject", function() { return JsonObject; });
7258
7261
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Serializer", function() { return Serializer; });
7259
7262
  /* harmony import */ var _surveyStrings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./surveyStrings */ "./src/surveyStrings.ts");
@@ -7590,6 +7593,12 @@ var JsonObjectProperty = /** @class */ (function () {
7590
7593
  }
7591
7594
  }
7592
7595
  };
7596
+ JsonObjectProperty.prototype.validateValue = function (value) {
7597
+ var choices = this.choices;
7598
+ if (!Array.isArray(choices) || choices.length === 0)
7599
+ return true;
7600
+ return choices.indexOf(value) > -1;
7601
+ };
7593
7602
  JsonObjectProperty.prototype.getObjType = function (objType) {
7594
7603
  if (!this.classNamePart)
7595
7604
  return objType;
@@ -8667,8 +8676,8 @@ var JsonMetadata = /** @class */ (function () {
8667
8676
  };
8668
8677
  JsonMetadata.prototype.getChemeRefName = function (className, isRoot) {
8669
8678
  //Fix for #6486, according to https://niem.github.io/json/reference/json-schema/references/#:~:text=In%20a%20JSON%20schema%2C%20a,%2C%20an%20in%2Dschema%20reference
8670
- return "#/definitions/" + className;
8671
- //return isRoot ? "#/definitions/" + className : className + "#";
8679
+ //Checked by https://www.jsonschemavalidator.net/
8680
+ return isRoot ? "#/definitions/" + className : className;
8672
8681
  };
8673
8682
  JsonMetadata.prototype.generateChemaClass = function (className, schemaDef, isRoot) {
8674
8683
  if (!!schemaDef[className])
@@ -8823,6 +8832,17 @@ var JsonRequiredArrayPropertyError = /** @class */ (function (_super) {
8823
8832
  return JsonRequiredArrayPropertyError;
8824
8833
  }(JsonError));
8825
8834
 
8835
+ var JsonIncorrectPropertyValueError = /** @class */ (function (_super) {
8836
+ __extends(JsonIncorrectPropertyValueError, _super);
8837
+ function JsonIncorrectPropertyValueError(property, value) {
8838
+ var _this = _super.call(this, "incorrectvalue", "The property value: '" + value + "' is incorrect for property '" + property.name + "'.") || this;
8839
+ _this.property = property;
8840
+ _this.value = value;
8841
+ return _this;
8842
+ }
8843
+ return JsonIncorrectPropertyValueError;
8844
+ }(JsonError));
8845
+
8826
8846
  var JsonObject = /** @class */ (function () {
8827
8847
  function JsonObject() {
8828
8848
  this.errors = new Array();
@@ -8839,14 +8859,14 @@ var JsonObject = /** @class */ (function () {
8839
8859
  if (storeDefaults === void 0) { storeDefaults = false; }
8840
8860
  return this.toJsonObjectCore(obj, null, storeDefaults);
8841
8861
  };
8842
- JsonObject.prototype.toObject = function (jsonObj, obj) {
8843
- this.toObjectCore(jsonObj, obj);
8862
+ JsonObject.prototype.toObject = function (jsonObj, obj, options) {
8863
+ this.toObjectCore(jsonObj, obj, options);
8844
8864
  var error = this.getRequiredError(obj, jsonObj);
8845
8865
  if (!!error) {
8846
8866
  this.addNewError(error, jsonObj, obj);
8847
8867
  }
8848
8868
  };
8849
- JsonObject.prototype.toObjectCore = function (jsonObj, obj) {
8869
+ JsonObject.prototype.toObjectCore = function (jsonObj, obj, options) {
8850
8870
  if (!jsonObj)
8851
8871
  return;
8852
8872
  var properties = null;
@@ -8864,6 +8884,7 @@ var JsonObject = /** @class */ (function () {
8864
8884
  obj.startLoadingFromJson(jsonObj);
8865
8885
  }
8866
8886
  properties = this.addDynamicProperties(obj, jsonObj, properties);
8887
+ this.options = options;
8867
8888
  for (var key in jsonObj) {
8868
8889
  if (key === JsonObject.typePropertyName)
8869
8890
  continue;
@@ -8878,8 +8899,9 @@ var JsonObject = /** @class */ (function () {
8878
8899
  }
8879
8900
  continue;
8880
8901
  }
8881
- this.valueToObj(jsonObj[key], obj, property, jsonObj);
8902
+ this.valueToObj(jsonObj[key], obj, property, jsonObj, options);
8882
8903
  }
8904
+ this.options = undefined;
8883
8905
  if (obj.endLoadingFromJson) {
8884
8906
  obj.endLoadingFromJson();
8885
8907
  }
@@ -8952,7 +8974,7 @@ var JsonObject = /** @class */ (function () {
8952
8974
  }
8953
8975
  }
8954
8976
  };
8955
- JsonObject.prototype.valueToObj = function (value, obj, property, jsonObj) {
8977
+ JsonObject.prototype.valueToObj = function (value, obj, property, jsonObj, options) {
8956
8978
  if (value === null || value === undefined)
8957
8979
  return;
8958
8980
  this.removePos(property, value);
@@ -8966,17 +8988,22 @@ var JsonObject = /** @class */ (function () {
8966
8988
  this.addNewError(new JsonRequiredArrayPropertyError(propName, obj.getType()), !!jsonObj ? jsonObj : value, obj);
8967
8989
  }
8968
8990
  if (this.isValueArray(value)) {
8969
- this.valueToArray(value, obj, property.name, property);
8991
+ this.valueToArray(value, obj, property.name, property, options);
8970
8992
  return;
8971
8993
  }
8972
8994
  var newObj = this.createNewObj(value, property);
8973
8995
  if (newObj.newObj) {
8974
- this.toObjectCore(value, newObj.newObj);
8996
+ this.toObjectCore(value, newObj.newObj, options);
8975
8997
  value = newObj.newObj;
8976
8998
  }
8977
8999
  if (!newObj.error) {
8978
9000
  if (property != null) {
8979
9001
  property.setValue(obj, value, this);
9002
+ if (!!options && options.validatePropertyValues) {
9003
+ if (!property.validateValue(value)) {
9004
+ this.addNewError(new JsonIncorrectPropertyValueError(property, value), jsonObj, obj);
9005
+ }
9006
+ }
8980
9007
  }
8981
9008
  else {
8982
9009
  obj[property.name] = value;
@@ -9075,17 +9102,17 @@ var JsonObject = /** @class */ (function () {
9075
9102
  error.at = posObj.start;
9076
9103
  error.end = posObj.end;
9077
9104
  };
9078
- JsonObject.prototype.valueToArray = function (value, obj, key, property) {
9105
+ JsonObject.prototype.valueToArray = function (value, obj, key, property, options) {
9079
9106
  if (obj[key] && !this.isValueArray(obj[key]))
9080
9107
  return;
9081
9108
  if (obj[key] && value.length > 0)
9082
9109
  obj[key].splice(0, obj[key].length);
9083
9110
  var valueRes = obj[key] ? obj[key] : [];
9084
- this.addValuesIntoArray(value, valueRes, property);
9111
+ this.addValuesIntoArray(value, valueRes, property, options);
9085
9112
  if (!obj[key])
9086
9113
  obj[key] = valueRes;
9087
9114
  };
9088
- JsonObject.prototype.addValuesIntoArray = function (value, result, property) {
9115
+ JsonObject.prototype.addValuesIntoArray = function (value, result, property, options) {
9089
9116
  for (var i = 0; i < value.length; i++) {
9090
9117
  var newValue = this.createNewObj(value[i], property);
9091
9118
  if (newValue.newObj) {
@@ -9096,7 +9123,7 @@ var JsonObject = /** @class */ (function () {
9096
9123
  newValue.newObj.valueName = value[i].valueName.toString();
9097
9124
  }
9098
9125
  result.push(newValue.newObj);
9099
- this.toObjectCore(value[i], newValue.newObj);
9126
+ this.toObjectCore(value[i], newValue.newObj, options);
9100
9127
  }
9101
9128
  else {
9102
9129
  if (!newValue.error) {
@@ -9532,14 +9559,21 @@ var LocalizableString = /** @class */ (function () {
9532
9559
  if (this.htmlValues[loc] !== undefined)
9533
9560
  return !!this.htmlValues[loc];
9534
9561
  var renderedText = this.calculatedText;
9535
- if (!renderedText)
9562
+ if (!renderedText) {
9563
+ this.setHtmlValue(loc, "");
9536
9564
  return false;
9537
- if (!!this.getLocalizationName() && renderedText === this.getLocalizationStr())
9565
+ }
9566
+ if (!!this.getLocalizationName() && renderedText === this.getLocalizationStr()) {
9567
+ this.setHtmlValue(loc, "");
9538
9568
  return false;
9569
+ }
9539
9570
  var res = this.owner.getMarkdownHtml(renderedText, this.name);
9540
- this.htmlValues[loc] = res;
9571
+ this.setHtmlValue(loc, res);
9541
9572
  return !!res;
9542
9573
  };
9574
+ LocalizableString.prototype.setHtmlValue = function (loc, val) {
9575
+ this.htmlValues[loc] = val;
9576
+ };
9543
9577
  LocalizableString.prototype.getHtmlValue = function () {
9544
9578
  var loc = this.locale;
9545
9579
  if (!loc)
@@ -13121,6 +13155,9 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
13121
13155
  SurveyQuestionDropdownBase.prototype.getValueCore = function () {
13122
13156
  return this.questionBase.renderedValue;
13123
13157
  };
13158
+ SurveyQuestionDropdownBase.prototype.renderReadOnlyElement = function () {
13159
+ return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", null, this.question.readOnlyText);
13160
+ };
13124
13161
  SurveyQuestionDropdownBase.prototype.renderSelect = function (cssClasses) {
13125
13162
  var _a, _b;
13126
13163
  var selectElement = null;
@@ -13130,7 +13167,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
13130
13167
  // @ts-ignore
13131
13168
  selectElement = react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, className: this.question.getControlClass(), disabled: true },
13132
13169
  text,
13133
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", null, this.question.readOnlyText));
13170
+ this.renderReadOnlyElement());
13134
13171
  }
13135
13172
  else {
13136
13173
  if (!this.question["dropdownListModel"]) {
@@ -15994,9 +16031,6 @@ var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
15994
16031
  _this.handleOnChange = function (event) {
15995
16032
  _this.question.clickItemHandler(_this.item, event.target.checked);
15996
16033
  };
15997
- _this.selectAllChanged = function (event) {
15998
- _this.question.toggleSelectAll();
15999
- };
16000
16034
  return _this;
16001
16035
  }
16002
16036
  SurveyQuestionCheckboxItem.prototype.getStateElement = function () {
@@ -16070,16 +16104,12 @@ var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
16070
16104
  });
16071
16105
  SurveyQuestionCheckboxItem.prototype.renderCheckbox = function (isChecked, otherItem) {
16072
16106
  var id = this.question.getItemId(this.item);
16073
- var text = !this.hideCaption ? this.renderLocString(this.item.locText) : "";
16074
16107
  var itemClass = this.question.getItemClass(this.item);
16075
16108
  var labelClass = this.question.getLabelClass(this.item);
16076
- var onItemChanged = this.item == this.question.selectAllItem
16077
- ? this.selectAllChanged
16078
- : this.handleOnChange;
16079
16109
  var itemLabel = !this.hideCaption ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.cssClasses.controlLabel }, this.renderLocString(this.item.locText, this.textStyle)) : null;
16080
16110
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: itemClass, role: "presentation" },
16081
16111
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { className: labelClass },
16082
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { className: this.cssClasses.itemControl, type: "checkbox", role: "option", name: this.question.name + this.item.value, value: this.item.value != "selectall" ? this.item.value : undefined, id: id, style: this.inputStyle, disabled: !this.question.getItemEnabled(this.item), checked: isChecked, onChange: onItemChanged }),
16112
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { className: this.cssClasses.itemControl, type: "checkbox", role: "option", name: this.question.name + this.item.id, value: this.item.value, id: id, style: this.inputStyle, disabled: !this.question.getItemEnabled(this.item), checked: isChecked, onChange: this.handleOnChange }),
16083
16113
  this.cssClasses.materialDecorator ?
16084
16114
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.cssClasses.materialDecorator }, this.question.itemSvgIcon ?
16085
16115
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: this.cssClasses.itemDecorator },
@@ -17298,6 +17328,9 @@ var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
17298
17328
  td = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { key: key, className: itemClass, onClick: getHandler ? getHandler(column) : function () { } }, this.renderLocString(this.question.getCellDisplayLocText(row.name, column))));
17299
17329
  }
17300
17330
  else {
17331
+ var mobileSpan = this.question.isMobile ?
17332
+ (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.question.cssClasses.cellResponsiveTitle }, this.renderLocString(column.locText)))
17333
+ : undefined;
17301
17334
  td = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { key: key, "data-responsive-title": column.locText.renderedHtml, className: this.question.cssClasses.cell },
17302
17335
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { onMouseDown: this.handleOnMouseDown, className: itemClass },
17303
17336
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { id: inputId, type: "radio", className: this.cssClasses.itemValue, name: row.fullName, value: column.value, disabled: this.isDisplayMode, checked: isChecked, onChange: this.handleOnChange, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.getCellAriaLabel(row.locText.renderedHtml, column.locText.renderedHtml), "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-describedby": this.question.a11y_input_ariaDescribedBy }),
@@ -17305,7 +17338,7 @@ var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
17305
17338
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: this.cssClasses.itemDecorator },
17306
17339
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("use", { xlinkHref: this.question.itemSvgIcon })) :
17307
17340
  null),
17308
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { style: !this.question.isMobile ? { display: "none" } : undefined, className: this.question.cssClasses.cellResponsiveTitle }, this.renderLocString(column.locText)))));
17341
+ mobileSpan)));
17309
17342
  }
17310
17343
  tds.push(td);
17311
17344
  }
@@ -18874,6 +18907,14 @@ var SurveyQuestionTagbox = /** @class */ (function (_super) {
18874
18907
  select,
18875
18908
  comment));
18876
18909
  };
18910
+ SurveyQuestionTagbox.prototype.renderReadOnlyElement = function () {
18911
+ if (this.question.locReadOnlyText) {
18912
+ return this.renderLocString(this.question.locReadOnlyText);
18913
+ }
18914
+ else {
18915
+ return null;
18916
+ }
18917
+ };
18877
18918
  return SurveyQuestionTagbox;
18878
18919
  }(_dropdown_base__WEBPACK_IMPORTED_MODULE_2__["SurveyQuestionDropdownBase"]));
18879
18920
 
@@ -19865,14 +19906,8 @@ var settings = {
19865
19906
  showEmptyTitles: true
19866
19907
  },
19867
19908
  //#region designMode section, Obsolete properties
19868
- /**
19869
- * This property is obsolete. Use the [`settings.designMode.showEmptyDescriptions`](https://surveyjs.io/form-library/documentation/api-reference/settings#designMode) property instead.
19870
- */
19871
19909
  get allowShowEmptyDescriptionInDesignMode() { return this.designMode.showEmptyDescriptions; },
19872
19910
  set allowShowEmptyDescriptionInDesignMode(val) { this.designMode.showEmptyDescriptions = val; },
19873
- /**
19874
- * This property is obsolete. Use the [`settings.designMode.showEmptyTitles`](https://surveyjs.io/form-library/documentation/api-reference/settings#designMode) property instead.
19875
- */
19876
19911
  get allowShowEmptyTitleInDesignMode() { return this.designMode.showEmptyTitles; },
19877
19912
  set allowShowEmptyTitleInDesignMode(val) { this.designMode.showEmptyTitles = val; },
19878
19913
  //#endregion
@@ -19896,19 +19931,10 @@ var settings = {
19896
19931
  defaultLocaleName: "default"
19897
19932
  },
19898
19933
  //#region localization section, obsolete properties
19899
- /**
19900
- * This property is obsolete. Use the [`settings.localization.useLocalTimeZone`](https://surveyjs.io/form-library/documentation/api-reference/settings#localization) property instead.
19901
- */
19902
19934
  get useLocalTimeZone() { return this.localization.useLocalTimeZone; },
19903
19935
  set useLocalTimeZone(val) { this.localization.useLocalTimeZone = val; },
19904
- /**
19905
- * This property is obsolete. Use the [`settings.localization.storeDuplicatedTranslations`](https://surveyjs.io/form-library/documentation/api-reference/settings#localization) property instead.
19906
- */
19907
19936
  get storeDuplicatedTranslations() { return this.localization.storeDuplicatedTranslations; },
19908
19937
  set storeDuplicatedTranslations(val) { this.localization.storeDuplicatedTranslations = val; },
19909
- /**
19910
- * This property is obsolete. Use the [`settings.localization.defaultLocaleName`](https://surveyjs.io/form-library/documentation/api-reference/settings#localization) property instead.
19911
- */
19912
19938
  get defaultLocaleName() { return this.localization.defaultLocaleName; },
19913
19939
  set defaultLocaleName(val) { this.localization.defaultLocaleName = val; },
19914
19940
  //#endregion
@@ -19921,41 +19947,41 @@ var settings = {
19921
19947
  * Specifies whether to encode URL parameters when you access a web service. Default value: `true`.
19922
19948
  *
19923
19949
  * - `cacheLoadedChoices`: `boolean`\
19924
- * Specifies whether to cache [choices](https://surveyjs.io/form-library/documentation/api-reference/checkbox-question-model#choicesByUrl) loaded from a web service. Default value: `true`.
19950
+ * Specifies whether to cache [choices loaded from a web service](https://surveyjs.io/form-library/documentation/api-reference/questionselectbase#choicesByUrl). Default value: `true`.
19925
19951
  *
19926
19952
  * - `disableQuestionWhileLoadingChoices`: `boolean`\
19927
19953
  * Disables a question while its choices are being loaded from a web service. Default value: `false`.
19928
19954
  *
19929
19955
  * - `surveyServiceUrl`: `string`\
19930
19956
  * The URL of the SurveyJS Service API endpoint.
19957
+ *
19958
+ * - `onBeforeRequestChoices`: `(sender: ChoicesRestful, options: { request: XMLHttpRequest })`\
19959
+ * An event that is raised before a request for choices is send. Applies to questions with a specified [`choiceByUrl`](https://surveyjs.io/form-library/documentation/api-reference/questionselectbase#choicesByUrl) property. Use the `options.request` parameter to access and modify the `XMLHttpRequest` object. For instance, you can add authentication headers to it:
19960
+ *
19961
+ * ```js
19962
+ * import { settings } from "survey-core";
19963
+ *
19964
+ * settings.web.onBeforeSendRequest = (sender, options) => {
19965
+ * options.request.setRequestHeader('RequestVerificationToken', requestVerificationToken);
19966
+ * };
19967
+ * ```
19931
19968
  */
19932
19969
  web: {
19970
+ onBeforeRequestChoices: function (sender, options) { },
19933
19971
  encodeUrlParams: true,
19934
19972
  cacheLoadedChoices: true,
19935
19973
  disableQuestionWhileLoadingChoices: false,
19936
19974
  surveyServiceUrl: "https://api.surveyjs.io/public/v1/Survey"
19937
19975
  },
19938
19976
  //#region web section, obsolete properties
19939
- /**
19940
- * This property is obsolete. Use the [`settings.web.encodeUrlParams`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
19941
- */
19942
19977
  get webserviceEncodeParameters() { return this.web.encodeUrlParams; },
19943
19978
  set webserviceEncodeParameters(val) { this.web.encodeUrlParams = val; },
19944
- /**
19945
- * This property is obsolete. Use the [`settings.web.cacheLoadedChoices`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
19946
- */
19947
19979
  get useCachingForChoicesRestful() { return this.web.cacheLoadedChoices; },
19948
19980
  set useCachingForChoicesRestful(val) { this.web.cacheLoadedChoices = val; },
19949
19981
  get useCachingForChoicesRestfull() { return this.web.cacheLoadedChoices; },
19950
19982
  set useCachingForChoicesRestfull(val) { this.web.cacheLoadedChoices = val; },
19951
- /**
19952
- * This property is obsolete. Use the [`settings.web.disableQuestionWhileLoadingChoices`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
19953
- */
19954
19983
  get disableOnGettingChoicesFromWeb() { return this.web.disableQuestionWhileLoadingChoices; },
19955
19984
  set disableOnGettingChoicesFromWeb(val) { this.web.disableQuestionWhileLoadingChoices = val; },
19956
- /**
19957
- * This property is obsolete. Use the [`settings.web.surveyServiceUrl`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
19958
- */
19959
19985
  get surveyServiceUrl() { return this.web.surveyServiceUrl; },
19960
19986
  set surveyServiceUrl(val) { this.web.surveyServiceUrl = val; },
19961
19987
  //#endregion
@@ -19981,19 +20007,10 @@ var settings = {
19981
20007
  executeSkipOnValueChanged: true
19982
20008
  },
19983
20009
  //#region triggers section, Obsolete properties
19984
- /**
19985
- * This property is obsolete. Use the [`settings.triggers.executeCompleteOnValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/settings#triggers) property instead.
19986
- */
19987
20010
  get executeCompleteTriggerOnValueChanged() { return this.triggers.executeCompleteOnValueChanged; },
19988
20011
  set executeCompleteTriggerOnValueChanged(val) { this.triggers.executeCompleteOnValueChanged = val; },
19989
- /**
19990
- * This property is obsolete. Use the [`settings.triggers.changeNavigationButtonsOnComplete`](https://surveyjs.io/form-library/documentation/api-reference/settings#triggers) property instead.
19991
- */
19992
20012
  get changeNavigationButtonsOnCompleteTrigger() { return this.triggers.changeNavigationButtonsOnComplete; },
19993
20013
  set changeNavigationButtonsOnCompleteTrigger(val) { this.triggers.changeNavigationButtonsOnComplete = val; },
19994
- /**
19995
- * This property is obsolete. Use the [`settings.triggers.executeSkipOnValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/settings#triggers) property instead.
19996
- */
19997
20014
  get executeSkipTriggerOnValueChanged() { return this.triggers.executeSkipOnValueChanged; },
19998
20015
  set executeSkipTriggerOnValueChanged(val) { this.triggers.executeSkipOnValueChanged = val; },
19999
20016
  //#endregion
@@ -20031,19 +20048,10 @@ var settings = {
20031
20048
  localizableStringSerializeAsObject: false
20032
20049
  },
20033
20050
  //#region serialization section, Obsolete properties
20034
- /**
20035
- * This property is obsolete. Use the [`settings.serialization.itemValueSerializeAsObject`](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization) property instead.
20036
- */
20037
20051
  get itemValueAlwaysSerializeAsObject() { return this.serialization.itemValueSerializeAsObject; },
20038
20052
  set itemValueAlwaysSerializeAsObject(val) { this.serialization.itemValueSerializeAsObject = val; },
20039
- /**
20040
- * This property is obsolete. Use the [`settings.serialization.itemValueSerializeDisplayText`](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization) property instead.
20041
- */
20042
20053
  get itemValueAlwaysSerializeText() { return this.serialization.itemValueSerializeDisplayText; },
20043
20054
  set itemValueAlwaysSerializeText(val) { this.serialization.itemValueSerializeDisplayText = val; },
20044
- /**
20045
- * This property is obsolete. Use the [`settings.serialization.localizableStringSerializeAsObject`](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization) property instead.
20046
- */
20047
20055
  get serializeLocalizableStringAsObject() { return this.serialization.localizableStringSerializeAsObject; },
20048
20056
  set serializeLocalizableStringAsObject(val) { this.serialization.localizableStringSerializeAsObject = val; },
20049
20057
  //#endregion
@@ -20062,9 +20070,6 @@ var settings = {
20062
20070
  firstBatchSize: 3
20063
20071
  },
20064
20072
  //#region lazyRender section, Obsolete properties
20065
- /**
20066
- * This property is obsolete. Use the [`settings.lazyRender.enabled`](https://surveyjs.io/form-library/documentation/api-reference/settings#lazyRender) property instead.
20067
- */
20068
20073
  get lazyRowsRendering() { return this.lazyRender.enabled; },
20069
20074
  set lazyRowsRendering(val) { this.lazyRender.enabled = val; },
20070
20075
  get lazyRowsRenderingStartRow() { return this.lazyRender.firstBatchSize; },
@@ -20114,34 +20119,16 @@ var settings = {
20114
20119
  rateSize: "small",
20115
20120
  },
20116
20121
  //#region matrix section, Obsolete properties
20117
- /**
20118
- * This property is obsolete. Use the [`settings.matrix.defaultRowName`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
20119
- */
20120
20122
  get matrixDefaultRowName() { return this.matrix.defaultRowName; },
20121
20123
  set matrixDefaultRowName(val) { this.matrix.defaultRowName = val; },
20122
- /**
20123
- * This property is obsolete. Use the [`settings.matrix.defaultCellType`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
20124
- */
20125
20124
  get matrixDefaultCellType() { return this.matrix.defaultCellType; },
20126
20125
  set matrixDefaultCellType(val) { this.matrix.defaultCellType = val; },
20127
- /**
20128
- * This property is obsolete. Use the [`settings.matrix.totalsSuffix`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
20129
- */
20130
20126
  get matrixTotalValuePostFix() { return this.matrix.totalsSuffix; },
20131
20127
  set matrixTotalValuePostFix(val) { this.matrix.totalsSuffix = val; },
20132
- /**
20133
- * This property is obsolete. Use the [`settings.matrix.maxRowCount`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
20134
- */
20135
20128
  get matrixMaximumRowCount() { return this.matrix.maxRowCount; },
20136
20129
  set matrixMaximumRowCount(val) { this.matrix.maxRowCount = val; },
20137
- /**
20138
- * This property is obsolete. Use the [`settings.matrix.maxRowCountInCondition`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
20139
- */
20140
20130
  get matrixMaxRowCountInCondition() { return this.matrix.maxRowCountInCondition; },
20141
20131
  set matrixMaxRowCountInCondition(val) { this.matrix.maxRowCountInCondition = val; },
20142
- /**
20143
- * This property is obsolete. Use the [`settings.matrix.renderRemoveAsIcon`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
20144
- */
20145
20132
  get matrixRenderRemoveAsIcon() { return this.matrix.renderRemoveAsIcon; },
20146
20133
  set matrixRenderRemoveAsIcon(val) { this.matrix.renderRemoveAsIcon = val; },
20147
20134
  //#endregion
@@ -20163,14 +20150,8 @@ var settings = {
20163
20150
  maxPanelCountInCondition: 1
20164
20151
  },
20165
20152
  //#region panel section, Obsolete properties
20166
- /**
20167
- * This property is obsolete. Use the [`settings.panel.maxPanelCountInCondition`](https://surveyjs.io/form-library/documentation/api-reference/settings#panel) property instead.
20168
- */
20169
20153
  get panelDynamicMaxPanelCountInCondition() { return this.panel.maxPanelCountInCondition; },
20170
20154
  set panelDynamicMaxPanelCountInCondition(val) { this.panel.maxPanelCountInCondition = val; },
20171
- /**
20172
- * This property is obsolete. Use the [`settings.panel.maxPanelCount`](https://surveyjs.io/form-library/documentation/api-reference/settings#panel) property instead.
20173
- */
20174
20155
  get panelMaximumPanelCount() { return this.panel.maxPanelCount; },
20175
20156
  set panelMaximumPanelCount(val) { this.panel.maxPanelCount = val; },
20176
20157
  //#endregion
@@ -20191,14 +20172,8 @@ var settings = {
20191
20172
  textRenderMode: "input"
20192
20173
  },
20193
20174
  //#region readOnly section, Obsolete properties
20194
- /**
20195
- * This property is obsolete. Use the [`settings.readOnly.commentRenderMode`](https://surveyjs.io/form-library/documentation/api-reference/settings#readOnly) property instead.
20196
- */
20197
20175
  get readOnlyCommentRenderMode() { return this.readOnly.commentRenderMode; },
20198
20176
  set readOnlyCommentRenderMode(val) { this.readOnly.commentRenderMode = val; },
20199
- /**
20200
- * This property is obsolete. Use the [`settings.readOnly.textRenderMode`](https://surveyjs.io/form-library/documentation/api-reference/settings#readOnly) property instead.
20201
- */
20202
20177
  get readOnlyTextRenderMode() { return this.readOnly.textRenderMode; },
20203
20178
  set readOnlyTextRenderMode(val) { this.readOnly.textRenderMode = val; },
20204
20179
  //#endregion
@@ -20218,14 +20193,8 @@ var settings = {
20218
20193
  includeQuestionsWithHiddenTitle: false
20219
20194
  },
20220
20195
  //#region numbering section, Obsolete properties
20221
- /**
20222
- * This property is obsolete. Use the [`settings.numbering.includeQuestionsWithHiddenTitle`](https://surveyjs.io/form-library/documentation/api-reference/settings#numbering) property instead.
20223
- */
20224
20196
  get setQuestionVisibleIndexForHiddenTitle() { return this.numbering.includeQuestionsWithHiddenTitle; },
20225
20197
  set setQuestionVisibleIndexForHiddenTitle(val) { this.numbering.includeQuestionsWithHiddenTitle = val; },
20226
- /**
20227
- * This property is obsolete. Use the [`settings.numbering.includeQuestionsWithHiddenNumber`](https://surveyjs.io/form-library/documentation/api-reference/settings#numbering) property instead.
20228
- */
20229
20198
  get setQuestionVisibleIndexForHiddenNumber() { return this.numbering.includeQuestionsWithHiddenNumber; },
20230
20199
  set setQuestionVisibleIndexForHiddenNumber(val) { this.numbering.includeQuestionsWithHiddenNumber = val; },
20231
20200
  //#endregion