survey-react-ui 2.0.7 → 2.0.9
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/fesm/survey-react-ui.mjs +24 -16
- package/fesm/survey-react-ui.mjs.map +1 -1
- package/package.json +2 -2
- package/survey-react-ui.js +28 -16
- package/survey-react-ui.js.map +1 -1
- package/survey-react-ui.min.js +1 -1
- package/survey-react-ui.min.js.LICENSE.txt +1 -1
- package/typings/src/components/scroll.d.ts +1 -0
- package/typings/src/progress.d.ts +1 -0
- package/typings/src/row.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-react-ui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
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",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"survey-core": "2.0.
|
|
28
|
+
"survey-core": "2.0.9",
|
|
29
29
|
"react": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0",
|
|
30
30
|
"react-dom": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0"
|
|
31
31
|
}
|
package/survey-react-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v2.0.
|
|
2
|
+
* surveyjs - Survey JavaScript library v2.0.9
|
|
3
3
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
@@ -28,7 +28,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28
28
|
/* harmony export */ icons: () => (/* binding */ iconsV1)
|
|
29
29
|
/* harmony export */ });
|
|
30
30
|
/*!
|
|
31
|
-
* surveyjs - Survey JavaScript library v2.0.
|
|
31
|
+
* surveyjs - Survey JavaScript library v2.0.9
|
|
32
32
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
33
33
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
34
34
|
*/
|
|
@@ -114,7 +114,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
114
114
|
/* harmony export */ icons: () => (/* binding */ iconsV2)
|
|
115
115
|
/* harmony export */ });
|
|
116
116
|
/*!
|
|
117
|
-
* surveyjs - Survey JavaScript library v2.0.
|
|
117
|
+
* surveyjs - Survey JavaScript library v2.0.9
|
|
118
118
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
119
119
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
120
120
|
*/
|
|
@@ -2087,7 +2087,7 @@ var ListItem = /** @class */ (function (_super) {
|
|
|
2087
2087
|
var style = {
|
|
2088
2088
|
display: isVisible ? null : "none"
|
|
2089
2089
|
};
|
|
2090
|
-
return (0,_reactSurvey__WEBPACK_IMPORTED_MODULE_3__.attachKey2click)(react__WEBPACK_IMPORTED_MODULE_0__.createElement("li", { className: className, role:
|
|
2090
|
+
return (0,_reactSurvey__WEBPACK_IMPORTED_MODULE_3__.attachKey2click)(react__WEBPACK_IMPORTED_MODULE_0__.createElement("li", { className: className, role: this.model.listItemRole, style: style, id: this.item.elementId, "aria-selected": this.model.getA11yItemAriaSelected(this.item), "aria-checked": this.model.getA11yItemAriaChecked(this.item), onClick: function (event) {
|
|
2091
2091
|
_this.model.onItemClick(_this.item);
|
|
2092
2092
|
event.stopPropagation();
|
|
2093
2093
|
}, onPointerDown: function (event) { return _this.model.onPointerDown(event, _this.item); } },
|
|
@@ -2208,7 +2208,7 @@ var List = /** @class */ (function (_super) {
|
|
|
2208
2208
|
return null;
|
|
2209
2209
|
var items = this.renderItems();
|
|
2210
2210
|
var ulStyle = { display: this.model.isEmpty ? "none" : null };
|
|
2211
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("ul", { className: this.model.getListClass(), style: ulStyle, role: "
|
|
2211
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("ul", { className: this.model.getListClass(), style: ulStyle, role: this.model.listRole, "aria-label": this.model.a11yInputAriaLabel, id: this.model.elementId, onMouseDown: function (e) {
|
|
2212
2212
|
e.preventDefault();
|
|
2213
2213
|
}, onKeyDown: this.handleKeydown, onMouseMove: this.handleMouseMove }, items));
|
|
2214
2214
|
};
|
|
@@ -2382,7 +2382,7 @@ var SurveyQuestionMatrixDetailButton = /** @class */ (function (_super) {
|
|
|
2382
2382
|
var isExpanded = this.row.isDetailPanelShowing;
|
|
2383
2383
|
var ariaExpanded = isExpanded;
|
|
2384
2384
|
var ariaControls = isExpanded ? this.row.detailPanelId : undefined;
|
|
2385
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", { type: "button", onClick: this.handleOnShowHideClick, className: this.question.getDetailPanelButtonCss(this.row), "aria-expanded": ariaExpanded, "aria-controls": ariaControls },
|
|
2385
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", { type: "button", title: this.props.item.title, onClick: this.handleOnShowHideClick, className: this.question.getDetailPanelButtonCss(this.row), "aria-expanded": ariaExpanded, "aria-controls": ariaControls },
|
|
2386
2386
|
react__WEBPACK_IMPORTED_MODULE_0__.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__.SvgIcon, { className: this.question.getDetailPanelIconCss(this.row), iconName: this.question.getDetailPanelIconId(this.row), size: "auto" })));
|
|
2387
2387
|
};
|
|
2388
2388
|
return SurveyQuestionMatrixDetailButton;
|
|
@@ -3694,6 +3694,11 @@ var Scroll = /** @class */ (function (_super) {
|
|
|
3694
3694
|
var _this = _super.call(this, props) || this;
|
|
3695
3695
|
_this.rootRef = react__WEBPACK_IMPORTED_MODULE_0__.createRef();
|
|
3696
3696
|
_this.model = new survey_core__WEBPACK_IMPORTED_MODULE_2__.ScrollViewModel();
|
|
3697
|
+
_this.model.onInnerHeightChanged = function (hasScroll) {
|
|
3698
|
+
if (!!_this.props.onInnerHeightChanged) {
|
|
3699
|
+
_this.props.onInnerHeightChanged(hasScroll);
|
|
3700
|
+
}
|
|
3701
|
+
};
|
|
3697
3702
|
return _this;
|
|
3698
3703
|
}
|
|
3699
3704
|
Scroll.prototype.componentDidMount = function () {
|
|
@@ -5312,15 +5317,13 @@ var SurveyQuestionImage = /** @class */ (function (_super) {
|
|
|
5312
5317
|
}
|
|
5313
5318
|
var control = null;
|
|
5314
5319
|
if (this.question.renderedMode === "image") {
|
|
5315
|
-
control = (react__WEBPACK_IMPORTED_MODULE_0__.createElement("img", { className: cssClasses, src: this.question.locImageLink.renderedHtml || null, alt: this.question.
|
|
5316
|
-
//alt={item.text || item.value}
|
|
5317
|
-
style: style, onLoad: function (event) { _this.question.onLoadHandler(); }, onError: function (event) { _this.question.onErrorHandler(); } }));
|
|
5320
|
+
control = (react__WEBPACK_IMPORTED_MODULE_0__.createElement("img", { className: cssClasses, src: this.question.locImageLink.renderedHtml || null, alt: this.question.renderedAltText, width: this.question.renderedWidth, height: this.question.renderedHeight, style: style, onLoad: function (event) { _this.question.onLoadHandler(); }, onError: function (event) { _this.question.onErrorHandler(); } }));
|
|
5318
5321
|
}
|
|
5319
5322
|
if (this.question.renderedMode === "video") {
|
|
5320
5323
|
control = (react__WEBPACK_IMPORTED_MODULE_0__.createElement("video", { controls: true, className: cssClasses, src: this.question.locImageLink.renderedHtml, width: this.question.renderedWidth, height: this.question.renderedHeight, style: style, onLoadedMetadata: function (event) { _this.question.onLoadHandler(); }, onError: function (event) { _this.question.onErrorHandler(); } }));
|
|
5321
5324
|
}
|
|
5322
5325
|
if (this.question.renderedMode === "youtube") {
|
|
5323
|
-
control = (react__WEBPACK_IMPORTED_MODULE_0__.createElement("iframe", { className: cssClasses, src: this.question.locImageLink.renderedHtml, width: this.question.renderedWidth, height: this.question.renderedHeight, style: style }));
|
|
5326
|
+
control = (react__WEBPACK_IMPORTED_MODULE_0__.createElement("iframe", { className: cssClasses, src: this.question.locImageLink.renderedHtml, width: this.question.renderedWidth, height: this.question.renderedHeight, style: style, title: this.question.renderedAltText }));
|
|
5324
5327
|
}
|
|
5325
5328
|
var noImage = null;
|
|
5326
5329
|
if (!this.question.imageLink || this.question.contentNotLoaded) {
|
|
@@ -5955,12 +5958,19 @@ var SurveyProgress = /** @class */ (function (_super) {
|
|
|
5955
5958
|
enumerable: false,
|
|
5956
5959
|
configurable: true
|
|
5957
5960
|
});
|
|
5961
|
+
Object.defineProperty(SurveyProgress.prototype, "progressBarAriaLabel", {
|
|
5962
|
+
get: function () {
|
|
5963
|
+
return this.survey.progressBarAriaLabel;
|
|
5964
|
+
},
|
|
5965
|
+
enumerable: false,
|
|
5966
|
+
configurable: true
|
|
5967
|
+
});
|
|
5958
5968
|
SurveyProgress.prototype.render = function () {
|
|
5959
5969
|
var progressStyle = {
|
|
5960
5970
|
width: this.progress + "%",
|
|
5961
5971
|
};
|
|
5962
5972
|
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.survey.getProgressCssClasses(this.props.container) },
|
|
5963
|
-
react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { style: progressStyle, className: this.css.progressBar, role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-label":
|
|
5973
|
+
react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { style: progressStyle, className: this.css.progressBar, role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": this.progressBarAriaLabel },
|
|
5964
5974
|
react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: survey_core__WEBPACK_IMPORTED_MODULE_1__.SurveyProgressModel.getProgressTextInBarCss(this.css) }, this.progressText)),
|
|
5965
5975
|
react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: survey_core__WEBPACK_IMPORTED_MODULE_1__.SurveyProgressModel.getProgressTextUnderBarCss(this.css) }, this.progressText)));
|
|
5966
5976
|
};
|
|
@@ -6054,7 +6064,7 @@ var SurveyProgressButtons = /** @class */ (function (_super) {
|
|
|
6054
6064
|
};
|
|
6055
6065
|
SurveyProgressButtons.prototype.render = function () {
|
|
6056
6066
|
var _this = this;
|
|
6057
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.model.getRootCss(this.props.container), style: { "maxWidth": this.model.progressWidth }, role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-label":
|
|
6067
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.model.getRootCss(this.props.container), style: { "maxWidth": this.model.progressWidth }, role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": this.model.progressBarAriaLabel },
|
|
6058
6068
|
this.state.canShowHeader ? react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.css.progressButtonsHeader },
|
|
6059
6069
|
react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.css.progressButtonsPageTitle, title: this.model.headerText }, this.model.headerText)) : null,
|
|
6060
6070
|
react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.css.progressButtonsContainer },
|
|
@@ -9823,7 +9833,7 @@ var SurveyQuestionPanelDynamic = /** @class */ (function (_super) {
|
|
|
9823
9833
|
};
|
|
9824
9834
|
SurveyQuestionPanelDynamic.prototype.renderRange = function () {
|
|
9825
9835
|
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.cssClasses.progress },
|
|
9826
|
-
react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.cssClasses.progressBar, style: { width: this.question.progress }, role: "progressbar" })));
|
|
9836
|
+
react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.cssClasses.progressBar, style: { width: this.question.progress }, role: "progressbar", "aria-label": this.question.progressBarAriaLabel })));
|
|
9827
9837
|
};
|
|
9828
9838
|
SurveyQuestionPanelDynamic.prototype.renderAddRowButton = function () {
|
|
9829
9839
|
return _element_factory__WEBPACK_IMPORTED_MODULE_5__.ReactElementFactory.Instance.createElement("sv-paneldynamic-add-btn", {
|
|
@@ -11065,7 +11075,7 @@ var SurveyRow = /** @class */ (function (_super) {
|
|
|
11065
11075
|
}
|
|
11066
11076
|
if (!!el && !this.row.isNeedRender) {
|
|
11067
11077
|
var rowContainerDiv = el;
|
|
11068
|
-
setTimeout(function () {
|
|
11078
|
+
this.lazyRenderingTimeout = setTimeout(function () {
|
|
11069
11079
|
_this.row.startLazyRendering(rowContainerDiv);
|
|
11070
11080
|
}, 10);
|
|
11071
11081
|
}
|
|
@@ -11083,12 +11093,14 @@ var SurveyRow = /** @class */ (function (_super) {
|
|
|
11083
11093
|
return true;
|
|
11084
11094
|
};
|
|
11085
11095
|
SurveyRow.prototype.stopLazyRendering = function () {
|
|
11096
|
+
clearTimeout(this.lazyRenderingTimeout);
|
|
11086
11097
|
this.row.stopLazyRendering();
|
|
11087
11098
|
this.row.isNeedRender = !this.row.isLazyRendering();
|
|
11088
11099
|
};
|
|
11089
11100
|
SurveyRow.prototype.componentWillUnmount = function () {
|
|
11101
|
+
var isCurrentStateElement = this.isCurrentStateElement(this.getStateElement());
|
|
11090
11102
|
_super.prototype.componentWillUnmount.call(this);
|
|
11091
|
-
if (
|
|
11103
|
+
if (isCurrentStateElement) {
|
|
11092
11104
|
this.row.setRootElement(undefined);
|
|
11093
11105
|
this.stopLazyRendering();
|
|
11094
11106
|
}
|
|
@@ -11874,7 +11886,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11874
11886
|
|
|
11875
11887
|
|
|
11876
11888
|
|
|
11877
|
-
(0,survey_core__WEBPACK_IMPORTED_MODULE_0__.checkLibraryVersion)("".concat("2.0.
|
|
11889
|
+
(0,survey_core__WEBPACK_IMPORTED_MODULE_0__.checkLibraryVersion)("".concat("2.0.9"), "survey-react-ui");
|
|
11878
11890
|
|
|
11879
11891
|
})();
|
|
11880
11892
|
|