survey-react-ui 2.2.5 → 2.2.6
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-react-ui.mjs +41 -30
- package/fesm/survey-react-ui.mjs.map +1 -1
- package/package.json +2 -2
- package/survey-react-ui.js +45 -34
- package/survey-react-ui.js.map +1 -1
- package/survey-react-ui.min.js +1 -1
- package/survey-react-ui.min.js.LICENSE.txt +1 -1
- package/typings/src/dropdown-base.d.ts +2 -2
- package/typings/src/reactquestion_checkbox.d.ts +1 -1
- package/typings/src/reactquestion_comment.d.ts +3 -1
- package/typings/src/reactquestion_radiogroup.d.ts +2 -1
package/fesm/survey-react-ui.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v2.2.
|
|
2
|
+
* surveyjs - Survey JavaScript library v2.2.6
|
|
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
|
*/
|
|
@@ -1202,13 +1202,15 @@ class SurveyQuestionCommentItem extends ReactSurveyElement {
|
|
|
1202
1202
|
const comment = this.textAreaModel.getTextValue() || "";
|
|
1203
1203
|
return React.createElement("div", null, comment);
|
|
1204
1204
|
}
|
|
1205
|
-
return (React.createElement(TextAreaComponent, { viewModel: this.textAreaModel }));
|
|
1205
|
+
return (React.createElement(TextAreaComponent, { key: this.getKey(), viewModel: this.textAreaModel }));
|
|
1206
1206
|
}
|
|
1207
|
+
getKey() { return undefined; }
|
|
1207
1208
|
}
|
|
1208
|
-
class
|
|
1209
|
+
class SurveyQuestionCommentValueItem extends SurveyQuestionCommentItem {
|
|
1209
1210
|
getTextAreaModel() {
|
|
1210
|
-
return this.props.question.
|
|
1211
|
+
return this.props.question.getCommentTextAreaModel(this.props.item);
|
|
1211
1212
|
}
|
|
1213
|
+
getKey() { return this.props.item.normalizedId; }
|
|
1212
1214
|
}
|
|
1213
1215
|
ReactQuestionFactory.Instance.registerQuestion("comment", (props) => {
|
|
1214
1216
|
return React.createElement(SurveyQuestionComment, props);
|
|
@@ -1925,7 +1927,7 @@ class PopupModal extends SurveyElementBase {
|
|
|
1925
1927
|
PopupModal.modalDescriptors = [];
|
|
1926
1928
|
|
|
1927
1929
|
/*!
|
|
1928
|
-
* surveyjs - Survey JavaScript library v2.2.
|
|
1930
|
+
* surveyjs - Survey JavaScript library v2.2.6
|
|
1929
1931
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
1930
1932
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
1931
1933
|
*/
|
|
@@ -1995,7 +1997,7 @@ var iconsV1 = {
|
|
|
1995
1997
|
};
|
|
1996
1998
|
|
|
1997
1999
|
/*!
|
|
1998
|
-
* surveyjs - Survey JavaScript library v2.2.
|
|
2000
|
+
* surveyjs - Survey JavaScript library v2.2.6
|
|
1999
2001
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
2000
2002
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
2001
2003
|
*/
|
|
@@ -2646,8 +2648,7 @@ class SurveyQuestionCheckbox extends SurveyQuestionElementBase {
|
|
|
2646
2648
|
this.question.hasColumns
|
|
2647
2649
|
? this.getColumnedBody(cssClasses)
|
|
2648
2650
|
: this.getBody(cssClasses),
|
|
2649
|
-
this.getFooter()
|
|
2650
|
-
this.question.isOtherSelected ? this.renderOther() : null));
|
|
2651
|
+
this.getFooter()));
|
|
2651
2652
|
}
|
|
2652
2653
|
getHeader() {
|
|
2653
2654
|
if (this.question.hasHeadItems) {
|
|
@@ -2680,7 +2681,6 @@ class SurveyQuestionCheckbox extends SurveyQuestionElementBase {
|
|
|
2680
2681
|
var renderedItems = [];
|
|
2681
2682
|
for (var i = 0; i < choices.length; i++) {
|
|
2682
2683
|
var item = choices[i];
|
|
2683
|
-
"item" + item.value;
|
|
2684
2684
|
var renderedItem = this.renderItem(item, i == 0, cssClasses, "" + i);
|
|
2685
2685
|
if (!!renderedItem) {
|
|
2686
2686
|
renderedItems.push(renderedItem);
|
|
@@ -2691,11 +2691,6 @@ class SurveyQuestionCheckbox extends SurveyQuestionElementBase {
|
|
|
2691
2691
|
get textStyle() {
|
|
2692
2692
|
return null;
|
|
2693
2693
|
}
|
|
2694
|
-
renderOther() {
|
|
2695
|
-
let cssClasses = this.question.cssClasses;
|
|
2696
|
-
return (React.createElement("div", { className: this.question.getCommentAreaCss(true) },
|
|
2697
|
-
React.createElement(SurveyQuestionOtherValueItem, { question: this.question, otherCss: cssClasses.other, cssClasses: cssClasses, isDisplayMode: this.isDisplayMode })));
|
|
2698
|
-
}
|
|
2699
2694
|
renderItem(item, isFirst, cssClasses, index) {
|
|
2700
2695
|
const renderedItem = ReactElementFactory.Instance.createElement(this.question.itemComponent, {
|
|
2701
2696
|
key: item.value,
|
|
@@ -2770,12 +2765,20 @@ class SurveyQuestionCheckboxItem extends ReactSurveyElement {
|
|
|
2770
2765
|
return !!this.item && !!this.question;
|
|
2771
2766
|
}
|
|
2772
2767
|
renderElement() {
|
|
2773
|
-
|
|
2774
|
-
return
|
|
2768
|
+
const isChecked = this.question.isItemSelected(this.item);
|
|
2769
|
+
return React.createElement(React.Fragment, null,
|
|
2770
|
+
this.renderCheckbox(isChecked, null),
|
|
2771
|
+
this.renderComment());
|
|
2775
2772
|
}
|
|
2776
2773
|
get inputStyle() {
|
|
2777
2774
|
return null; //{ marginRight: "3px" };
|
|
2778
2775
|
}
|
|
2776
|
+
renderComment() {
|
|
2777
|
+
if (!this.item.isCommentShowing)
|
|
2778
|
+
return null;
|
|
2779
|
+
return React.createElement("div", { className: this.question.getCommentAreaCss(true) },
|
|
2780
|
+
React.createElement(SurveyQuestionCommentValueItem, { question: this.question, item: this.item, isDisplayMode: this.isDisplayMode, cssClasses: this.question.cssClasses, otherCss: this.question.getCommentAreaCss(false) }));
|
|
2781
|
+
}
|
|
2779
2782
|
renderCheckbox(isChecked, otherItem) {
|
|
2780
2783
|
const id = this.question.getItemId(this.item);
|
|
2781
2784
|
const itemClass = this.question.getItemClass(this.item);
|
|
@@ -3237,9 +3240,11 @@ class SurveyQuestionDropdownBase extends SurveyQuestionUncontrolledElement {
|
|
|
3237
3240
|
};
|
|
3238
3241
|
return React.createElement("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), ref: (element) => (this.inputElement = element), className: this.question.cssClasses.filterStringInput, role: dropdownListModel.ariaInputRole, "aria-required": dropdownListModel.ariaInputRequired, "aria-invalid": dropdownListModel.ariaInputInvalid, "aria-errormessage": dropdownListModel.ariaInputErrorMessage, "aria-expanded": dropdownListModel.ariaInputExpanded, "aria-label": dropdownListModel.ariaInputLabel, "aria-labelledby": dropdownListModel.ariaInputLabelledby, "aria-describedby": dropdownListModel.ariaInputDescribedby, "aria-controls": dropdownListModel.ariaInputControls, "aria-activedescendant": dropdownListModel.ariaInputActivedescendant, placeholder: dropdownListModel.placeholderRendered, readOnly: dropdownListModel.filterReadOnly ? true : undefined, tabIndex: dropdownListModel.noTabIndex ? undefined : -1, disabled: this.question.isDisabledAttr, inputMode: dropdownListModel.inputMode, onChange: (e) => { onInputChange(e); }, onBlur: this.blur, onFocus: this.focus });
|
|
3239
3242
|
}
|
|
3240
|
-
renderOther(cssClasses) {
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
+
renderOther(item, cssClasses) {
|
|
3244
|
+
if (!item || !item.isCommentShowing)
|
|
3245
|
+
return null;
|
|
3246
|
+
return (React.createElement("div", { key: item.normalizedId, className: this.question.getCommentAreaCss(true) },
|
|
3247
|
+
React.createElement(SurveyQuestionCommentValueItem, { question: this.question, item: item, isDisplayMode: this.isDisplayMode, cssClasses: this.question.cssClasses, otherCss: this.question.getCommentAreaCss(false) })));
|
|
3243
3248
|
}
|
|
3244
3249
|
renderEditorButtons() {
|
|
3245
3250
|
return React.createElement(SurveyActionBar, { model: this.dropdownListModel.editorButtons });
|
|
@@ -3274,7 +3279,7 @@ class SurveyQuestionDropdown extends SurveyQuestionDropdownBase {
|
|
|
3274
3279
|
}
|
|
3275
3280
|
renderElement() {
|
|
3276
3281
|
const cssClasses = this.question.cssClasses;
|
|
3277
|
-
const comment = this.question.
|
|
3282
|
+
const comment = this.renderOther(this.question.selectedItem, cssClasses);
|
|
3278
3283
|
const select = this.renderSelect(cssClasses);
|
|
3279
3284
|
return (React.createElement("div", { className: this.question.renderCssRoot },
|
|
3280
3285
|
select,
|
|
@@ -3333,7 +3338,7 @@ class SurveyQuestionTagbox extends SurveyQuestionDropdownBase {
|
|
|
3333
3338
|
}
|
|
3334
3339
|
renderElement() {
|
|
3335
3340
|
const cssClasses = this.question.cssClasses;
|
|
3336
|
-
const comment = this.question.
|
|
3341
|
+
const comment = this.renderOther(this.question.otherItem, cssClasses);
|
|
3337
3342
|
const select = this.renderSelect(cssClasses);
|
|
3338
3343
|
return (React.createElement("div", { className: this.question.renderCssRoot },
|
|
3339
3344
|
select,
|
|
@@ -3849,7 +3854,6 @@ class SurveyQuestionRadiogroup extends SurveyQuestionElementBase {
|
|
|
3849
3854
|
? this.getColumnedBody(cssClasses)
|
|
3850
3855
|
: this.getBody(cssClasses),
|
|
3851
3856
|
this.getFooter(),
|
|
3852
|
-
this.question.isOtherSelected ? this.renderOther(cssClasses) : null,
|
|
3853
3857
|
clearButton));
|
|
3854
3858
|
}
|
|
3855
3859
|
getFooter() {
|
|
@@ -3888,10 +3892,6 @@ class SurveyQuestionRadiogroup extends SurveyQuestionElementBase {
|
|
|
3888
3892
|
get textStyle() {
|
|
3889
3893
|
return null; //{ display: "inline", position: "static" };
|
|
3890
3894
|
}
|
|
3891
|
-
renderOther(cssClasses) {
|
|
3892
|
-
return (React.createElement("div", { className: this.question.getCommentAreaCss(true) },
|
|
3893
|
-
React.createElement(SurveyQuestionOtherValueItem, { question: this.question, otherCss: cssClasses.other, cssClasses: cssClasses, isDisplayMode: this.isDisplayMode })));
|
|
3894
|
-
}
|
|
3895
3895
|
renderItem(item, value, cssClasses, index) {
|
|
3896
3896
|
const renderedItem = ReactElementFactory.Instance.createElement(this.question.itemComponent, {
|
|
3897
3897
|
key: item.value,
|
|
@@ -3976,6 +3976,17 @@ class SurveyQuestionRadioItem extends ReactSurveyElement {
|
|
|
3976
3976
|
}
|
|
3977
3977
|
}
|
|
3978
3978
|
renderElement() {
|
|
3979
|
+
return React.createElement(React.Fragment, null,
|
|
3980
|
+
this.renderRadioButton(),
|
|
3981
|
+
this.renderComment());
|
|
3982
|
+
}
|
|
3983
|
+
renderComment() {
|
|
3984
|
+
if (!this.item.isCommentShowing)
|
|
3985
|
+
return null;
|
|
3986
|
+
return React.createElement("div", { className: this.question.getCommentAreaCss(true) },
|
|
3987
|
+
React.createElement(SurveyQuestionCommentValueItem, { question: this.question, item: this.item, isDisplayMode: this.isDisplayMode, cssClasses: this.question.cssClasses, otherCss: this.question.getCommentAreaCss(false) }));
|
|
3988
|
+
}
|
|
3989
|
+
renderRadioButton() {
|
|
3979
3990
|
var itemClass = this.question.getItemClass(this.item);
|
|
3980
3991
|
var labelClass = this.question.getLabelClass(this.item);
|
|
3981
3992
|
var controlLabelClass = this.question.getControlLabelClass(this.item);
|
|
@@ -4599,7 +4610,7 @@ class SurveyQuestionMatrixDropdownCell extends SurveyQuestionAndErrorsCell {
|
|
|
4599
4610
|
renderOtherComment() {
|
|
4600
4611
|
const question = this.cell.question;
|
|
4601
4612
|
const cssClasses = question.cssClasses || {};
|
|
4602
|
-
return React.createElement(
|
|
4613
|
+
return React.createElement(SurveyQuestionCommentValueItem, { question: question, item: question.otherItem, cssClasses: cssClasses, otherCss: cssClasses.other, isDisplayMode: question.isInputReadOnly });
|
|
4603
4614
|
}
|
|
4604
4615
|
renderCellCheckboxButton() {
|
|
4605
4616
|
var key = this.cell.question.id + "item" + this.cell.choiceIndex;
|
|
@@ -5277,7 +5288,7 @@ class SurveyQuestionExpression extends SurveyQuestionElementBase {
|
|
|
5277
5288
|
}
|
|
5278
5289
|
renderElement() {
|
|
5279
5290
|
var cssClasses = this.question.cssClasses;
|
|
5280
|
-
return (React.createElement("div", { id: this.question.inputId, className: cssClasses.root, ref: (div) => (this.setControl(div)) }, this.question.formatedValue));
|
|
5291
|
+
return (React.createElement("div", { id: this.question.inputId, className: cssClasses.root, ref: (div) => (this.setControl(div)), "aria-live": "polite", "aria-label": this.question.formatedValue }, this.question.formatedValue));
|
|
5281
5292
|
}
|
|
5282
5293
|
}
|
|
5283
5294
|
ReactQuestionFactory.Instance.registerQuestion("expression", (props) => {
|
|
@@ -5516,7 +5527,7 @@ class SurveyQuestionImagePickerItem extends ReactSurveyElement {
|
|
|
5516
5527
|
}
|
|
5517
5528
|
const renderedItem = (React.createElement("div", { className: itemClass },
|
|
5518
5529
|
React.createElement("label", { className: cssClasses.label },
|
|
5519
|
-
React.createElement("input", { className: cssClasses.itemControl, id: this.question.getItemId(item), type: this.question.inputType, name: this.question.questionName, checked: isChecked, value: item.value, disabled: !this.question.getItemEnabled(item), readOnly: this.question.isReadOnlyAttr, onChange: this.handleOnChange,
|
|
5530
|
+
React.createElement("input", { className: cssClasses.itemControl, id: this.question.getItemId(item), type: this.question.inputType, name: this.question.questionName, checked: isChecked, value: item.value, disabled: !this.question.getItemEnabled(item), readOnly: this.question.isReadOnlyAttr, onChange: this.handleOnChange, required: this.question.inputRequiredAttribute, "aria-label": item.locText.renderedHtml, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage }),
|
|
5520
5531
|
React.createElement("div", { className: this.question.cssClasses.itemDecorator },
|
|
5521
5532
|
React.createElement("div", { className: this.question.cssClasses.imageContainer },
|
|
5522
5533
|
!!this.question.cssClasses.checkedItemDecorator ?
|
|
@@ -6196,7 +6207,7 @@ ReactElementFactory.Instance.registerElement(LocalizableString.editableRenderer,
|
|
|
6196
6207
|
return React.createElement(SurveyLocStringEditor, props);
|
|
6197
6208
|
});
|
|
6198
6209
|
|
|
6199
|
-
checkLibraryVersion(`${"2.2.
|
|
6210
|
+
checkLibraryVersion(`${"2.2.6"}`, "survey-react-ui");
|
|
6200
6211
|
|
|
6201
6212
|
export { CharacterCounterComponent, ComponentsContainer, Header, HeaderCell, HeaderMobile, List, ListItemContent, ListItemGroup, LoadingIndicatorComponent, LogoImage, MatrixRow, NotifierComponent, Popup, PopupModal, PopupSurvey, QuestionErrorComponent, RatingDropdownItem, RatingItem, RatingItemSmiley, RatingItemStar, ReactElementFactory, ReactQuestionFactory, ReactSurveyElement, ReactSurveyElementsWrapper, Scroll, Skeleton, SliderLabelItem, 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, SurveyQuestionSlider, SurveyQuestionTagbox, SurveyQuestionTagboxItem, SurveyQuestionText, SurveyRow, SurveyTimerPanel, SurveyWindow, SvgBundleComponent, SvgIcon, TagboxFilterString, TitleActions, TitleElement, attachKey2click };
|
|
6202
6213
|
//# sourceMappingURL=survey-react-ui.mjs.map
|