survey-react-ui 1.9.78 → 1.9.79
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.d.ts +3 -0
- package/survey-react-ui.js +36 -13
- 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.79",
|
|
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.79",
|
|
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.d.ts
CHANGED
|
@@ -694,6 +694,7 @@ declare module "react/tagbox-filter" {
|
|
|
694
694
|
onChange(e: any): void;
|
|
695
695
|
keyhandler(e: any): void;
|
|
696
696
|
onBlur(e: any): void;
|
|
697
|
+
onFocus(e: any): void;
|
|
697
698
|
constructor(props: any);
|
|
698
699
|
getStateElement(): DropdownMultiSelectListModel;
|
|
699
700
|
render(): JSX.Element;
|
|
@@ -722,6 +723,8 @@ declare module "react/dropdown-base" {
|
|
|
722
723
|
clear: (event: any) => void;
|
|
723
724
|
keyhandler: (event: any) => void;
|
|
724
725
|
blur: (event: any) => void;
|
|
726
|
+
focus: (event: any) => void;
|
|
727
|
+
protected getStateElement(): any;
|
|
725
728
|
protected setValueCore(newValue: any): void;
|
|
726
729
|
protected getValueCore(): any;
|
|
727
730
|
protected renderSelect(cssClasses: any): JSX.Element;
|
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.79
|
|
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
|
*/
|
|
@@ -1183,7 +1183,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1183
1183
|
|
|
1184
1184
|
|
|
1185
1185
|
|
|
1186
|
-
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.
|
|
1186
|
+
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.79", "survey-react-ui");
|
|
1187
1187
|
|
|
1188
1188
|
|
|
1189
1189
|
/***/ }),
|
|
@@ -2541,7 +2541,9 @@ var NotifierComponent = /** @class */ (function (_super) {
|
|
|
2541
2541
|
return this.notifier;
|
|
2542
2542
|
};
|
|
2543
2543
|
NotifierComponent.prototype.renderElement = function () {
|
|
2544
|
-
|
|
2544
|
+
if (!this.notifier.isDisplayed)
|
|
2545
|
+
return null;
|
|
2546
|
+
var style = { visibility: this.notifier.active ? "visible" : "hidden" };
|
|
2545
2547
|
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: this.notifier.css, style: style },
|
|
2546
2548
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", null, this.notifier.message),
|
|
2547
2549
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_3__["SurveyActionBar"], { model: this.notifier.actionBar })));
|
|
@@ -3161,8 +3163,8 @@ var RatingItemStar = /** @class */ (function (_super) {
|
|
|
3161
3163
|
var _this = this;
|
|
3162
3164
|
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", { className: this.question.getItemClass(this.item.itemValue), onMouseOver: function (e) { return _this.question.onItemMouseIn(_this.item); }, onMouseOut: function (e) { return _this.question.onItemMouseOut(_this.item); } },
|
|
3163
3165
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.name, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.isDisplayMode, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: function () { }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-describedby": this.question.ariaDescribedBy }),
|
|
3164
|
-
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { className: "sv-star", size:
|
|
3165
|
-
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { className: "sv-star-2", size:
|
|
3166
|
+
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { className: "sv-star", size: "auto", iconName: "icon-rating-star", title: this.item.text }),
|
|
3167
|
+
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { className: "sv-star-2", size: "auto", iconName: "icon-rating-star-2", title: this.item.text })));
|
|
3166
3168
|
};
|
|
3167
3169
|
return RatingItemStar;
|
|
3168
3170
|
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_2__["SurveyElementBase"]));
|
|
@@ -3982,8 +3984,15 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
|
3982
3984
|
(_a = _this.question.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onBlur(event);
|
|
3983
3985
|
_this.updateInputDomElement();
|
|
3984
3986
|
};
|
|
3987
|
+
_this.focus = function (event) {
|
|
3988
|
+
var _a;
|
|
3989
|
+
(_a = _this.question.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onFocus(event);
|
|
3990
|
+
};
|
|
3985
3991
|
return _this;
|
|
3986
3992
|
}
|
|
3993
|
+
SurveyQuestionDropdownBase.prototype.getStateElement = function () {
|
|
3994
|
+
return this.question["dropdownListModel"];
|
|
3995
|
+
};
|
|
3987
3996
|
SurveyQuestionDropdownBase.prototype.setValueCore = function (newValue) {
|
|
3988
3997
|
this.questionBase.renderedValue = newValue;
|
|
3989
3998
|
};
|
|
@@ -4025,16 +4034,23 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
|
4025
4034
|
var valueElement = this.renderValueElement(dropdownListModel);
|
|
4026
4035
|
var onInputChange = function (e) {
|
|
4027
4036
|
if (e.target === document.activeElement) {
|
|
4028
|
-
dropdownListModel.
|
|
4037
|
+
dropdownListModel.inputStringRendered = e.target.value;
|
|
4029
4038
|
}
|
|
4030
4039
|
};
|
|
4031
4040
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: dropdownListModel.inputReadOnly ? undefined : 0, onClick: this.click,
|
|
4032
4041
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
4033
4042
|
// @ts-ignore
|
|
4034
4043
|
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 },
|
|
4044
|
+
dropdownListModel.showHintPrefix ?
|
|
4045
|
+
(react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.hintPrefix },
|
|
4046
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, dropdownListModel.hintStringPrefix))) : null,
|
|
4035
4047
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.controlValue },
|
|
4048
|
+
dropdownListModel.showHintString ?
|
|
4049
|
+
(react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.hintSuffix },
|
|
4050
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { style: { visibility: "hidden" }, "data-bind": "text: model.filterString" }, dropdownListModel.inputStringRendered),
|
|
4051
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, dropdownListModel.hintStringSuffix))) : null,
|
|
4036
4052
|
valueElement,
|
|
4037
|
-
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-label": this.question.placeholder, placeholder:
|
|
4053
|
+
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-label": this.question.placeholder, 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 })),
|
|
4038
4054
|
this.createClearButton()));
|
|
4039
4055
|
};
|
|
4040
4056
|
SurveyQuestionDropdownBase.prototype.createClearButton = function () {
|
|
@@ -4059,9 +4075,9 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
|
4059
4075
|
SurveyQuestionDropdownBase.prototype.updateInputDomElement = function () {
|
|
4060
4076
|
if (!!this.inputElement) {
|
|
4061
4077
|
var control = this.inputElement;
|
|
4062
|
-
var newValue = this.question.dropdownListModel.
|
|
4078
|
+
var newValue = this.question.dropdownListModel.inputStringRendered;
|
|
4063
4079
|
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(newValue, control.value)) {
|
|
4064
|
-
control.value = this.question.dropdownListModel.
|
|
4080
|
+
control.value = this.question.dropdownListModel.inputStringRendered;
|
|
4065
4081
|
}
|
|
4066
4082
|
}
|
|
4067
4083
|
};
|
|
@@ -6716,6 +6732,8 @@ var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
|
|
|
6716
6732
|
SurveyQuestionCheckboxItem.prototype.shouldComponentUpdate = function (nextProps, nextState) {
|
|
6717
6733
|
if (!_super.prototype.shouldComponentUpdate.call(this, nextProps, nextState))
|
|
6718
6734
|
return false;
|
|
6735
|
+
if (!this.question)
|
|
6736
|
+
return false;
|
|
6719
6737
|
return (!this.question.customWidget ||
|
|
6720
6738
|
!!this.question.customWidgetData.isNeedRender ||
|
|
6721
6739
|
!!this.question.customWidget.widgetJson.isDefaultRender ||
|
|
@@ -9093,6 +9111,8 @@ var SurveyQuestionRadioItem = /** @class */ (function (_super) {
|
|
|
9093
9111
|
SurveyQuestionRadioItem.prototype.shouldComponentUpdate = function (nextProps, nextState) {
|
|
9094
9112
|
if (!_super.prototype.shouldComponentUpdate.call(this, nextProps, nextState))
|
|
9095
9113
|
return false;
|
|
9114
|
+
if (!this.question)
|
|
9115
|
+
return false;
|
|
9096
9116
|
return (!this.question.customWidget ||
|
|
9097
9117
|
!!this.question.customWidgetData.isNeedRender ||
|
|
9098
9118
|
!!this.question.customWidget.widgetJson.isDefaultRender ||
|
|
@@ -10209,15 +10229,15 @@ var TagboxFilterString = /** @class */ (function (_super) {
|
|
|
10209
10229
|
TagboxFilterString.prototype.updateDomElement = function () {
|
|
10210
10230
|
if (!!this.inputElement) {
|
|
10211
10231
|
var control = this.inputElement;
|
|
10212
|
-
var newValue = this.model.
|
|
10232
|
+
var newValue = this.model.inputStringRendered;
|
|
10213
10233
|
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(newValue, control.value)) {
|
|
10214
|
-
control.value = this.model.
|
|
10234
|
+
control.value = this.model.inputStringRendered;
|
|
10215
10235
|
}
|
|
10216
10236
|
}
|
|
10217
10237
|
};
|
|
10218
10238
|
TagboxFilterString.prototype.onChange = function (e) {
|
|
10219
10239
|
if (e.target === document.activeElement) {
|
|
10220
|
-
this.model.
|
|
10240
|
+
this.model.inputStringRendered = e.target.value;
|
|
10221
10241
|
}
|
|
10222
10242
|
};
|
|
10223
10243
|
TagboxFilterString.prototype.keyhandler = function (e) {
|
|
@@ -10226,12 +10246,15 @@ var TagboxFilterString = /** @class */ (function (_super) {
|
|
|
10226
10246
|
TagboxFilterString.prototype.onBlur = function (e) {
|
|
10227
10247
|
this.model.onBlur(e);
|
|
10228
10248
|
};
|
|
10249
|
+
TagboxFilterString.prototype.onFocus = function (e) {
|
|
10250
|
+
this.model.onFocus(e);
|
|
10251
|
+
};
|
|
10229
10252
|
TagboxFilterString.prototype.getStateElement = function () {
|
|
10230
10253
|
return this.model;
|
|
10231
10254
|
};
|
|
10232
10255
|
TagboxFilterString.prototype.render = function () {
|
|
10233
10256
|
var _this = this;
|
|
10234
|
-
return (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.
|
|
10257
|
+
return (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-label": this.question.placeholder, 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); } }));
|
|
10235
10258
|
};
|
|
10236
10259
|
return TagboxFilterString;
|
|
10237
10260
|
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElementBase"]));
|