survey-react-ui 1.12.29 → 1.12.31

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,10 +1,10 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v2.0.1
2
+ * surveyjs - Survey JavaScript library v2.0.3
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
  */
6
6
 
7
- import { SurveyModel, Helpers, createSvg, createPopupViewModel, CssClassBuilder, ActionDropdownViewModel, RendererFactory, doKey2ClickUp, Question, SvgRegistry, settings, createPopupModalViewModel, doKey2ClickBlur, doKey2ClickDown, addIconsToThemeSet, SurveyProgressModel, ProgressButtonsResponsivityManager, PopupSurveyModel, ButtonGroupItemModel, LocalizableString, checkLibraryVersion } from 'survey-core';
7
+ import { SurveyModel, Helpers, createSvg, createPopupViewModel, CssClassBuilder, ActionDropdownViewModel, RendererFactory, doKey2ClickUp, Question, SvgRegistry, settings, createPopupModalViewModel, ScrollViewModel, doKey2ClickBlur, doKey2ClickDown, addIconsToThemeSet, SurveyProgressModel, ProgressButtonsResponsivityManager, PopupSurveyModel, ButtonGroupItemModel, LocalizableString, checkLibraryVersion } from 'survey-core';
8
8
  export { SurveyModel as Model, SurveyModel, SurveyWindowModel, settings, surveyLocalization, surveyStrings } from 'survey-core';
9
9
  import * as React from 'react';
10
10
  import * as ReactDOM from 'react-dom';
@@ -664,7 +664,7 @@ class SvgIcon extends React.Component {
664
664
  className += " " + this.props.className;
665
665
  }
666
666
  return (this.props.iconName ?
667
- React.createElement("svg", { className: className, style: this.props.style, onClick: this.props.onClick, ref: this.svgIconRef, role: "img" },
667
+ React.createElement("svg", { className: className, style: this.props.style, onClick: this.props.onClick, ref: this.svgIconRef, role: "presentation" },
668
668
  React.createElement("use", null))
669
669
  : null);
670
670
  }
@@ -1842,7 +1842,7 @@ class PopupModal extends SurveyElementBase {
1842
1842
  PopupModal.modalDescriptors = [];
1843
1843
 
1844
1844
  /*!
1845
- * surveyjs - Survey JavaScript library v2.0.1
1845
+ * surveyjs - Survey JavaScript library v2.0.3
1846
1846
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
1847
1847
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
1848
1848
  */
@@ -1910,7 +1910,7 @@ var iconsV1 = {
1910
1910
  };
1911
1911
 
1912
1912
  /*!
1913
- * surveyjs - Survey JavaScript library v2.0.1
1913
+ * surveyjs - Survey JavaScript library v2.0.3
1914
1914
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
1915
1915
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
1916
1916
  */
@@ -1977,6 +1977,36 @@ var iconsV2 = {
1977
1977
  "smiley-rate9-24x24": "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12.01 24C6.85767 24 1.15509 20.96 0.0145752 14.16C-0.0354475 13.87 0.0445888 13.57 0.234675 13.35C0.424761 13.13 0.704888 13 0.995019 13H23.005C23.2951 13 23.5752 13.13 23.7653 13.35C23.9554 13.57 24.0354 13.87 23.9854 14.16C22.8549 20.95 17.1423 24 11.99 24H12.01ZM2.25559 15C3.61621 19.82 8.0182 22 12.01 22C16.0018 22 20.4038 19.82 21.7644 15H2.25559ZM8.00819 6V2C8.00819 1.45 7.55799 1 7.00774 1C6.45749 1 6.00729 1.45 6.00729 2V6C6.00729 6.55 6.45749 7 7.00774 7C7.55799 7 8.00819 6.55 8.00819 6ZM18.0127 6V2C18.0127 1.45 17.5625 1 17.0123 1C16.462 1 16.0118 1.45 16.0118 2V6C16.0118 6.55 16.462 7 17.0123 7C17.5625 7 18.0127 6.55 18.0127 6Z\"></path></svg>"
1978
1978
  };
1979
1979
 
1980
+ class Scroll extends React.Component {
1981
+ constructor(props) {
1982
+ super(props);
1983
+ this.rootRef = React.createRef();
1984
+ this.model = new ScrollViewModel();
1985
+ }
1986
+ componentDidMount() {
1987
+ const container = this.rootRef.current;
1988
+ if (!container)
1989
+ return;
1990
+ this.model.setRootElement(container);
1991
+ }
1992
+ componentWillUnmount() {
1993
+ this.model.unsubscribeRootElement();
1994
+ this.model.setRootElement(undefined);
1995
+ }
1996
+ render() {
1997
+ return this.props.disabled ?
1998
+ React.createElement(React.Fragment, null, this.props.children) :
1999
+ React.createElement("div", { ref: this.rootRef, className: "sv-scroll__wrapper" },
2000
+ React.createElement("div", { className: "sv-scroll__scroller sv-drag-target-skipped", onScroll: () => this.model.onScrollContainer() },
2001
+ React.createElement("div", { className: "sv-scroll__container" }, this.props.children)),
2002
+ React.createElement("div", { className: "sv-scroll__scrollbar", onScroll: () => this.model.onScrollScrollbar() },
2003
+ React.createElement("div", { className: "sv-scroll__scrollbar-sizer" })));
2004
+ }
2005
+ }
2006
+ ReactElementFactory.Instance.registerElement("svc-scroll", (props) => {
2007
+ return React.createElement(Scroll, props);
2008
+ });
2009
+
1980
2010
  addIconsToThemeSet("v1", iconsV1);
1981
2011
  addIconsToThemeSet("v2", iconsV2);
1982
2012
  SvgRegistry.registerIcons(iconsV2);
@@ -2067,18 +2097,20 @@ class Survey extends SurveyElementBase {
2067
2097
  const rootCss = this.survey.getRootCss();
2068
2098
  const cssClasses = this.rootNodeClassName ? this.rootNodeClassName + " " + rootCss : rootCss;
2069
2099
  return (React.createElement("div", { id: this.rootNodeId, ref: this.rootRef, className: cssClasses, style: this.survey.themeVariables, lang: this.survey.locale || "en", dir: this.survey.localeDir },
2070
- this.survey.needRenderIcons ? React.createElement(SvgBundleComponent, null) : null,
2071
- React.createElement(PopupModal, null),
2072
- React.createElement("div", { className: this.survey.wrapperFormCss },
2073
- backgroundImage,
2074
- React.createElement("form", { onSubmit: onSubmit },
2075
- customHeader,
2076
- React.createElement("div", { className: this.css.container },
2077
- header,
2078
- React.createElement(ComponentsContainer, { survey: this.survey, container: "header", needRenderWrapper: false }),
2079
- renderResult,
2080
- React.createElement(ComponentsContainer, { survey: this.survey, container: "footer", needRenderWrapper: false }))),
2081
- React.createElement(NotifierComponent, { notifier: this.survey.notifier }))));
2100
+ React.createElement(Scroll, { disabled: this.survey.rootScrollDisabled },
2101
+ this.survey.needRenderIcons ? React.createElement(SvgBundleComponent, null) : null,
2102
+ React.createElement(PopupModal, null),
2103
+ React.createElement("div", { className: this.survey.wrapperFormCss },
2104
+ backgroundImage,
2105
+ React.createElement("form", { onSubmit: onSubmit },
2106
+ React.createElement(Scroll, { disabled: this.survey.formScrollDisabled },
2107
+ customHeader,
2108
+ React.createElement("div", { className: this.css.container },
2109
+ header,
2110
+ React.createElement(ComponentsContainer, { survey: this.survey, container: "header", needRenderWrapper: false }),
2111
+ renderResult,
2112
+ React.createElement(ComponentsContainer, { survey: this.survey, container: "footer", needRenderWrapper: false })))),
2113
+ React.createElement(NotifierComponent, { notifier: this.survey.notifier })))));
2082
2114
  }
