survey-react-ui 1.9.111 → 1.9.113
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 +2 -2
- package/survey-react-ui.js +35 -22
- package/survey-react-ui.js.map +1 -1
- package/survey-react-ui.min.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-react-ui",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.113",
|
|
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",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"typings": "survey-react-ui.d.ts",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"survey-core": "1.9.
|
|
24
|
+
"survey-core": "1.9.113",
|
|
25
25
|
"react": "^16.5.0 || ^17.0.1 || ^18.1.0",
|
|
26
26
|
"react-dom": "^16.5.0 || ^17.0.1 || ^18.1.0"
|
|
27
27
|
}
|
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.113
|
|
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
|
*/
|
|
@@ -2556,7 +2556,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2556
2556
|
|
|
2557
2557
|
|
|
2558
2558
|
|
|
2559
|
-
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.
|
|
2559
|
+
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.113", "survey-react-ui");
|
|
2560
2560
|
|
|
2561
2561
|
|
|
2562
2562
|
/***/ }),
|
|
@@ -7453,14 +7453,17 @@ var JsonObjectProperty = /** @class */ (function () {
|
|
|
7453
7453
|
enumerable: false,
|
|
7454
7454
|
configurable: true
|
|
7455
7455
|
});
|
|
7456
|
+
JsonObjectProperty.prototype.getDefaultValue = function (obj) {
|
|
7457
|
+
var result = !!this.defaultValueFunc ? this.defaultValueFunc(obj) : this.defaultValueValue;
|
|
7458
|
+
if (!!JsonObjectProperty.getItemValuesDefaultValue &&
|
|
7459
|
+
JsonObject.metaData.isDescendantOf(this.className, "itemvalue")) {
|
|
7460
|
+
result = JsonObjectProperty.getItemValuesDefaultValue(this.defaultValueValue || [], this.className);
|
|
7461
|
+
}
|
|
7462
|
+
return result;
|
|
7463
|
+
};
|
|
7456
7464
|
Object.defineProperty(JsonObjectProperty.prototype, "defaultValue", {
|
|
7457
7465
|
get: function () {
|
|
7458
|
-
|
|
7459
|
-
if (!!JsonObjectProperty.getItemValuesDefaultValue &&
|
|
7460
|
-
JsonObject.metaData.isDescendantOf(this.className, "itemvalue")) {
|
|
7461
|
-
result = JsonObjectProperty.getItemValuesDefaultValue(this.defaultValueValue || [], this.className);
|
|
7462
|
-
}
|
|
7463
|
-
return result;
|
|
7466
|
+
return this.getDefaultValue(undefined);
|
|
7464
7467
|
},
|
|
7465
7468
|
set: function (newValue) {
|
|
7466
7469
|
this.defaultValueValue = newValue;
|
|
@@ -7469,8 +7472,12 @@ var JsonObjectProperty = /** @class */ (function () {
|
|
|
7469
7472
|
configurable: true
|
|
7470
7473
|
});
|
|
7471
7474
|
JsonObjectProperty.prototype.isDefaultValue = function (value) {
|
|
7472
|
-
|
|
7473
|
-
|
|
7475
|
+
return this.isDefaultValueByObj(undefined, value);
|
|
7476
|
+
};
|
|
7477
|
+
JsonObjectProperty.prototype.isDefaultValueByObj = function (obj, value) {
|
|
7478
|
+
var dValue = this.getDefaultValue(obj);
|
|
7479
|
+
if (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(dValue)) {
|
|
7480
|
+
return _helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isTwoValueEquals(value, dValue, false, true, false);
|
|
7474
7481
|
}
|
|
7475
7482
|
if (this.isLocalizable)
|
|
7476
7483
|
return value === null || value === undefined;
|
|
@@ -8836,7 +8843,7 @@ var JsonObject = /** @class */ (function () {
|
|
|
8836
8843
|
(property.isLightSerializable === false && this.lightSerializing))
|
|
8837
8844
|
return;
|
|
8838
8845
|
var value = property.getValue(obj);
|
|
8839
|
-
if (!storeDefaults && property.
|
|
8846
|
+
if (!storeDefaults && property.isDefaultValueByObj(obj, value))
|
|
8840
8847
|
return;
|
|
8841
8848
|
if (this.isValueArray(value)) {
|
|
8842
8849
|
var arrValue = [];
|
|
@@ -8850,7 +8857,7 @@ var JsonObject = /** @class */ (function () {
|
|
|
8850
8857
|
}
|
|
8851
8858
|
var hasValue = typeof obj["getPropertyValue"] === "function" &&
|
|
8852
8859
|
obj["getPropertyValue"](property.name, null) !== null;
|
|
8853
|
-
if ((storeDefaults && hasValue) || !property.
|
|
8860
|
+
if ((storeDefaults && hasValue) || !property.isDefaultValueByObj(obj, value)) {
|
|
8854
8861
|
if (!Serializer.onSerializingProperty || !Serializer.onSerializingProperty(obj, property, value, result)) {
|
|
8855
8862
|
result[property.name] = value;
|
|
8856
8863
|
}
|
|
@@ -10570,9 +10577,9 @@ var CoverCellComponent = /** @class */ (function (_super) {
|
|
|
10570
10577
|
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: this.model.css, style: this.model.style },
|
|
10571
10578
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "sv-cover__cell-content", style: this.model.contentStyle },
|
|
10572
10579
|
this.model.showLogo ? (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "sv-cover__logo" }, this.renderLogoImage())) : null,
|
|
10573
|
-
this.model.showTitle ? (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "sv-cover__title", style: { maxWidth: this.model.
|
|
10580
|
+
this.model.showTitle ? (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "sv-cover__title", style: { maxWidth: this.model.textAreaWidth } },
|
|
10574
10581
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_title_title_element__WEBPACK_IMPORTED_MODULE_3__["TitleElement"], { element: this.model.survey }))) : null,
|
|
10575
|
-
this.model.showDescription ? (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "sv-cover__description", style: { maxWidth: this.model.
|
|
10582
|
+
this.model.showDescription ? (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "sv-cover__description", style: { maxWidth: this.model.textAreaWidth } },
|
|
10576
10583
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h5", { className: this.model.survey.css.description }, _reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["SurveyElementBase"].renderLocString(this.model.survey.locDescription)))) : null)));
|
|
10577
10584
|
};
|
|
10578
10585
|
return CoverCellComponent;
|
|
@@ -10595,12 +10602,12 @@ var CoverComponent = /** @class */ (function (_super) {
|
|
|
10595
10602
|
};
|
|
10596
10603
|
CoverComponent.prototype.renderElement = function () {
|
|
10597
10604
|
this.model.survey = this.props.survey;
|
|
10598
|
-
if (!(this.props.survey.
|
|
10605
|
+
if (!(this.props.survey.headerView === "advanced" && this.props.survey.renderedHasHeader)) {
|
|
10599
10606
|
return null;
|
|
10600
10607
|
}
|
|
10601
10608
|
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: this.model.coverClasses, style: { height: this.model.renderedHeight } },
|
|
10602
10609
|
this.model.backgroundImage ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { style: this.model.backgroundImageStyle, className: this.model.backgroundImageClasses }) : null,
|
|
10603
|
-
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: this.model.contentClasses }, this.model.cells.map(function (cell, index) { return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(CoverCellComponent, { key: index, model: cell }); }))));
|
|
10610
|
+
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: this.model.contentClasses, style: { maxWidth: this.model.maxWidth } }, this.model.cells.map(function (cell, index) { return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(CoverCellComponent, { key: index, model: cell }); }))));
|
|
10604
10611
|
};
|
|
10605
10612
|
return CoverComponent;
|
|
10606
10613
|
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["SurveyElementBase"]));
|
|
@@ -12965,13 +12972,13 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
|
12965
12972
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { style: { visibility: "hidden" }, "data-bind": "text: model.filterString" }, dropdownListModel.inputStringRendered),
|
|
12966
12973
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, dropdownListModel.hintStringSuffix))) : null,
|
|
12967
12974
|
valueElement,
|
|
12968
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), ref: function (element) { return (_this.inputElement = element); }, className: this.question.cssClasses.filterStringInput, role: dropdownListModel.filterStringEnabled ? this.question.ariaRole : undefined, "aria-
|
|
12975
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), ref: function (element) { return (_this.inputElement = element); }, className: this.question.cssClasses.filterStringInput, role: dropdownListModel.filterStringEnabled ? this.question.ariaRole : undefined, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant, placeholder: dropdownListModel.placeholderRendered, readOnly: !dropdownListModel.searchEnabled ? true : undefined, tabIndex: dropdownListModel.inputReadOnly ? undefined : -1, disabled: this.question.isInputReadOnly, inputMode: dropdownListModel.inputMode, onChange: function (e) { onInputChange(e); }, onBlur: this.blur, onFocus: this.focus })),
|
|
12969
12976
|
this.createClearButton()));
|
|
12970
12977
|
};
|
|
12971
12978
|
SurveyQuestionDropdownBase.prototype.createClearButton = function () {
|
|
12972
12979
|
if (!this.question.allowClear || !this.question.cssClasses.cleanButtonIconId)
|
|
12973
12980
|
return null;
|
|
12974
|
-
var style = { display: this.question.
|
|
12981
|
+
var style = { display: !this.question.showClearButton ? "none" : "" };
|
|
12975
12982
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.cleanButton, style: style, onClick: this.clear },
|
|
12976
12983
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { className: this.question.cssClasses.cleanButtonSvg, iconName: this.question.cssClasses.cleanButtonIconId, title: this.question.clearCaption, size: "auto" })));
|
|
12977
12984
|
};
|
|
@@ -14534,7 +14541,7 @@ var Survey = /** @class */ (function (_super) {
|
|
|
14534
14541
|
renderResult = this.renderSurvey();
|
|
14535
14542
|
}
|
|
14536
14543
|
var backgroundImage = !!this.survey.backgroundImage ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.rootBackgroundImage, style: this.survey.backgroundImageStyle }) : null;
|
|
14537
|
-
var header = this.survey.
|
|
14544
|
+
var header = this.survey.headerView === "basic" ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_survey_header_survey_header__WEBPACK_IMPORTED_MODULE_5__["SurveyHeader"], { survey: this.survey }) : null;
|
|
14538
14545
|
var onSubmit = function (event) {
|
|
14539
14546
|
event.preventDefault();
|
|
14540
14547
|
};
|
|
@@ -14868,7 +14875,7 @@ var SurveyProgress = /** @class */ (function (_super) {
|
|
|
14868
14875
|
width: this.progress + "%",
|
|
14869
14876
|
};
|
|
14870
14877
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.survey.getProgressCssClasses(this.props.container) },
|
|
14871
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { style: progressStyle, className: this.css.progressBar, role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100 },
|
|
14878
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { style: progressStyle, className: this.css.progressBar, role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": "progress" },
|
|
14872
14879
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: survey_core__WEBPACK_IMPORTED_MODULE_1__["SurveyProgressModel"].getProgressTextInBarCss(this.css) }, this.progressText)),
|
|
14873
14880
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: survey_core__WEBPACK_IMPORTED_MODULE_1__["SurveyProgressModel"].getProgressTextUnderBarCss(this.css) }, this.progressText)));
|
|
14874
14881
|
};
|
|
@@ -18525,7 +18532,7 @@ var SurveyQuestionRating = /** @class */ (function (_super) {
|
|
|
18525
18532
|
this.setState({ value: this.question.value });
|
|
18526
18533
|
};
|
|
18527
18534
|
SurveyQuestionRating.prototype.renderItem = function (item, index) {
|
|
18528
|
-
var renderedItem = _element_factory__WEBPACK_IMPORTED_MODULE_3__["ReactElementFactory"].Instance.createElement(this.question.
|
|
18535
|
+
var renderedItem = _element_factory__WEBPACK_IMPORTED_MODULE_3__["ReactElementFactory"].Instance.createElement(this.question.itemComponent, {
|
|
18529
18536
|
question: this.question,
|
|
18530
18537
|
item: item,
|
|
18531
18538
|
index: index,
|
|
@@ -19405,7 +19412,7 @@ var TagboxFilterString = /** @class */ (function (_super) {
|
|
|
19405
19412
|
(react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.hintSuffix },
|
|
19406
19413
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { style: { visibility: "hidden" }, "data-bind": "text: model.filterString" }, this.model.inputStringRendered),
|
|
19407
19414
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, this.model.hintStringSuffix))) : null,
|
|
19408
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), inputMode: this.model.inputMode, ref: function (element) { return (_this.inputElement = element); }, className: this.question.cssClasses.filterStringInput, disabled: this.question.isInputReadOnly, readOnly: !this.model.searchEnabled ? true : undefined, size: !this.model.inputStringRendered ? 1 : undefined, role: this.model.filterStringEnabled ? this.question.ariaRole : undefined, "aria-
|
|
19415
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), inputMode: this.model.inputMode, ref: function (element) { return (_this.inputElement = element); }, className: this.question.cssClasses.filterStringInput, disabled: this.question.isInputReadOnly, readOnly: !this.model.searchEnabled ? true : undefined, size: !this.model.inputStringRendered ? 1 : undefined, role: this.model.filterStringEnabled ? this.question.ariaRole : undefined, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-controls": this.model.listElementId, "aria-activedescendant": this.model.ariaActivedescendant, placeholder: this.model.filterStringPlaceholder, onKeyDown: function (e) { _this.keyhandler(e); }, onChange: function (e) { _this.onChange(e); }, onBlur: function (e) { _this.onBlur(e); }, onFocus: function (e) { _this.onFocus(e); } }))));
|
|
19409
19416
|
};
|
|
19410
19417
|
return TagboxFilterString;
|
|
19411
19418
|
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElementBase"]));
|
|
@@ -20036,6 +20043,12 @@ var settings = {
|
|
|
20036
20043
|
notifications: {
|
|
20037
20044
|
lifetime: 2000
|
|
20038
20045
|
},
|
|
20046
|
+
/**
|
|
20047
|
+
* Specifies how many milliseconds a survey should wait before it automatically switches to the next page. Applies only when [auto-advance](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#goNextPageAutomatic) is enabled.
|
|
20048
|
+
*
|
|
20049
|
+
* Default value: 300
|
|
20050
|
+
*/
|
|
20051
|
+
autoAdvanceDelay: 300,
|
|
20039
20052
|
/**
|
|
20040
20053
|
* Specifies the direction in which to lay out Checkbox and Radiogroup items. This setting affects the resulting UI when items are arranged in [more than one column](https://surveyjs.io/form-library/documentation/api-reference/checkbox-question-model#colCount).
|
|
20041
20054
|
*
|