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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "survey-js-ui",
3
- "version": "3.1.1",
3
+ "version": "3.2.0",
4
4
  "license": "MIT",
5
5
  "homepage": "https://surveyjs.io/",
6
6
  "author": "DevSoft Baltic OU <info@devsoftbaltic.com>",
@@ -60,7 +60,7 @@
60
60
  },
61
61
  "dependencies": {},
62
62
  "peerDependencies": {
63
- "survey-core": "3.1.1",
63
+ "survey-core": "3.2.0",
64
64
  "@types/react-dom": "*",
65
65
  "@types/react": "*"
66
66
  }
package/survey-js-ui.js CHANGED
@@ -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
  */
@@ -1519,7 +1519,7 @@
1519
1519
  }
1520
1520
  const rootCss = this.survey.getRootCss();
1521
1521
  const cssClasses = this.rootNodeClassName ? this.rootNodeClassName + " " + rootCss : rootCss;
1522
- return (_$1("div", { id: this.rootNodeId, ref: this.rootRef, className: cssClasses, style: this.survey.themeVariables, lang: this.survey.locale || "en", dir: this.survey.localeDir },
1522
+ return (_$1("div", { id: this.rootNodeId, ref: this.rootRef, className: cssClasses, style: this.survey.themeVariables, lang: this.survey.rootLang, dir: this.survey.localeDir },
1523
1523
  _$1(Scroll, { disabled: this.survey.rootScrollDisabled },
1524
1524
  this.survey.needRenderIcons ? _$1(SvgBundleComponent, null) : null,
1525
1525
  _$1(PopupModal, null),
@@ -1698,6 +1698,7 @@
1698
1698
  return this.props.css || this.survey.css;
1699
1699
  }
1700
1700
  componentDidMount() {
1701
+ super.componentDidMount();
1701
1702
  if (this.survey) {
1702
1703
  var self = this;
1703
1704
  this.updateStateFunction = function () {
@@ -1707,6 +1708,7 @@
1707
1708
  }
1708
1709
  }
1709
1710
  componentWillUnmount() {
1711
+ super.componentWillUnmount();
1710
1712
  if (this.survey && this.updateStateFunction) {
1711
1713
  this.survey.onPageVisibleChanged.remove(this.updateStateFunction);
1712
1714
  this.updateStateFunction = null;
@@ -3041,12 +3043,12 @@
3041
3043
  const id = this.question.getItemId(this.item);
3042
3044
  const itemClass = this.question.getItemClass(this.item);
3043
3045
  const labelClass = this.question.getLabelClass(this.item);
3044
- const itemLabel = !this.hideCaption ? _$1("span", { className: this.cssClasses.controlLabel }, this.renderLocString(this.item.locText, this.textStyle)) : null;
3046
+ 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;
3045
3047
  return (_$1("div", { className: itemClass, role: "presentation", ref: this.rootRef },
3046
3048
  _$1("label", { className: labelClass },
3047
- _$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 }),
3049
+ _$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 }),
3048
3050
  this.cssClasses.materialDecorator ?
3049
- _$1("span", { className: this.cssClasses.materialDecorator }, this.question.itemSvgIcon ?
3051
+ _$1("span", { className: this.cssClasses.materialDecorator, "aria-hidden": "true" }, this.question.itemSvgIcon ?
3050
3052
  _$1("svg", { className: this.cssClasses.itemDecorator },
3051
3053
  _$1("use", { xlinkHref: this.question.itemSvgIcon })) :
3052
3054
  null) :
@@ -3809,7 +3811,7 @@
3809
3811
  : undefined;
3810
3812
  return (_$1("label", { onMouseDown: this.handleOnMouseDown, className: itemClass },
3811
3813
  this.renderInput(inputId, isChecked),
3812
- _$1("span", { className: this.question.cssMaterialDecorator }, itemSvgIcon ?
3814
+ _$1("span", { className: this.question.cssMaterialDecorator, "aria-hidden": "true" }, itemSvgIcon ?
3813
3815
  _$1("svg", { className: this.question.cssItemDecorator },
3814
3816
  _$1("use", { xlinkHref: itemSvgIcon })) : null),
3815
3817
  mobileSpan));
@@ -4144,12 +4146,12 @@
4144
4146
  var itemClass = this.question.getItemClass(this.item);
4145
4147
  var labelClass = this.question.getLabelClass(this.item);
4146
4148
  var controlLabelClass = this.question.getControlLabelClass(this.item);
4147
- const itemLabel = !this.hideCaption ? _$1("span", { className: controlLabelClass }, this.renderLocString(this.item.locText, this.textStyle)) : null;
4149
+ 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;
4148
4150
  return (_$1("div", { className: itemClass, role: "presentation", ref: this.rootRef },
4149
4151
  _$1("label", { onMouseDown: this.handleOnMouseDown, className: labelClass },
4150
- _$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 }),
4152
+ _$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 }),
4151
4153
  this.cssClasses.materialDecorator ?
4152
- _$1("span", { className: this.cssClasses.materialDecorator }, this.question.itemSvgIcon ?
4154
+ _$1("span", { className: this.cssClasses.materialDecorator, "aria-hidden": "true" }, this.question.itemSvgIcon ?
4153
4155
  _$1("svg", { className: this.cssClasses.itemDecorator },
4154
4156
  _$1("use", { xlinkHref: this.question.itemSvgIcon })) :
4155
4157
  null) :
@@ -4307,7 +4309,7 @@
4307
4309
  _$1("input", { ref: this.checkRef, type: "checkbox", name: this.question.name, value: this.question.booleanValue === null
4308
4310
  ? ""
4309
4311
  : 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 }),
4310
- _$1("span", { className: cssClasses.checkboxMaterialDecorator },
4312
+ _$1("span", { className: cssClasses.checkboxMaterialDecorator, "aria-hidden": "true" },
4311
4313
  this.question.svgIcon ?
4312
4314
  _$1("svg", { className: cssClasses.checkboxItemDecorator },
4313
4315
  _$1("use", { xlinkHref: this.question.svgIcon })) : null,
@@ -4337,7 +4339,7 @@
4337
4339
  _$1("label", { className: cssClasses.radioLabel },
4338
4340
  _$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 }),
4339
4341
  this.question.cssClasses.materialRadioDecorator ?
4340
- (_$1("span", { className: cssClasses.materialRadioDecorator }, this.question.itemSvgIcon ?
4342
+ (_$1("span", { className: cssClasses.materialRadioDecorator, "aria-hidden": "true" }, this.question.itemSvgIcon ?
4341
4343
  (_$1("svg", { className: cssClasses.itemRadioDecorator },
4342
4344
  _$1("use", { xlinkHref: this.question.itemSvgIcon }))) : null)) : null,
4343
4345
  _$1("span", { className: cssClasses.radioControlLabel }, this.renderLocString(locText)))));
@@ -6263,7 +6265,7 @@
6263
6265
  }
6264
6266
  };
6265
6267
  const preact = React;
6266
- surveyCore.checkLibraryVersion(`${"3.1.1"}`, "survey-js-ui");
6268
+ surveyCore.checkLibraryVersion(`${"3.2.0"}`, "survey-js-ui");
6267
6269
 
6268
6270
  Object.defineProperty(exports, 'Model', {
6269
6271
  enumerable: true,