survey-js-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
  */
@@ -600,8 +600,9 @@ class SurveyRow extends SurveyElementBase {
600
600
  this.row.isNeedRender = !this.row.isLazyRendering();
601
601
  }
602
602
  componentWillUnmount() {
603
+ const isCurrentStateElement = this.isCurrentStateElement(this.getStateElement());
603
604
  super.componentWillUnmount();
604
- if (this.isCurrentStateElement(this.getStateElement())) {
605
+ if (isCurrentStateElement) {
605
606
  this.row.setRootElement(undefined);
606
607
  this.stopLazyRendering();
607
608
  }
@@ -1976,7 +1977,7 @@ class PopupModal extends SurveyElementBase {
1976
1977
  PopupModal.modalDescriptors = [];
1977
1978
 
1978
1979
  /*!
1979
- * surveyjs - Survey JavaScript library v2.0.6
1980
+ * surveyjs - Survey JavaScript library v2.0.8
1980
1981
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
1981
1982
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
1982
1983
  */
@@ -2046,7 +2047,7 @@ var iconsV1 = {
2046
2047
  };
2047
2048
 
2048
2049
  /*!
2049
- * surveyjs - Survey JavaScript library v2.0.6
2050
+ * surveyjs - Survey JavaScript library v2.0.8
2050
2051
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
2051
2052
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
2052
2053
  */
@@ -3215,18 +3216,20 @@ class SurveyQuestionDropdownBase extends SurveyQuestionUncontrolledElement {
3215
3216
  return this.questionBase.renderedValue;
3216
3217
  }
3217
3218
  renderReadOnlyElement() {
3218
- return _$1("div", null, this.question.readOnlyText);
3219
+ if (this.question.locReadOnlyText) {
3220
+ return this.renderLocString(this.question.locReadOnlyText);
3221
+ }
3222
+ else {
3223
+ return null;
3224
+ }
3219
3225
  }
3220
3226
  renderSelect(cssClasses) {
3221
3227
  var _a, _b;
3222
3228
  let selectElement = null;
3223
3229
  if (this.question.isReadOnly) {
3224
- const text = (this.question.selectedItemLocText) ? this.renderLocString(this.question.selectedItemLocText) : "";
3225
3230
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
3226
3231
  // @ts-ignore
3227
- selectElement = _$1("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)) },
3228
- text,
3229
- this.renderReadOnlyElement());
3232
+ selectElement = _$1("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());
3230
3233
  }
3231
3234
  else {
3232
3235
  selectElement = _$1(k$2, null,
@@ -5595,6 +5598,9 @@ class SurveyQuestionButtonGroup extends SurveyQuestionElementBase {
5595
5598
  });
5596
5599
  }
5597
5600
  }
5601
+ ReactQuestionFactory.Instance.registerQuestion("buttongroup", (props) => {
5602
+ return _$1(SurveyQuestionButtonGroup, props);
5603
+ });
5598
5604
  class SurveyButtonGroupItem extends SurveyElementBase {
5599
5605
  constructor(props) {
5600
5606
  super(props);
@@ -5644,6 +5650,21 @@ class SurveyButtonGroupItem extends SurveyElementBase {
5644
5650
  // return React.createElement(SurveyQuestionButtonGroup, props);
5645
5651
  // });
5646
5652
 
5653
+ class SurveyQuestionButtonGroupDropdown extends SurveyQuestionDropdownBase {
5654
+ constructor(props) {
5655
+ super(props);
5656
+ }
5657
+ renderElement() {
5658
+ const cssClasses = this.question.cssClasses;
5659
+ const select = this.renderSelect(cssClasses);
5660
+ return (_$1("div", { className: this.question.cssClasses.rootDropdown }, select));
5661
+ }
5662
+ }
5663
+ ReactQuestionFactory.Instance.registerQuestion("sv-buttongroup-dropdown", (props) => {
5664
+ return _$1(SurveyQuestionButtonGroupDropdown, props);
5665
+ });
5666
+ RendererFactory.Instance.registerRenderer("buttongroup", "dropdown", "sv-buttongroup-dropdown");
5667
+
5647
5668
  class SurveyQuestionCustom extends SurveyQuestionUncontrolledElement {
5648
5669
  constructor(props) {
5649
5670
  super(props);
@@ -6159,7 +6180,7 @@ SurveyModel.prototype["render"] = function (element = null) {
6159
6180
  }
6160
6181
  };
6161
6182
  const preact = React;
6162
- checkLibraryVersion(`${"2.0.6"}`, "survey-js-ui");
6183
+ checkLibraryVersion(`${"2.0.8"}`, "survey-js-ui");
6163
6184
 
6164
- export { CharacterCounterComponent, O as Children, x$2 as Component, ComponentsContainer, k$2 as Fragment, Header, HeaderCell, HeaderMobile, List, ListItemContent, ListItemGroup, LoadingIndicatorComponent, LogoImage, MatrixRow, NotifierComponent, Popup, PopupModal, PopupSurvey, N as PureComponent, QuestionErrorComponent, RatingDropdownItem, RatingItem, RatingItemSmiley, RatingItemStar, ReactElementFactory, ReactQuestionFactory, ReactSurveyElement, ReactSurveyElementsWrapper, Scroll, Skeleton, Cn as StrictMode, 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, P as Suspense, B as SuspenseList, SvgBundleComponent, SvgIcon, TagboxFilterString, TitleActions, TitleElement, attachKey2click, _n as cloneElement, K$1 as createContext, _$1 as createElement, dn as createFactory, $ as createPortal, b$1 as createRef, Sn as findDOMNode, En as flushSync, D as forwardRef, tn as hydrate, mn as isFragment, yn as isMemo, pn as isValidElement, z as lazy, M as memo, preact, nn as render, renderPopupSurvey, renderSurvey, R as startTransition, bn as unmountComponentAtNode, gn as unstable_batchedUpdates, q$1 as useCallback, x$1 as useContext, P$1 as useDebugValue, w as useDeferredValue, y as useEffect, g$1 as useId, F$1 as useImperativeHandle, I as useInsertionEffect, _ as useLayoutEffect, T$1 as useMemo, h as useReducer, A$1 as useRef, d as useState, C as useSyncExternalStore, k as useTransition, vn as version };
6185
+ export { CharacterCounterComponent, O as Children, x$2 as Component, ComponentsContainer, k$2 as Fragment, Header, HeaderCell, HeaderMobile, List, ListItemContent, ListItemGroup, LoadingIndicatorComponent, LogoImage, MatrixRow, NotifierComponent, Popup, PopupModal, PopupSurvey, N as PureComponent, QuestionErrorComponent, RatingDropdownItem, RatingItem, RatingItemSmiley, RatingItemStar, ReactElementFactory, ReactQuestionFactory, ReactSurveyElement, ReactSurveyElementsWrapper, Scroll, Skeleton, Cn as StrictMode, 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, P as Suspense, B as SuspenseList, SvgBundleComponent, SvgIcon, TagboxFilterString, TitleActions, TitleElement, attachKey2click, _n as cloneElement, K$1 as createContext, _$1 as createElement, dn as createFactory, $ as createPortal, b$1 as createRef, Sn as findDOMNode, En as flushSync, D as forwardRef, tn as hydrate, mn as isFragment, yn as isMemo, pn as isValidElement, z as lazy, M as memo, preact, nn as render, renderPopupSurvey, renderSurvey, R as startTransition, bn as unmountComponentAtNode, gn as unstable_batchedUpdates, q$1 as useCallback, x$1 as useContext, P$1 as useDebugValue, w as useDeferredValue, y as useEffect, g$1 as useId, F$1 as useImperativeHandle, I as useInsertionEffect, _ as useLayoutEffect, T$1 as useMemo, h as useReducer, A$1 as useRef, d as useState, C as useSyncExternalStore, k as useTransition, vn as version };
6165
6186
  //# sourceMappingURL=survey-js-ui.mjs.map