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/fesm/survey-js-ui.mjs
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
|
*/
|
|
@@ -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.
|
|
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));
|
|
@@ -4115,6 +4117,10 @@ class SurveyQuestionRadiogroup extends SurveyQuestionSelectbase {
|
|
|
4115
4117
|
class SurveyQuestionRadioItem extends SurveyQuestionSelectBaseItem {
|
|
4116
4118
|
constructor(props) {
|
|
4117
4119
|
super(props);
|
|
4120
|
+
this.handleOnKeyDown = (event) => {
|
|
4121
|
+
var _a, _b;
|
|
4122
|
+
(_b = (_a = this.question).onKeyDown) === null || _b === void 0 ? void 0 : _b.call(_a, event);
|
|
4123
|
+
};
|
|
4118
4124
|
this.handleOnMouseDown = this.handleOnMouseDown.bind(this);
|
|
4119
4125
|
}
|
|
4120
4126
|
getStateElement() {
|
|
@@ -4139,12 +4145,12 @@ class SurveyQuestionRadioItem extends SurveyQuestionSelectBaseItem {
|
|
|
4139
4145
|
var itemClass = this.question.getItemClass(this.item);
|
|
4140
4146
|
var labelClass = this.question.getLabelClass(this.item);
|
|
4141
4147
|
var controlLabelClass = this.question.getControlLabelClass(this.item);
|
|
4142
|
-
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;
|
|
4143
4149
|
return (_$1("div", { className: itemClass, role: "presentation", ref: this.rootRef },
|
|
4144
4150
|
_$1("label", { onMouseDown: this.handleOnMouseDown, className: labelClass },
|
|
4145
|
-
_$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 }),
|
|
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 }),
|
|
4146
4152
|
this.cssClasses.materialDecorator ?
|
|
4147
|
-
_$1("span", { className: this.cssClasses.materialDecorator }, this.question.itemSvgIcon ?
|
|
4153
|
+
_$1("span", { className: this.cssClasses.materialDecorator, "aria-hidden": "true" }, this.question.itemSvgIcon ?
|
|
4148
4154
|
_$1("svg", { className: this.cssClasses.itemDecorator },
|
|
4149
4155
|
_$1("use", { xlinkHref: this.question.itemSvgIcon })) :
|
|
4150
4156
|
null) :
|
|
@@ -4302,7 +4308,7 @@ class SurveyQuestionBooleanCheckbox extends SurveyQuestionBoolean {
|
|
|
4302
4308
|
_$1("input", { ref: this.checkRef, type: "checkbox", name: this.question.name, value: this.question.booleanValue === null
|
|
4303
4309
|
? ""
|
|
4304
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 }),
|
|
4305
|
-
_$1("span", { className: cssClasses.checkboxMaterialDecorator },
|
|
4311
|
+
_$1("span", { className: cssClasses.checkboxMaterialDecorator, "aria-hidden": "true" },
|
|
4306
4312
|
this.question.svgIcon ?
|
|
4307
4313
|
_$1("svg", { className: cssClasses.checkboxItemDecorator },
|
|
4308
4314
|
_$1("use", { xlinkHref: this.question.svgIcon })) : null,
|
|
@@ -4332,7 +4338,7 @@ class SurveyQuestionBooleanRadio extends SurveyQuestionBoolean {
|
|
|
4332
4338
|
_$1("label", { className: cssClasses.radioLabel },
|
|
4333
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 }),
|
|
4334
4340
|
this.question.cssClasses.materialRadioDecorator ?
|
|
4335
|
-
(_$1("span", { className: cssClasses.materialRadioDecorator }, this.question.itemSvgIcon ?
|
|
4341
|
+
(_$1("span", { className: cssClasses.materialRadioDecorator, "aria-hidden": "true" }, this.question.itemSvgIcon ?
|
|
4336
4342
|
(_$1("svg", { className: cssClasses.itemRadioDecorator },
|
|
4337
4343
|
_$1("use", { xlinkHref: this.question.itemSvgIcon }))) : null)) : null,
|
|
4338
4344
|
_$1("span", { className: cssClasses.radioControlLabel }, this.renderLocString(locText)))));
|
|
@@ -5265,7 +5271,7 @@ class SurveyQuestionRating extends SurveyQuestionElementBase {
|
|
|
5265
5271
|
? this.renderLocString(this.question.locMaxRateDescription)
|
|
5266
5272
|
: null;
|
|
5267
5273
|
return (_$1("div", { className: this.question.ratingRootCss, ref: (div) => (this.setControl(div)) },
|
|
5268
|
-
_$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 },
|
|
5274
|
+
_$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 },
|
|
5269
5275
|
_$1("legend", { role: "presentation", className: "sv-hidden" }),
|
|
5270
5276
|
!!this.question.hasMinLabel ? _$1("span", { className: cssClasses.minText }, minText) : null,
|
|
5271
5277
|
this.question.renderedRateItems.map((item, index) => this.renderItem(item, index)),
|
|
@@ -6258,7 +6264,7 @@ SurveyModel.prototype["render"] = function (element = null) {
|
|
|
6258
6264
|
}
|
|
6259
6265
|
};
|
|
6260
6266
|
const preact = React;
|
|
6261
|
-
checkLibraryVersion(`${"3.1.
|
|
6267
|
+
checkLibraryVersion(`${"3.1.2"}`, "survey-js-ui");
|
|
6262
6268
|
|
|
6263
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 };
|
|
6264
6270
|
//# sourceMappingURL=survey-js-ui.mjs.map
|