survey-react-ui 1.11.4 → 1.11.5
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 +30 -14
- 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.11.
|
|
3
|
+
"version": "1.11.5",
|
|
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
|
"peerDependencies": {
|
|
24
|
-
"survey-core": "1.11.
|
|
24
|
+
"survey-core": "1.11.5",
|
|
25
25
|
"react": "^16.5.0 || ^17.0.1 || ^18.2.0",
|
|
26
26
|
"react-dom": "^16.5.0 || ^17.0.1 || ^18.2.0"
|
|
27
27
|
}
|
package/survey-react-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.11.
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.11.5
|
|
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
|
*/
|
|
@@ -328,6 +328,13 @@ var BaseAction = /** @class */ (function (_super) {
|
|
|
328
328
|
enumerable: false,
|
|
329
329
|
configurable: true
|
|
330
330
|
});
|
|
331
|
+
Object.defineProperty(BaseAction.prototype, "hasSubItems", {
|
|
332
|
+
get: function () {
|
|
333
|
+
return !!this.items && this.items.length > 0;
|
|
334
|
+
},
|
|
335
|
+
enumerable: false,
|
|
336
|
+
configurable: true
|
|
337
|
+
});
|
|
331
338
|
BaseAction.prototype.getActionBarItemTitleCss = function () {
|
|
332
339
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
|
|
333
340
|
.append(this.cssClasses.itemTitle)
|
|
@@ -514,11 +521,13 @@ var Action = /** @class */ (function (_super) {
|
|
|
514
521
|
Action.prototype.createLocTitle = function () {
|
|
515
522
|
return this.createLocalizableString("title", this, true);
|
|
516
523
|
};
|
|
517
|
-
Action.prototype.
|
|
524
|
+
Action.prototype.setSubItems = function (options) {
|
|
518
525
|
this.markerIconName = "icon-next_16x16";
|
|
519
526
|
this.component = "sv-list-item-group";
|
|
520
|
-
this.items = __spreadArray([], items);
|
|
521
|
-
var
|
|
527
|
+
this.items = __spreadArray([], options.items);
|
|
528
|
+
var listOptions = Object.assign({}, options);
|
|
529
|
+
listOptions.searchEnabled = false;
|
|
530
|
+
var popupModel = createPopupModelWithListModel(listOptions, { horizontalPosition: "right", showPointer: false, canShrink: false });
|
|
522
531
|
popupModel.cssClass = "sv-popup-inner";
|
|
523
532
|
this.popupModel = popupModel;
|
|
524
533
|
};
|
|
@@ -1069,9 +1078,6 @@ var ActionContainer = /** @class */ (function (_super) {
|
|
|
1069
1078
|
itemValue.showPopupDelayed(_this.subItemsShowDelay);
|
|
1070
1079
|
_this.popupAfterShowCallback(itemValue);
|
|
1071
1080
|
}
|
|
1072
|
-
else if (!!action.popupModel && action.popupModel.isVisible) {
|
|
1073
|
-
action.hidePopupDelayed(_this.subItemsHideDelay);
|
|
1074
|
-
}
|
|
1075
1081
|
});
|
|
1076
1082
|
};
|
|
1077
1083
|
ActionContainer.prototype.initResponsivityManager = function (container, delayedUpdateFunction) {
|
|
@@ -3777,7 +3783,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3777
3783
|
|
|
3778
3784
|
|
|
3779
3785
|
|
|
3780
|
-
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.11.
|
|
3786
|
+
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.11.5", "survey-react-ui");
|
|
3781
3787
|
|
|
3782
3788
|
|
|
3783
3789
|
/***/ }),
|
|
@@ -10717,6 +10723,7 @@ var defaultListCss = {
|
|
|
10717
10723
|
searchClearButtonIcon: "sv-list__filter-clear-button",
|
|
10718
10724
|
loadingIndicator: "sv-list__loading-indicator",
|
|
10719
10725
|
itemSelected: "sv-list__item--selected",
|
|
10726
|
+
itemGroup: "sv-list__item--group",
|
|
10720
10727
|
itemWithIcon: "sv-list__item--with-icon",
|
|
10721
10728
|
itemDisabled: "sv-list__item--disabled",
|
|
10722
10729
|
itemFocused: "sv-list__item--focused",
|
|
@@ -10782,6 +10789,7 @@ var ListModel = /** @class */ (function (_super) {
|
|
|
10782
10789
|
.append(_this.cssClasses.itemDisabled, _this.isItemDisabled(itemValue))
|
|
10783
10790
|
.append(_this.cssClasses.itemFocused, _this.isItemFocused(itemValue))
|
|
10784
10791
|
.append(_this.cssClasses.itemSelected, _this.isItemSelected(itemValue))
|
|
10792
|
+
.append(_this.cssClasses.itemGroup, itemValue.hasSubItems)
|
|
10785
10793
|
.append(_this.cssClasses.itemHovered, itemValue.isHovered)
|
|
10786
10794
|
.append(_this.cssClasses.itemTextWrap, _this.textWrapEnabled)
|
|
10787
10795
|
.append(itemValue.css)
|
|
@@ -14816,7 +14824,7 @@ var RatingItem = /** @class */ (function (_super) {
|
|
|
14816
14824
|
var itemText = this.renderLocString(this.item.locText);
|
|
14817
14825
|
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", { onMouseDown: this.handleOnMouseDown, className: this.question.getItemClassByText(this.item.itemValue, this.item.text) },
|
|
14818
14826
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.questionName, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, 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-errormessage": this.question.ariaErrormessage }),
|
|
14819
|
-
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: this.question.cssClasses.itemText }, itemText)));
|
|
14827
|
+
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: this.question.cssClasses.itemText, "data-text": this.item.text }, itemText)));
|
|
14820
14828
|
};
|
|
14821
14829
|
RatingItem.prototype.componentDidMount = function () {
|
|
14822
14830
|
_super.prototype.componentDidMount.call(this);
|
|
@@ -17568,7 +17576,7 @@ var Survey = /** @class */ (function (_super) {
|
|
|
17568
17576
|
}
|
|
17569
17577
|
var rootCss = this.survey.getRootCss();
|
|
17570
17578
|
var cssClasses = this.rootNodeClassName ? this.rootNodeClassName + " " + rootCss : rootCss;
|
|
17571
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.rootNodeId, ref: this.rootRef, className: cssClasses, style: this.survey.themeVariables },
|
|
17579
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.rootNodeId, ref: this.rootRef, className: cssClasses, style: this.survey.themeVariables, lang: this.survey.locale || "en", dir: this.survey.localeDir },
|
|
17572
17580
|
this.survey.needRenderIcons ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_svgbundle__WEBPACK_IMPORTED_MODULE_10__["SvgBundleComponent"], null) : null,
|
|
17573
17581
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.survey.wrapperFormCss },
|
|
17574
17582
|
backgroundImage,
|
|
@@ -18605,7 +18613,7 @@ var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
|
|
|
18605
18613
|
var itemLabel = !this.hideCaption ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.cssClasses.controlLabel }, this.renderLocString(this.item.locText, this.textStyle)) : null;
|
|
18606
18614
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: itemClass, role: "presentation" },
|
|
18607
18615
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { className: labelClass },
|
|
18608
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { className: this.cssClasses.itemControl, type: "checkbox",
|
|
18616
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { className: this.cssClasses.itemControl, type: "checkbox", name: this.question.name + this.item.id, value: this.item.value, id: id, style: this.inputStyle, disabled: !this.question.getItemEnabled(this.item), readOnly: this.question.isReadOnlyAttr, checked: isChecked, onChange: this.handleOnChange, required: this.question.hasRequiredError() }),
|
|
18609
18617
|
this.cssClasses.materialDecorator ?
|
|
18610
18618
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.cssClasses.materialDecorator }, this.question.itemSvgIcon ?
|
|
18611
18619
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: this.cssClasses.itemDecorator },
|
|
@@ -18755,7 +18763,7 @@ var SurveyQuestionCommentItem = /** @class */ (function (_super) {
|
|
|
18755
18763
|
var comment = this.getComment() || "";
|
|
18756
18764
|
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", null, comment);
|
|
18757
18765
|
}
|
|
18758
|
-
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 } }));
|
|
18766
|
+
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(), rows: question.commentAreaRows, 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 } }));
|
|
18759
18767
|
};
|
|
18760
18768
|
return SurveyQuestionCommentItem;
|
|
18761
18769
|
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElement"]));
|
|
@@ -22922,11 +22930,18 @@ var settings = {
|
|
|
22922
22930
|
*/
|
|
22923
22931
|
ratingMaximumRateValueCount: 20,
|
|
22924
22932
|
/**
|
|
22925
|
-
* Specifies whether to close the drop-down menu of a [
|
|
22933
|
+
* Specifies whether to close the drop-down menu of a [Multi-Select Dropdown (Tag Box)](https://surveyjs.io/form-library/examples/how-to-create-multiselect-tag-box/) question after a user selects a value.
|
|
22926
22934
|
*
|
|
22927
|
-
* This setting applies to all
|
|
22935
|
+
* This setting applies to all Multi-Select Dropdown questions on a web page. You can use the [`closeOnSelect`](https://surveyjs.io/form-library/documentation/api-reference/dropdown-tag-box-model#closeOnSelect) property to specify the same setting for an individual Multi-Select Dropdown question.
|
|
22928
22936
|
*/
|
|
22929
22937
|
tagboxCloseOnSelect: false,
|
|
22938
|
+
/**
|
|
22939
|
+
* A time interval in milliseconds between the last entered character and the beginning of search in [Single-](https://surveyjs.io/form-library/examples/create-dropdown-menu-in-javascript/) and [Multi-Select Dropdown](https://surveyjs.io/form-library/examples/how-to-create-multiselect-tag-box/) questions. Applies only to questions with the [`choicesLazyLoadEnabled`](https://surveyjs.io/form-library/documentation/api-reference/dropdown-menu-model#choicesLazyLoadEnabled) property set to `true`.
|
|
22940
|
+
*
|
|
22941
|
+
* Default value: 500
|
|
22942
|
+
*
|
|
22943
|
+
* [View Demo](https://surveyjs.io/form-library/examples/lazy-loading-dropdown/ (linkStyle))
|
|
22944
|
+
*/
|
|
22930
22945
|
dropdownSearchDelay: 500,
|
|
22931
22946
|
/**
|
|
22932
22947
|
* A function that activates a browser confirm dialog.
|
|
@@ -24741,6 +24756,7 @@ var surveyLocalization = {
|
|
|
24741
24756
|
defaultLocaleValue: "en",
|
|
24742
24757
|
locales: {},
|
|
24743
24758
|
localeNames: {},
|
|
24759
|
+
localeDirections: {},
|
|
24744
24760
|
supportedLocales: [],
|
|
24745
24761
|
get currentLocale() {
|
|
24746
24762
|
return this.currentLocaleValue === this.defaultLocaleValue ? "" : this.currentLocaleValue;
|