2083
2115
  renderElement() {
2084
2116
  return this.doRender();
@@ -5074,6 +5106,11 @@ ReactElementFactory.Instance.registerElement("sv-list", (props) => {
5074
5106
  });
5075
5107
 
5076
5108
  class SurveyProgressToc extends SurveyNavigationBase {
5109
+ componentDidMount() {
5110
+ super.componentDidMount();
5111
+ const tocModel = this.props.model;
5112
+ tocModel.updateStickyTOCSize(this.survey.rootElement);
5113
+ }
5077
5114
  render() {
5078
5115
  const tocModel = this.props.model;
5079
5116
  let content;
@@ -5543,7 +5580,7 @@ class SurveyButtonGroupItem extends SurveyElementBase {
5543
5580
  const icon = this.renderIcon();
5544
5581
  const input = this.renderInput();
5545
5582
  const caption = this.renderCaption();
5546
- return (React.createElement("label", { role: "radio", className: this.model.css.label, title: this.model.caption.renderedHtml },
5583
+ return (React.createElement("label", { className: this.model.css.label, title: this.model.caption.renderedHtml },
5547
5584
  input,
5548
5585
  React.createElement("div", { className: this.model.css.decorator },
5549
5586
  icon,
@@ -5558,7 +5595,7 @@ class SurveyButtonGroupItem extends SurveyElementBase {
5558
5595
  renderInput() {
5559
5596
  return (React.createElement("input", { className: this.model.css.control, id: this.model.id, type: "radio", name: this.model.name, checked: this.model.selected, value: this.model.value, disabled: this.model.readOnly, onChange: () => {
5560
5597
  this.model.onChange();
5561
- }, "aria-required": this.model.isRequired, "aria-label": this.model.caption.renderedHtml, "aria-invalid": this.model.hasErrors, "aria-errormessage": this.model.describedBy, role: "radio" }));
5598
+ }, "aria-required": this.model.isRequired, "aria-label": this.model.caption.renderedHtml, "aria-invalid": this.model.hasErrors, "aria-errormessage": this.model.describedBy }));
5562
5599
  }
5563
5600
  renderCaption() {
5564
5601
  if (!this.model.showCaption)
@@ -5966,7 +6003,7 @@ ReactElementFactory.Instance.registerElement(LocalizableString.editableRenderer,
5966
6003
  return React.createElement(SurveyLocStringEditor, props);
5967
6004
  });
5968
6005
 
5969
- checkLibraryVersion(`${"2.0.1"}`, "survey-react-ui");
6006
+ checkLibraryVersion(`${"2.0.3"}`, "survey-react-ui");
5970
6007
 
5971
- 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, Skeleton, Survey, SurveyActionBar, SurveyElementBase, SurveyElementErrors, SurveyFileChooseButton, SurveyFilePreview, SurveyFlowPanel, SurveyHeader, SurveyLocStringEditor, SurveyLocStringViewer, SurveyNavigationBase, SurveyNavigationButton, SurveyPage, SurveyPanel, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestion, SurveyQuestionAndErrorsCell, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionButtonGroup, 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 };
5972
- //# sourceMappingURL=survey-react-ui.js.map
6008
+ 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, 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 };
6009
+ //# sourceMappingURL=survey-react-ui.mjs.map