survey-js-ui 3.1.0 → 3.1.2
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.
|
|
3
|
+
"version": "3.1.2",
|
|
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.
|
|
63
|
+
"survey-core": "3.1.2",
|
|
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.
|
|
2
|
+
* surveyjs - Survey JavaScript library v3.1.2
|
|
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.
|
|
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));
|
|
@@ -4116,6 +4118,10 @@
|
|
|
4116
4118
|
class SurveyQuestionRadioItem extends SurveyQuestionSelectBaseItem {
|
|
4117
4119
|
constructor(props) {
|
|
4118
4120
|
super(props);
|
|
4121
|
+
this.handleOnKeyDown = (event) => {
|
|
4122
|
+
var _a, _b;
|
|
4123
|
+
(_b = (_a = this.question).onKeyDown) === null || _b === void 0 ? void 0 : _b.call(_a, event);
|
|
4124
|
+
};
|
|
4119
4125
|
this.handleOnMouseDown = this.handleOnMouseDown.bind(this);
|
|
4120
4126
|
}
|
|
4121
4127
|
getStateElement() {
|
|
@@ -4140,12 +4146,12 @@
|
|
|
4140
4146
|
var itemClass = this.question.getItemClass(this.item);
|
|
4141
4147
|
var labelClass = this.question.getLabelClass(this.item);
|
|
4142
4148
|
var controlLabelClass = this.question.getControlLabelClass(this.item);
|
|
4143
|
-
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;
|
|
4144
4150
|
return (_$1("div", { className: itemClass, role: "presentation", ref: this.rootRef },
|
|
4145
4151
|
_$1("label", { onMouseDown: this.handleOnMouseDown, className: labelClass },
|
|
4146
|
-
_$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, "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 }),
|
|
4147
4153
|
this.cssClasses.materialDecorator ?
|
|
4148
|
-
_$1("span", { className: this.cssClasses.materialDecorator }, this.question.itemSvgIcon ?
|
|
4154
|
+
_$1("span", { className: this.cssClasses.materialDecorator, "aria-hidden": "true" }, this.question.itemSvgIcon ?
|
|
4149
4155
|
_$1("svg", { className: this.cssClasses.itemDecorator },
|
|
4150
4156
|
_$1("use", { xlinkHref: this.question.itemSvgIcon })) :
|
|
4151
4157
|
null) :
|
|
@@ -4303,7 +4309,7 @@
|
|
|
4303
4309
|
_$1("input", { ref: this.checkRef, type: "checkbox", name: this.question.name, value: this.question.booleanValue === null
|
|
4304
4310
|
? ""
|
|
4305
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 }),
|
|
4306
|
-
_$1("span", { className: cssClasses.checkboxMaterialDecorator },
|
|
4312
|
+
_$1("span", { className: cssClasses.checkboxMaterialDecorator, "aria-hidden": "true" },
|
|
4307
4313
|
this.question.svgIcon ?
|
|
4308
4314
|
_$1("svg", { className: cssClasses.checkboxItemDecorator },
|
|
4309
4315
|
_$1("use", { xlinkHref: this.question.svgIcon })) : null,
|
|
@@ -4333,7 +4339,7 @@
|
|
|
4333
4339
|
_$1("label", { className: cssClasses.radioLabel },
|
|
4334
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 }),
|
|
4335
4341
|
this.question.cssClasses.materialRadioDecorator ?
|
|
4336
|
-
(_$1("span", { className: cssClasses.materialRadioDecorator }, this.question.itemSvgIcon ?
|
|
4342
|
+
(_$1("span", { className: cssClasses.materialRadioDecorator, "aria-hidden": "true" }, this.question.itemSvgIcon ?
|
|
4337
4343
|
(_$1("svg", { className: cssClasses.itemRadioDecorator },
|
|
4338
4344
|
_$1("use", { xlinkHref: this.question.itemSvgIcon }))) : null)) : null,
|
|
4339
4345
|
_$1("span", { className: cssClasses.radioControlLabel }, this.renderLocString(locText)))));
|
|
@@ -5266,7 +5272,7 @@
|
|
|
5266
5272
|
? this.renderLocString(this.question.locMaxRateDescription)
|
|
5267
5273
|
: null;
|
|
5268
5274
|
return (_$1("div", { className: this.question.ratingRootCss, ref: (div) => (this.setControl(div)) },
|
|
5269
|
-
_$1("fieldset", { role: this.question.a11y_input_ariaRole, "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 },
|
|
5275
|
+
_$1("fieldset", { onKeyDown: (event) => this.question.onKeyDown(event), role: this.question.a11y_input_ariaRole, "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 },
|
|
5270
5276
|
_$1("legend", { role: "presentation", className: "sv-hidden" }),
|
|
5271
5277
|
!!this.question.hasMinLabel ? _$1("span", { className: cssClasses.minText }, minText) : null,
|
|
5272
5278
|
this.question.renderedRateItems.map((item, index) => this.renderItem(item, index)),
|
|
@@ -6259,7 +6265,7 @@
|
|
|
6259
6265
|
}
|
|
6260
6266
|
};
|
|
6261
6267
|
const preact = React;
|
|
6262
|
-
surveyCore.checkLibraryVersion(`${"3.1.
|
|
6268
|
+
surveyCore.checkLibraryVersion(`${"3.1.2"}`, "survey-js-ui");
|
|
6263
6269
|
|
|
6264
6270
|
Object.defineProperty(exports, 'Model', {
|
|
6265
6271
|
enumerable: true,
|