survey-js-ui 3.1.1 → 3.2.0

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 v3.1.1
2
+ * surveyjs - Survey JavaScript library v3.2.0
3
3
  * Copyright (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -1518,7 +1518,7 @@ class Survey extends SurveyElementBase {
1518
1518
  }
1519
1519
  const rootCss = this.survey.getRootCss();
1520
1520
  const cssClasses = this.rootNodeClassName ? this.rootNodeClassName + " " + rootCss : rootCss;
1521
- return (_$1("div", { id: this.rootNodeId, ref: this.rootRef, className: cssClasses, style: this.survey.themeVariables, lang: this.survey.locale || "en", dir: this.survey.localeDir },
1521
+ return (_$1("div", { id: this.rootNodeId, ref: this.rootRef, className: cssClasses, style: this.survey.themeVariables, lang: this.survey.rootLang, dir: this.survey.localeDir },
1522
1522
  _$1(Scroll, { disabled: this.survey.rootScrollDisabled },
1523
1523
  this.survey.needRenderIcons ? _$1(SvgBundleComponent, null) : null,
1524
1524
  _$1(PopupModal, null),
@@ -1697,6 +1697,7 @@ class SurveyNavigationBase extends SurveyElementBase {
1697
1697
  return this.props.css || this.survey.css;
1698
1698
  }
1699
1699
  componentDidMount() {
1700
+ super.componentDidMount();
1700
1701
  if (this.survey) {
1701
1702
  var self = this;
1702
1703
  this.updateStateFunction = function () {
@@ -1706,6 +1707,7 @@ class SurveyNavigationBase extends SurveyElementBase {
1706
1707
  }
1707
1708
  }
1708
1709
  componentWillUnmount() {
1710
+ super.componentWillUnmount();
1709
1711
  if (this.survey && this.updateStateFunction) {
1710
1712
  this.survey.onPageVisibleChanged.remove(this.updateStateFunction);
1711
1713
  this.updateStateFunction = null;
@@ -3040,12 +3042,12 @@ class SurveyQuestionCheckboxItem extends SurveyQuestionSelectBaseItem {
3040
3042
  const id = this.question.getItemId(this.item);
3041
3043
  const itemClass = this.question.getItemClass(this.item);
3042
3044
  const labelClass = this.question.getLabelClass(this.item);
3043
- const itemLabel = !this.hideCaption ? _$1("span", { className: this.cssClasses.controlLabel }, this.renderLocString(this.item.locText, this.textStyle)) : null;
3045
+ const itemLabel = !this.hideCaption ? _$1("span", { className: this.cssClasses.controlLabel, id: this.question.getItemLabelId(this.item), "aria-hidden": this.question.isItemLabelAriaHidden ? "true" : undefined }, this.renderLocString(this.item.locText, this.textStyle)) : null;
3044
3046
  return (_$1("div", { className: itemClass, role: "presentation", ref: this.rootRef },
3045
3047
  _$1("label", { className: labelClass },
3046
- _$1("input", { className: this.cssClasses.itemControl, type: "checkbox", name: this.question.name + this.item.id, value: this.item.value, id: id, style: this.inputStyle, disabled: !this.question.getItemEnabled(this.item), readOnly: this.question.isReadOnlyAttr, checked: isChecked, onChange: this.handleOnChange, required: this.question.hasRequiredError(), "aria-label": this.ariaLabel }),
3048
+ _$1("input", { className: this.cssClasses.itemControl, type: "checkbox", name: this.question.name + this.item.id, value: this.item.value, id: id, style: this.inputStyle, disabled: !this.question.getItemEnabled(this.item), readOnly: this.question.isReadOnlyAttr, checked: isChecked, onChange: this.handleOnChange, required: this.question.hasRequiredError(), "aria-label": this.ariaLabel, "aria-labelledby": !this.ariaLabel && !this.hideCaption ? this.question.getItemLabelId(this.item) : undefined }),
3047
3049
  this.cssClasses.materialDecorator ?
3048
- _$1("span", { className: this.cssClasses.materialDecorator }, this.question.itemSvgIcon ?
3050
+ _$1("span", { className: this.cssClasses.materialDecorator, "aria-hidden": "true" }, this.question.itemSvgIcon ?
3049
3051
  _$1("svg", { className: this.cssClasses.itemDecorator },
3050
3052
  _$1("use", { xlinkHref: this.question.itemSvgIcon })) :
3051
3053
  null) :
@@ -3808,7 +3810,7 @@ class SurveyQuestionMatrixCell extends ReactSurveyElement {
3808
3810
  : undefined;
3809
3811
  return (_$1("label", { onMouseDown: this.handleOnMouseDown, className: itemClass },
3810
3812
  this.renderInput(inputId, isChecked),
3811
- _$1("span", { className: this.question.cssMaterialDecorator }, itemSvgIcon ?
3813
+ _$1("span", { className: this.question.cssMaterialDecorator, "aria-hidden": "true" }, itemSvgIcon ?
3812
3814
  _$1("svg", { className: this.question.cssItemDecorator },
3813
3815
  _$1("use", { xlinkHref: itemSvgIcon })) : null),
3814
3816
  mobileSpan));
@@ -4143,12 +4145,12 @@ class SurveyQuestionRadioItem extends SurveyQuestionSelectBaseItem {
4143
4145
  var itemClass = this.question.getItemClass(this.item);
4144
4146
  var labelClass = this.question.getLabelClass(this.item);
4145
4147
  var controlLabelClass = this.question.getControlLabelClass(this.item);
4146
- const itemLabel = !this.hideCaption ? _$1("span", { className: controlLabelClass }, this.renderLocString(this.item.locText, this.textStyle)) : null;
4148
+ const itemLabel = !this.hideCaption ? _$1("span", { className: controlLabelClass, id: this.question.getItemLabelId(this.item), "aria-hidden": this.question.isItemLabelAriaHidden ? "true" : undefined }, this.renderLocString(this.item.locText, this.textStyle)) : null;
4147
4149
  return (_$1("div", { className: itemClass, role: "presentation", ref: this.rootRef },
4148
4150
  _$1("label", { onMouseDown: this.handleOnMouseDown, className: labelClass },
4149
- _$1("input", { "aria-errormessage": this.question.ariaErrormessage, className: this.cssClasses.itemControl, id: this.question.getItemId(this.item), type: "radio", name: this.question.questionName, checked: this.isChecked, value: this.item.value, disabled: !this.question.getItemEnabled(this.item), readOnly: this.question.isReadOnlyAttr, onChange: this.handleOnChange, onKeyDown: this.handleOnKeyDown, "aria-label": this.ariaLabel }),
4151
+ _$1("input", { "aria-errormessage": this.question.ariaErrormessage, className: this.cssClasses.itemControl, id: this.question.getItemId(this.item), type: "radio", name: this.question.questionName, checked: this.isChecked, value: this.item.value, disabled: !this.question.getItemEnabled(this.item), readOnly: this.question.isReadOnlyAttr, onChange: this.handleOnChange, onKeyDown: this.handleOnKeyDown, "aria-label": this.ariaLabel, "aria-labelledby": !this.ariaLabel && !this.hideCaption ? this.question.getItemLabelId(this.item) : undefined }),
4150
4152
  this.cssClasses.materialDecorator ?
4151
- _$1("span", { className: this.cssClasses.materialDecorator }, this.question.itemSvgIcon ?
4153
+ _$1("span", { className: this.cssClasses.materialDecorator, "aria-hidden": "true" }, this.question.itemSvgIcon ?
4152
4154
  _$1("svg", { className: this.cssClasses.itemDecorator },
4153
4155
  _$1("use", { xlinkHref: this.question.itemSvgIcon })) :
4154
4156
  null) :
@@ -4306,7 +4308,7 @@ class SurveyQuestionBooleanCheckbox extends SurveyQuestionBoolean {
4306
4308
  _$1("input", { ref: this.checkRef, type: "checkbox", name: this.question.name, value: this.question.booleanValue === null
4307
4309
  ? ""
4308
4310
  : this.question.booleanValue, id: this.question.inputId, className: cssClasses.controlCheckbox, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, checked: this.question.booleanValue || false, onChange: this.handleOnChange, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage }),
4309
- _$1("span", { className: cssClasses.checkboxMaterialDecorator },
4311
+ _$1("span", { className: cssClasses.checkboxMaterialDecorator, "aria-hidden": "true" },
4310
4312
  this.question.svgIcon ?
4311
4313
  _$1("svg", { className: cssClasses.checkboxItemDecorator },
4312
4314
  _$1("use", { xlinkHref: this.question.svgIcon })) : null,
@@ -4336,7 +4338,7 @@ class SurveyQuestionBooleanRadio extends SurveyQuestionBoolean {
4336
4338
  _$1("label", { className: cssClasses.radioLabel },
4337
4339
  _$1("input", { type: "radio", name: this.question.questionName, value: value, "aria-errormessage": this.question.ariaErrormessage, checked: value === this.question.value, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, className: cssClasses.itemRadioControl, onChange: handleOnChange }),
4338
4340
  this.question.cssClasses.materialRadioDecorator ?
4339
- (_$1("span", { className: cssClasses.materialRadioDecorator }, this.question.itemSvgIcon ?
4341
+ (_$1("span", { className: cssClasses.materialRadioDecorator, "aria-hidden": "true" }, this.question.itemSvgIcon ?
4340
4342
  (_$1("svg", { className: cssClasses.itemRadioDecorator },
4341
4343
  _$1("use", { xlinkHref: this.question.itemSvgIcon }))) : null)) : null,
4342
4344
  _$1("span", { className: cssClasses.radioControlLabel }, this.renderLocString(locText)))));
@@ -6262,7 +6264,7 @@ SurveyModel.prototype["render"] = function (element = null) {
6262
6264
  }
6263
6265
  };
6264
6266
  const preact = React;
6265
- checkLibraryVersion(`${"3.1.1"}`, "survey-js-ui");
6267
+ checkLibraryVersion(`${"3.2.0"}`, "survey-js-ui");
6266
6268
 
6267
6269
  export { CharacterCounterComponent, O as Children, x$3 as Component, ComponentsContainer, k$3 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, SliderLabelItem, Cn as StrictMode, Survey, SurveyActionBar, SurveyActionBarItemDropdown, SurveyActionBarSeparator, SurveyElementBase, SurveyElementErrors, SurveyFileChooseButton, SurveyFileItem, SurveyFilePreview, SurveyFlowPanel, SurveyHeader, SurveyLocStringEditor, SurveyLocStringViewer, SurveyNavigationBase, SurveyPage, SurveyPanel, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestion, SurveyQuestionAndErrorsCell, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionBooleanSwitch, SurveyQuestionButtonGroup, SurveyQuestionButtonGroupDropdown, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionComment, SurveyQuestionCommentItem, SurveyQuestionComposite, SurveyQuestionCustom, SurveyQuestionDropdown, SurveyQuestionDropdownBase, SurveyQuestionDropdownSelect, SurveyQuestionElementBase, SurveyQuestionEmpty, SurveyQuestionExpression, SurveyQuestionFile, SurveyQuestionHtml, SurveyQuestionImage, SurveyQuestionImageMap, SurveyQuestionImagePicker, SurveyQuestionMatrix, SurveyQuestionMatrixCell, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionMatrixRow, SurveyQuestionMultipleText, SurveyQuestionOptionItem, SurveyQuestionPanelDynamic, SurveyQuestionPanelDynamicProgressText, SurveyQuestionRadioItem, SurveyQuestionRadiogroup, SurveyQuestionRanking, SurveyQuestionRankingItem, SurveyQuestionRankingItemContent, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionSignaturePad, SurveyQuestionSlider, SurveyQuestionTagbox, SurveyQuestionTagboxItem, SurveyQuestionText, SurveyRow, SurveyTimerPanel, SurveyWindow, P as Suspense, B as SuspenseList, SvgBundleComponent, SvgIcon, TagboxFilterString, TitleActions, TitleElement, attachKey2click, _n as cloneElement, Q$2 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, pn as isFragment, yn as isMemo, mn 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$2 as useCallback, x$2 as useContext, P$2 as useDebugValue, w as useDeferredValue, y as useEffect, g$2 as useId, F$2 as useImperativeHandle, I as useInsertionEffect, _ as useLayoutEffect, T$2 as useMemo, h as useReducer, A$2 as useRef, d as useState, C as useSyncExternalStore, k as useTransition, vn as version };
6268
6270
  //# sourceMappingURL=survey-js-ui.mjs.map