survey-react-ui 2.0.6 → 2.0.8

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.6
2
+ * surveyjs - Survey JavaScript library v2.0.8
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
  */
@@ -547,8 +547,9 @@ class SurveyRow extends SurveyElementBase {
547
547
  this.row.isNeedRender = !this.row.isLazyRendering();
548
548
  }
549
549
  componentWillUnmount() {
550
+ const isCurrentStateElement = this.isCurrentStateElement(this.getStateElement());
550
551
  super.componentWillUnmount();
551
- if (this.isCurrentStateElement(this.getStateElement())) {
552
+ if (isCurrentStateElement) {
552
553
  this.row.setRootElement(undefined);
553
554
  this.stopLazyRendering();
554
555
  }
@@ -1923,7 +1924,7 @@ class PopupModal extends SurveyElementBase {
1923
1924
  PopupModal.modalDescriptors = [];
1924
1925
 
1925
1926
  /*!
1926
- * surveyjs - Survey JavaScript library v2.0.6
1927
+ * surveyjs - Survey JavaScript library v2.0.8
1927
1928
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
1928
1929
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
1929
1930
  */
@@ -1993,7 +1994,7 @@ var iconsV1 = {
1993
1994
  };
1994
1995
 
1995
1996
  /*!
1996
- * surveyjs - Survey JavaScript library v2.0.6
1997
+ * surveyjs - Survey JavaScript library v2.0.8
1997
1998
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
1998
1999
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
1999
2000
  */
@@ -3162,18 +3163,20 @@ class SurveyQuestionDropdownBase extends SurveyQuestionUncontrolledElement {
3162
3163
  return this.questionBase.renderedValue;
3163
3164
  }
3164
3165
  renderReadOnlyElement() {
3165
- return React.createElement("div", null, this.question.readOnlyText);
3166
+ if (this.question.locReadOnlyText) {
3167
+ return this.renderLocString(this.question.locReadOnlyText);
3168
+ }
3169
+ else {
3170
+ return null;
3171
+ }
3166
3172
  }
3167
3173
  renderSelect(cssClasses) {
3168
3174
  var _a, _b;
3169
3175
  let selectElement = null;
3170
3176
  if (this.question.isReadOnly) {
3171
- const text = (this.question.selectedItemLocText) ? this.renderLocString(this.question.selectedItemLocText) : "";
3172
3177
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
3173
3178
  // @ts-ignore
3174
- selectElement = React.createElement("div", { id: this.question.inputId, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, tabIndex: this.question.isDisabledAttr ? undefined : 0, className: this.question.getControlClass(), ref: (div) => (this.setControl(div)) },
3175
- text,
3176
- this.renderReadOnlyElement());
3179
+ selectElement = React.createElement("div", { id: this.question.inputId, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, tabIndex: this.question.isDisabledAttr ? undefined : 0, className: this.question.getControlClass(), ref: (div) => (this.setControl(div)) }, this.renderReadOnlyElement());
3177
3180
  }
3178
3181
  else {
3179
3182
  selectElement = React.createElement(React.Fragment, null,
@@ -5542,6 +5545,9 @@ class SurveyQuestionButtonGroup extends SurveyQuestionElementBase {
5542
5545
  });
5543
5546
  }
5544
5547
  }
5548
+ ReactQuestionFactory.Instance.registerQuestion("buttongroup", (props) => {
5549
+ return React.createElement(SurveyQuestionButtonGroup, props);
5550
+ });
5545
5551
  class SurveyButtonGroupItem extends SurveyElementBase {
5546
5552
  constructor(props) {
5547
5553
  super(props);
@@ -5591,6 +5597,21 @@ class SurveyButtonGroupItem extends SurveyElementBase {
5591
5597
  // return React.createElement(SurveyQuestionButtonGroup, props);
5592
5598
  // });
5593
5599
 
5600
+ class SurveyQuestionButtonGroupDropdown extends SurveyQuestionDropdownBase {
5601
+ constructor(props) {
5602
+ super(props);
5603
+ }
5604
+ renderElement() {
5605
+ const cssClasses = this.question.cssClasses;
5606
+ const select = this.renderSelect(cssClasses);
5607
+ return (React.createElement("div", { className: this.question.cssClasses.rootDropdown }, select));
5608
+ }
5609
+ }
5610
+ ReactQuestionFactory.Instance.registerQuestion("sv-buttongroup-dropdown", (props) => {
5611
+ return React.createElement(SurveyQuestionButtonGroupDropdown, props);
5612
+ });
5613
+ RendererFactory.Instance.registerRenderer("buttongroup", "dropdown", "sv-buttongroup-dropdown");
5614
+
5594
5615
  class SurveyQuestionCustom extends SurveyQuestionUncontrolledElement {
5595
5616
  constructor(props) {
5596
5617
  super(props);
@@ -6057,7 +6078,7 @@ ReactElementFactory.Instance.registerElement(LocalizableString.editableRenderer,
6057
6078
  return React.createElement(SurveyLocStringEditor, props);
6058
6079
  });
6059
6080
 
6060
- checkLibraryVersion(`${"2.0.6"}`, "survey-react-ui");
6081
+ checkLibraryVersion(`${"2.0.8"}`, "survey-react-ui");
6061
6082
 
6062
- 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 };
6083
+ 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 };
6063
6084
  //# sourceMappingURL=survey-react-ui.mjs.map