survey-react-ui 2.0.8 → 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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v2.0.8
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,6 +543,7 @@ 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
  }
@@ -1924,7 +1925,7 @@ class PopupModal extends SurveyElementBase {
1924
1925
  PopupModal.modalDescriptors = [];
1925
1926
 
1926
1927
  /*!
1927
- * surveyjs - Survey JavaScript library v2.0.8
1928
+ * surveyjs - Survey JavaScript library v2.0.9
1928
1929
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
1929
1930
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
1930
1931
  */
@@ -1994,7 +1995,7 @@ var iconsV1 = {
1994
1995
  };
1995
1996
 
1996
1997
  /*!
1997
- * surveyjs - Survey JavaScript library v2.0.8
1998
+ * surveyjs - Survey JavaScript library v2.0.9
1998
1999
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
1999
2000
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
2000
2001
  */
@@ -2068,6 +2069,11 @@ class Scroll extends React.Component {
2068
2069
  super(props);
2069
2070
  this.rootRef = React.createRef();
2070
2071
  this.model = new ScrollViewModel();
2072
+ this.model.onInnerHeightChanged = (hasScroll) => {
2073
+ if (!!this.props.onInnerHeightChanged) {
2074
+ this.props.onInnerHeightChanged(hasScroll);
2075
+ }
2076
+ };
2071
2077
  }
2072
2078
  componentDidMount() {
2073
2079
  const container = this.rootRef.current;
@@ -4752,7 +4758,7 @@ class SurveyQuestionPanelDynamic extends SurveyQuestionElementBase {
4752
4758
  }
4753
4759
  renderRange() {
4754
4760
  return (React.createElement("div", { className: this.question.cssClasses.progress },
4755
- 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 })));
4756
4762
  }
4757
4763
  renderAddRowButton() {
4758
4764
  return ReactElementFactory.Instance.createElement("sv-paneldynamic-add-btn", {
@@ -4843,12 +4849,15 @@ class SurveyProgress extends SurveyNavigationBase {
4843
4849
  get progressText() {
4844
4850
  return this.survey.progressText;
4845
4851
  }
4852
+ get progressBarAriaLabel() {
4853
+ return this.survey.progressBarAriaLabel;
4854
+ }
4846
4855
  render() {
4847
4856
  var progressStyle = {
4848
4857
  width: this.progress + "%",
4849
4858
  };
4850
4859
  return (React.createElement("div", { className: this.survey.getProgressCssClasses(this.props.container) },
4851
- React.createElement("div", { style: progressStyle, className: this.css.progressBar, role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": "progress" },
4860
+ React.createElement("div", { style: progressStyle, className: this.css.progressBar, role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": this.progressBarAriaLabel },
4852
4861
  React.createElement("span", { className: SurveyProgressModel.getProgressTextInBarCss(this.css) }, this.progressText)),
4853
4862
  React.createElement("span", { className: SurveyProgressModel.getProgressTextUnderBarCss(this.css) }, this.progressText)));
4854
4863
  }
@@ -4889,7 +4898,7 @@ class SurveyProgressButtons extends SurveyNavigationBase {
4889
4898
  this.setState({ canShowFooter: !this.model.showItemTitles });
4890
4899
  }
4891
4900
  render() {
4892
- 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": "progress" },
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 },
4893
4902
  this.state.canShowHeader ? React.createElement("div", { className: this.css.progressButtonsHeader },
4894
4903
  React.createElement("div", { className: this.css.progressButtonsPageTitle, title: this.model.headerText }, this.model.headerText)) : null,
4895
4904
  React.createElement("div", { className: this.css.progressButtonsContainer },
@@ -4971,7 +4980,7 @@ class ListItem extends SurveyElementBase {
4971
4980
  const style = {
4972
4981
  display: isVisible ? null : "none"
4973
4982
  };
4974
- return attachKey2click(React.createElement("li", { className: className, role: "option", style: style, id: this.item.elementId, "aria-selected": this.model.isItemSelected(this.item), onClick: (event) => {
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) => {
4975
4984
  this.model.onItemClick(this.item);
4976
4985
  event.stopPropagation();
4977
4986
  }, onPointerDown: (event) => this.model.onPointerDown(event, this.item) },
@@ -5042,7 +5051,7 @@ class List extends SurveyElementBase {
5042
5051
  return null;
5043
5052
  const items = this.renderItems();
5044
5053
  const ulStyle = { display: this.model.isEmpty ? "none" : null };
5045
- return (React.createElement("ul", { className: this.model.getListClass(), style: ulStyle, role: "listbox", id: this.model.elementId, onMouseDown: (e) => {
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) => {
5046
5055
  e.preventDefault();
5047
5056
  }, onKeyDown: this.handleKeydown, onMouseMove: this.handleMouseMove }, items));
5048
5057
  }
@@ -5460,15 +5469,13 @@ class SurveyQuestionImage extends SurveyQuestionElementBase {
5460
5469
  }
5461
5470
  var control = null;
5462
5471
  if (this.question.renderedMode === "image") {
5463
- control = (React.createElement("img", { className: cssClasses, src: this.question.locImageLink.renderedHtml || null, alt: this.question.altText || this.question.title, width: this.question.renderedWidth, height: this.question.renderedHeight,
5464
- //alt={item.text || item.value}
5465
- 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(); } }));
5466
5473
  }
5467
5474
  if (this.question.renderedMode === "video") {
5468
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(); } }));
5469
5476
  }
5470
5477
  if (this.question.renderedMode === "youtube") {
5471
- 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 }));
5472
5479
  }
5473
5480
  var noImage = null;
5474
5481
  if (!this.question.imageLink || this.question.contentNotLoaded) {
@@ -5764,7 +5771,7 @@ class SurveyQuestionMatrixDetailButton extends ReactSurveyElement {
5764
5771
  var isExpanded = this.row.isDetailPanelShowing;
5765
5772
  var ariaExpanded = isExpanded;
5766
5773
  var ariaControls = isExpanded ? this.row.detailPanelId : undefined;
5767
- 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 },
5768
5775
  React.createElement(SvgIcon, { className: this.question.getDetailPanelIconCss(this.row), iconName: this.question.getDetailPanelIconId(this.row), size: "auto" })));
5769
5776
  }
5770
5777
  }
@@ -6078,7 +6085,7 @@ ReactElementFactory.Instance.registerElement(LocalizableString.editableRenderer,
6078
6085
  return React.createElement(SurveyLocStringEditor, props);
6079
6086
  });
6080
6087
 
6081
- checkLibraryVersion(`${"2.0.8"}`, "survey-react-ui");
6088
+ checkLibraryVersion(`${"2.0.9"}`, "survey-react-ui");
6082
6089
 
6083
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 };
6084
6091
  //# sourceMappingURL=survey-react-ui.mjs.map