survey-react-ui 1.9.96 → 1.9.98
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-react-ui",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.98",
|
|
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.98",
|
|
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.98
|
|
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
|
*/
|
|
@@ -690,7 +690,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
690
690
|
|
|
691
691
|
|
|
692
692
|
|
|
693
|
-
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.
|
|
693
|
+
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.98", "survey-react-ui");
|
|
694
694
|
|
|
695
695
|
|
|
696
696
|
/***/ }),
|
|
@@ -3563,7 +3563,9 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
|
3563
3563
|
this.renderInput(this.question["dropdownListModel"]),
|
|
3564
3564
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_popup_popup__WEBPACK_IMPORTED_MODULE_2__["Popup"], { model: (_b = (_a = this.question) === null || _a === void 0 ? void 0 : _a.dropdownListModel) === null || _b === void 0 ? void 0 : _b.popupModel }));
|
|
3565
3565
|
}
|
|
3566
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.selectWrapper },
|
|
3566
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.selectWrapper, onClick: this.click },
|
|
3567
|
+
selectElement,
|
|
3568
|
+
this.createChevronButton()));
|
|
3567
3569
|
};
|
|
3568
3570
|
SurveyQuestionDropdownBase.prototype.renderValueElement = function (dropdownListModel) {
|
|
3569
3571
|
if (this.question.showInputFieldComponent) {
|
|
@@ -3583,7 +3585,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
|
3583
3585
|
dropdownListModel.inputStringRendered = e.target.value;
|
|
3584
3586
|
}
|
|
3585
3587
|
};
|
|
3586
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: dropdownListModel.inputReadOnly ? undefined : 0,
|
|
3588
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: dropdownListModel.inputReadOnly ? undefined : 0,
|
|
3587
3589
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
3588
3590
|
// @ts-ignore
|
|
3589
3591
|
disabled: this.question.isInputReadOnly, required: this.question.isRequired, onKeyDown: this.keyhandler, onBlur: this.blur, role: this.question.ariaRole, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-describedby": this.question.ariaDescribedBy, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant },
|
|
@@ -3606,6 +3608,12 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
|
3606
3608
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.cleanButton, style: style, onClick: this.clear },
|
|
3607
3609
|
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" })));
|
|
3608
3610
|
};
|
|
3611
|
+
SurveyQuestionDropdownBase.prototype.createChevronButton = function () {
|
|
3612
|
+
if (!this.question.cssClasses.chevronButtonIconId)
|
|
3613
|
+
return null;
|
|
3614
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.chevronButton },
|
|
3615
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { className: this.question.cssClasses.chevronButtonSvg, iconName: this.question.cssClasses.chevronButtonIconId, size: 24 })));
|
|
3616
|
+
};
|
|
3609
3617
|
SurveyQuestionDropdownBase.prototype.renderOther = function (cssClasses) {
|
|
3610
3618
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.getCommentAreaCss(true) },
|
|
3611
3619
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_reactquestion_comment__WEBPACK_IMPORTED_MODULE_5__["SurveyQuestionOtherValueItem"], { question: this.question, otherCss: cssClasses.other, cssClasses: cssClasses, isDisplayMode: this.isDisplayMode, isOther: true })));
|
|
@@ -3622,7 +3630,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
|
3622
3630
|
if (!!this.inputElement) {
|
|
3623
3631
|
var control = this.inputElement;
|
|
3624
3632
|
var newValue = this.question.dropdownListModel.inputStringRendered;
|
|
3625
|
-
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(newValue, control.value)) {
|
|
3633
|
+
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(newValue, control.value, false, true)) {
|
|
3626
3634
|
control.value = this.question.dropdownListModel.inputStringRendered;
|
|
3627
3635
|
}
|
|
3628
3636
|
}
|
|
@@ -3770,7 +3778,9 @@ var SurveyQuestionDropdownSelect = /** @class */ (function (_super) {
|
|
|
3770
3778
|
(react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("select", { id: this.question.inputId, className: this.question.getControlClass(), ref: function (select) { return (_this.setControl(select)); }, autoComplete: this.question.autocomplete, onChange: this.updateValueOnEvent, onInput: this.updateValueOnEvent, onClick: click, onKeyUp: keyup, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-describedby": this.question.ariaDescribedBy, required: this.question.isRequired },
|
|
3771
3779
|
this.question.allowClear ? (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("option", { value: "" }, this.question.placeholder)) : null,
|
|
3772
3780
|
this.question.visibleChoices.map(function (item, i) { return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_dropdown_item__WEBPACK_IMPORTED_MODULE_4__["SurveyQuestionOptionItem"], { key: "item" + i, item: item }); })));
|
|
3773
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.selectWrapper },
|
|
3781
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.selectWrapper },
|
|
3782
|
+
selectElement,
|
|
3783
|
+
this.createChevronButton()));
|
|
3774
3784
|
};
|
|
3775
3785
|
return SurveyQuestionDropdownSelect;
|
|
3776
3786
|
}(_reactquestion_dropdown__WEBPACK_IMPORTED_MODULE_3__["SurveyQuestionDropdown"]));
|
|
@@ -5022,6 +5032,7 @@ var Survey = /** @class */ (function (_super) {
|
|
|
5022
5032
|
else {
|
|
5023
5033
|
renderResult = this.renderSurvey();
|
|
5024
5034
|
}
|
|
5035
|
+
var backgroundImage = !!this.survey.renderBackgroundImage ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.rootBackgroundImage, style: this.survey.backgroundImageStyle }) : null;
|
|
5025
5036
|
var header = react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_survey_header_survey_header__WEBPACK_IMPORTED_MODULE_5__["SurveyHeader"], { survey: this.survey });
|
|
5026
5037
|
var onSubmit = function (event) {
|
|
5027
5038
|
event.preventDefault();
|
|
@@ -5032,11 +5043,9 @@ var Survey = /** @class */ (function (_super) {
|
|
|
5032
5043
|
}
|
|
5033
5044
|
var rootCss = this.survey.getRootCss();
|
|
5034
5045
|
var cssClasses = this.rootNodeClassName ? this.rootNodeClassName + " " + rootCss : rootCss;
|
|
5035
|
-
var formStyle = {
|
|
5036
|
-
backgroundColor: this.survey.renderBackgroundOpacity
|
|
5037
|
-
};
|
|
5038
5046
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.rootNodeId, ref: this.rootRef, className: cssClasses, style: this.survey.themeVariables },
|
|
5039
|
-
|
|
5047
|
+
backgroundImage,
|
|
5048
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("form", { onSubmit: onSubmit },
|
|
5040
5049
|
customHeader,
|
|
5041
5050
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.container },
|
|
5042
5051
|
header,
|
|
@@ -6974,7 +6983,7 @@ var SurveyQuestionUncontrolledElement = /** @class */ (function (_super) {
|
|
|
6974
6983
|
function SurveyQuestionUncontrolledElement(props) {
|
|
6975
6984
|
var _this = _super.call(this, props) || this;
|
|
6976
6985
|
_this.updateValueOnEvent = function (event) {
|
|
6977
|
-
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(_this.questionBase.value, event.target.value)) {
|
|
6986
|
+
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(_this.questionBase.value, event.target.value, false, true)) {
|
|
6978
6987
|
_this.setValueCore(event.target.value);
|
|
6979
6988
|
}
|
|
6980
6989
|
};
|
|
@@ -6998,7 +7007,7 @@ var SurveyQuestionUncontrolledElement = /** @class */ (function (_super) {
|
|
|
6998
7007
|
if (!!this.control) {
|
|
6999
7008
|
var control = this.control;
|
|
7000
7009
|
var newValue = this.getValueCore();
|
|
7001
|
-
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(newValue, control.value)) {
|
|
7010
|
+
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(newValue, control.value, false, true)) {
|
|
7002
7011
|
control.value = this.getValue(newValue);
|
|
7003
7012
|
}
|
|
7004
7013
|
}
|
|
@@ -7233,7 +7242,7 @@ var SurveyQuestionFile = /** @class */ (function (_super) {
|
|
|
7233
7242
|
fileInput = (this.isDisplayMode ?
|
|
7234
7243
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "file", disabled: this.isDisplayMode, className: !this.isDisplayMode ? this.question.cssClasses.fileInput : this.question.getReadOnlyFileCss(), id: this.question.inputId, ref: function (input) { return (_this.setControl(input)); }, style: !this.isDisplayMode ? {} : { color: "transparent" }, onChange: !this.isDisplayMode ? this.question.doChange : (function () { }), multiple: this.question.allowMultiple, placeholder: this.question.title, accept: this.question.acceptedTypes })
|
|
7235
7244
|
:
|
|
7236
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "file", disabled: this.isDisplayMode, tabIndex: -1, className: !this.isDisplayMode ? this.question.cssClasses.fileInput : this.question.getReadOnlyFileCss(), id: this.question.inputId, ref: function (input) { return (_this.setControl(input)); }, style: !this.isDisplayMode ? {} : { color: "transparent" }, onChange: !this.isDisplayMode ? this.question.doChange : (function () { }), "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-describedby": this.question.ariaDescribedBy, multiple: this.question.allowMultiple, title: this.question.inputTitle, accept: this.question.acceptedTypes }));
|
|
7245
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "file", disabled: this.isDisplayMode, tabIndex: -1, className: !this.isDisplayMode ? this.question.cssClasses.fileInput : this.question.getReadOnlyFileCss(), id: this.question.inputId, ref: function (input) { return (_this.setControl(input)); }, style: !this.isDisplayMode ? {} : { color: "transparent" }, onChange: !this.isDisplayMode ? this.question.doChange : (function () { }), "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-describedby": this.question.ariaDescribedBy, multiple: this.question.allowMultiple, title: this.question.inputTitle, accept: this.question.acceptedTypes, capture: this.question.renderCapture }));
|
|
7237
7246
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.fileRootCss },
|
|
7238
7247
|
fileInput,
|
|
7239
7248
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.dragArea, onDrop: this.question.onDrop, onDragOver: this.question.onDragOver, onDragLeave: this.question.onDragLeave, onDragEnter: this.question.onDragEnter },
|
|
@@ -7546,7 +7555,6 @@ var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
|
|
|
7546
7555
|
var td = null;
|
|
7547
7556
|
var column = this.question.visibleColumns[i];
|
|
7548
7557
|
var key = "value" + i;
|
|
7549
|
-
//var isChecked = Helpers.isTwoValueEquals(row.value, column.value);
|
|
7550
7558
|
var isChecked = row.value == column.value;
|
|
7551
7559
|
var itemClass = this.question.getItemClass(row, column);
|
|
7552
7560
|
var inputId = this.question.inputId + "_" + row.name + "_" + i;
|
|
@@ -8802,12 +8810,12 @@ var SurveyQuestionRanking = /** @class */ (function (_super) {
|
|
|
8802
8810
|
this.getItems(this.question.unRankingChoices, unrankedItem),
|
|
8803
8811
|
this.question.unRankingChoices.length === 0 ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.containerPlaceholder },
|
|
8804
8812
|
" ",
|
|
8805
|
-
this.question.
|
|
8813
|
+
this.question.selectToRankEmptyRankedAreaText,
|
|
8806
8814
|
" ") : null),
|
|
8807
8815
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.containersDivider }),
|
|
8808
8816
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.getContainerClasses("to"), "data-ranking": "to-container" },
|
|
8809
8817
|
this.getItems(),
|
|
8810
|
-
this.question.rankingChoices.length === 0 ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.containerPlaceholder }, this.question.
|
|
8818
|
+
this.question.rankingChoices.length === 0 ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.containerPlaceholder }, this.question.selectToRankEmptyUnrankedAreaText) : null)));
|
|
8811
8819
|
}
|
|
8812
8820
|
};
|
|
8813
8821
|
SurveyQuestionRanking.prototype.getItems = function (choices, unrankedItem) {
|
|
@@ -9091,7 +9099,7 @@ var SurveyQuestionTagbox = /** @class */ (function (_super) {
|
|
|
9091
9099
|
var _this = this;
|
|
9092
9100
|
var dropdownMultiSelectListModel = dropdownListModel;
|
|
9093
9101
|
var items = this.question.selectedChoices.map(function (choice, index) { return _this.renderItem("item" + index, choice); });
|
|
9094
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: dropdownListModel.inputReadOnly ? undefined : 0,
|
|
9102
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: dropdownListModel.inputReadOnly ? undefined : 0,
|
|
9095
9103
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
9096
9104
|
// @ts-ignore
|
|
9097
9105
|
disabled: this.question.isInputReadOnly, required: this.question.isRequired, onKeyDown: this.keyhandler, onBlur: this.blur, role: this.question.ariaRole, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-describedby": this.question.ariaDescribedBy, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant },
|
|
@@ -9850,7 +9858,7 @@ var TagboxFilterString = /** @class */ (function (_super) {
|
|
|
9850
9858
|
if (!!this.inputElement) {
|
|
9851
9859
|
var control = this.inputElement;
|
|
9852
9860
|
var newValue = this.model.inputStringRendered;
|
|
9853
|
-
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(newValue, control.value)) {
|
|
9861
|
+
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(newValue, control.value, false, true)) {
|
|
9854
9862
|
control.value = this.model.inputStringRendered;
|
|
9855
9863
|
}
|
|
9856
9864
|
}
|