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/fesm/survey-react-ui.mjs
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
|
*/
|
|
@@ -525,7 +525,7 @@ class SurveyRow extends SurveyElementBase {
|
|
|
525
525
|
}
|
|
526
526
|
if (!!el && !this.row.isNeedRender) {
|
|
527
527
|
var rowContainerDiv = el;
|
|
528
|
-
setTimeout(() => {
|
|
528
|
+
this.lazyRenderingTimeout = setTimeout(() => {
|
|
529
529
|
this.row.startLazyRendering(rowContainerDiv);
|
|
530
530
|
}, 10);
|
|
531
531
|
}
|
|
@@ -543,12 +543,14 @@ class SurveyRow extends SurveyElementBase {
|
|
|
543
543
|
return true;
|
|
544
544
|
}
|
|
545
545
|
stopLazyRendering() {
|
|
546
|
+
clearTimeout(this.lazyRenderingTimeout);
|
|
546
547
|
this.row.stopLazyRendering();
|
|
547
548
|
this.row.isNeedRender = !this.row.isLazyRendering();
|
|
548
549
|
}
|
|
549
550
|
componentWillUnmount() {
|
|
551
|
+
const isCurrentStateElement = this.isCurrentStateElement(this.getStateElement());
|
|
550
552
|
super.componentWillUnmount();
|
|
551
|
-
if (
|
|
553
|
+
if (isCurrentStateElement) {
|
|
552
554
|
this.row.setRootElement(undefined);
|
|
553
555
|
this.stopLazyRendering();
|
|
554
556
|
}
|
|
@@ -1923,7 +1925,7 @@ class PopupModal extends SurveyElementBase {
|
|
|
1923
1925
|
PopupModal.modalDescriptors = [];
|
|
1924
1926
|
|
|
1925
1927
|
/*!
|
|
1926
|
-
* surveyjs - Survey JavaScript library v2.0.
|
|
1928
|
+
* surveyjs - Survey JavaScript library v2.0.9
|
|
1927
1929
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
1928
1930
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
1929
1931
|
*/
|
|
@@ -1993,7 +1995,7 @@ var iconsV1 = {
|
|
|
1993
1995
|
};
|
|
1994
1996
|
|
|
1995
1997
|
/*!
|
|
1996
|
-
* surveyjs - Survey JavaScript library v2.0.
|
|
1998
|
+
* surveyjs - Survey JavaScript library v2.0.9
|
|
1997
1999
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
1998
2000
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
1999
2001
|
*/
|
|
@@ -2067,6 +2069,11 @@ class Scroll extends React.Component {
|
|
|
2067
2069
|
super(props);
|
|
2068
2070
|
this.rootRef = React.createRef();
|
|
2069
2071
|
this.model = new ScrollViewModel();
|
|
2072
|
+
this.model.onInnerHeightChanged = (hasScroll) => {
|
|
2073
|
+
if (!!this.props.onInnerHeightChanged) {
|
|
2074
|
+
this.props.onInnerHeightChanged(hasScroll);
|
|
2075
|
+
}
|
|
2076
|
+
};
|
|
2070
2077
|
}
|
|
2071
2078
|
componentDidMount() {
|
|
2072
2079
|
const container = this.rootRef.current;
|
|
@@ -4751,7 +4758,7 @@ class SurveyQuestionPanelDynamic extends SurveyQuestionElementBase {
|
|
|
4751
4758
|
}
|
|
4752
4759
|
renderRange() {
|
|
4753
4760
|
return (React.createElement("div", { className: this.question.cssClasses.progress },
|
|
4754
|
-
React.createElement("div", { className: this.question.cssClasses.progressBar, style: { width: this.question.progress }, role: "progressbar" })));
|
|
4761
|
+
React.createElement("div", { className: this.question.cssClasses.progressBar, style: { width: this.question.progress }, role: "progressbar", "aria-label": this.question.progressBarAriaLabel })));
|
|
4755
4762
|
}
|
|
4756
4763
|
renderAddRowButton() {
|
|
4757
4764
|
return ReactElementFactory.Instance.createElement("sv-paneldynamic-add-btn", {
|
|
@@ -4842,12 +4849,15 @@ class SurveyProgress extends SurveyNavigationBase {
|
|
|
4842
4849
|
get progressText() {
|
|
4843
4850
|
return this.survey.progressText;
|
|
4844
4851
|
}
|
|
4852
|
+
get progressBarAriaLabel() {
|
|
4853
|
+
return this.survey.progressBarAriaLabel;
|
|
4854
|
+
}
|
|
4845
4855
|
render() {
|
|
4846
4856
|
var progressStyle = {
|
|
4847
4857
|
width: this.progress + "%",
|
|
4848
4858
|
};
|
|
4849
4859
|
return (React.createElement("div", { className: this.survey.getProgressCssClasses(this.props.container) },
|
|
4850
|
-
React.createElement("div", { style: progressStyle, className: this.css.progressBar, role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-label":
|
|
4860
|
+
React.createElement("div", { style: progressStyle, className: this.css.progressBar, role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": this.progressBarAriaLabel },
|
|
4851
4861
|
React.createElement("span", { className: SurveyProgressModel.getProgressTextInBarCss(this.css) }, this.progressText)),
|
|
4852
4862
|
React.createElement("span", { className: SurveyProgressModel.getProgressTextUnderBarCss(this.css) }, this.progressText)));
|
|
4853
4863
|
}
|
|
@@ -4888,7 +4898,7 @@ class SurveyProgressButtons extends SurveyNavigationBase {
|
|
|
4888
4898
|
this.setState({ canShowFooter: !this.model.showItemTitles });
|
|
4889
4899
|
}
|
|
4890
4900
|
render() {
|
|
4891
|
-
return (React.createElement("div", { className: this.model.getRootCss(this.props.container), style: { "maxWidth": this.model.progressWidth }, role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-label":
|
|
4901
|
+
return (React.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 },
|
|
4892
4902
|
this.state.canShowHeader ? React.createElement("div", { className: this.css.progressButtonsHeader },
|
|
4893
4903
|
React.createElement("div", { className: this.css.progressButtonsPageTitle, title: this.model.headerText }, this.model.headerText)) : null,
|
|
4894
4904
|
React.createElement("div", { className: this.css.progressButtonsContainer },
|
|
@@ -4970,7 +4980,7 @@ class ListItem extends SurveyElementBase {
|
|
|
4970
4980
|
const style = {
|
|
4971
4981
|
display: isVisible ? null : "none"
|
|
4972
4982
|
};
|
|
4973
|
-
return attachKey2click(React.createElement("li", { className: className, role:
|
|
4983
|
+
return attachKey2click(React.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: (event) => {
|
|
4974
4984
|
this.model.onItemClick(this.item);
|
|
4975
4985
|
event.stopPropagation();
|
|
4976
4986
|
}, onPointerDown: (event) => this.model.onPointerDown(event, this.item) },
|
|
@@ -5041,7 +5051,7 @@ class List extends SurveyElementBase {
|
|
|
5041
5051
|
return null;
|
|
5042
5052
|
const items = this.renderItems();
|
|
5043
5053
|
const ulStyle = { display: this.model.isEmpty ? "none" : null };
|
|
5044
|
-
return (React.createElement("ul", { className: this.model.getListClass(), style: ulStyle, role: "
|
|
5054
|
+
return (React.createElement("ul", { className: this.model.getListClass(), style: ulStyle, role: this.model.listRole, "aria-label": this.model.a11yInputAriaLabel, id: this.model.elementId, onMouseDown: (e) => {
|
|
5045
5055
|
e.preventDefault();
|
|
5046
5056
|
}, onKeyDown: this.handleKeydown, onMouseMove: this.handleMouseMove }, items));
|
|
5047
5057
|
}
|
|
@@ -5459,15 +5469,13 @@ class SurveyQuestionImage extends SurveyQuestionElementBase {
|
|
|
5459
5469
|
}
|
|
5460
5470
|
var control = null;
|
|
5461
5471
|
if (this.question.renderedMode === "image") {
|
|
5462
|
-
control = (React.createElement("img", { className: cssClasses, src: this.question.locImageLink.renderedHtml || null, alt: this.question.
|
|
5463
|
-
//alt={item.text || item.value}
|
|
5464
|
-
style: style, onLoad: (event) => { this.question.onLoadHandler(); }, onError: (event) => { this.question.onErrorHandler(); } }));
|
|
5472
|
+
control = (React.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: (event) => { this.question.onLoadHandler(); }, onError: (event) => { this.question.onErrorHandler(); } }));
|
|
5465
5473
|
}
|
|
5466
5474
|
if (this.question.renderedMode === "video") {
|
|
5467
5475
|
control = (React.createElement("video", { controls: true, className: cssClasses, src: this.question.locImageLink.renderedHtml, width: this.question.renderedWidth, height: this.question.renderedHeight, style: style, onLoadedMetadata: (event) => { this.question.onLoadHandler(); }, onError: (event) => { this.question.onErrorHandler(); } }));
|
|
5468
5476
|
}
|
|
5469
5477
|
if (this.question.renderedMode === "youtube") {
|
|
5470
|
-
control = (React.createElement("iframe", { className: cssClasses, src: this.question.locImageLink.renderedHtml, width: this.question.renderedWidth, height: this.question.renderedHeight, style: style }));
|
|
5478
|
+
control = (React.createElement("iframe", { className: cssClasses, src: this.question.locImageLink.renderedHtml, width: this.question.renderedWidth, height: this.question.renderedHeight, style: style, title: this.question.renderedAltText }));
|
|
5471
5479
|
}
|
|
5472
5480
|
var noImage = null;
|
|
5473
5481
|
if (!this.question.imageLink || this.question.contentNotLoaded) {
|
|
@@ -5763,7 +5771,7 @@ class SurveyQuestionMatrixDetailButton extends ReactSurveyElement {
|
|
|
5763
5771
|
var isExpanded = this.row.isDetailPanelShowing;
|
|
5764
5772
|
var ariaExpanded = isExpanded;
|
|
5765
5773
|
var ariaControls = isExpanded ? this.row.detailPanelId : undefined;
|
|
5766
|
-
return (React.createElement("button", { type: "button", onClick: this.handleOnShowHideClick, className: this.question.getDetailPanelButtonCss(this.row), "aria-expanded": ariaExpanded, "aria-controls": ariaControls },
|
|
5774
|
+
return (React.createElement("button", { type: "button", title: this.props.item.title, onClick: this.handleOnShowHideClick, className: this.question.getDetailPanelButtonCss(this.row), "aria-expanded": ariaExpanded, "aria-controls": ariaControls },
|
|
5767
5775
|
React.createElement(SvgIcon, { className: this.question.getDetailPanelIconCss(this.row), iconName: this.question.getDetailPanelIconId(this.row), size: "auto" })));
|
|
5768
5776
|
}
|
|
5769
5777
|
}
|
|
@@ -6077,7 +6085,7 @@ ReactElementFactory.Instance.registerElement(LocalizableString.editableRenderer,
|
|
|
6077
6085
|
return React.createElement(SurveyLocStringEditor, props);
|
|
6078
6086
|
});
|
|
6079
6087
|
|
|
6080
|
-
checkLibraryVersion(`${"2.0.
|
|
6088
|
+
checkLibraryVersion(`${"2.0.9"}`, "survey-react-ui");
|
|
6081
6089
|
|
|
6082
6090
|
export { CharacterCounterComponent, ComponentsContainer, Header, HeaderCell, HeaderMobile, List, ListItemContent, ListItemGroup, LoadingIndicatorComponent, LogoImage, MatrixRow, NotifierComponent, Popup, PopupModal, PopupSurvey, QuestionErrorComponent, RatingDropdownItem, RatingItem, RatingItemSmiley, RatingItemStar, ReactElementFactory, ReactQuestionFactory, ReactSurveyElement, ReactSurveyElementsWrapper, Scroll, Skeleton, Survey, SurveyActionBar, SurveyElementBase, SurveyElementErrors, SurveyFileChooseButton, SurveyFilePreview, SurveyFlowPanel, SurveyHeader, SurveyLocStringEditor, SurveyLocStringViewer, SurveyNavigationBase, SurveyNavigationButton, SurveyPage, SurveyPanel, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestion, SurveyQuestionAndErrorsCell, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionButtonGroup, SurveyQuestionButtonGroupDropdown, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionComment, SurveyQuestionCommentItem, SurveyQuestionComposite, SurveyQuestionCustom, SurveyQuestionDropdown, SurveyQuestionDropdownBase, SurveyQuestionDropdownSelect, SurveyQuestionElementBase, SurveyQuestionEmpty, SurveyQuestionExpression, SurveyQuestionFile, SurveyQuestionHtml, SurveyQuestionImage, SurveyQuestionImagePicker, SurveyQuestionMatrix, SurveyQuestionMatrixCell, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixRow, SurveyQuestionMultipleText, SurveyQuestionOptionItem, SurveyQuestionPanelDynamic, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicProgressText, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionRadioItem, SurveyQuestionRadiogroup, SurveyQuestionRanking, SurveyQuestionRankingItem, SurveyQuestionRankingItemContent, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionSignaturePad, SurveyQuestionTagbox, SurveyQuestionTagboxItem, SurveyQuestionText, SurveyRow, SurveyTimerPanel, SurveyWindow, SvgBundleComponent, SvgIcon, TagboxFilterString, TitleActions, TitleElement, attachKey2click };
|
|
6083
6091
|
//# sourceMappingURL=survey-react-ui.mjs.map
|