survey-react-ui 2.1.0 → 2.1.1
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 +35 -43
- package/fesm/survey-react-ui.mjs.map +1 -1
- package/package.json +2 -2
- package/survey-react-ui.js +47 -49
- 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 +4 -4
- package/typings/src/dropdown-select.d.ts +1 -0
- package/typings/src/reactquestion_tagbox.d.ts +2 -3
package/fesm/survey-react-ui.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v2.1.
|
|
2
|
+
* surveyjs - Survey JavaScript library v2.1.1
|
|
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
|
*/
|
|
@@ -1925,7 +1925,7 @@ class PopupModal extends SurveyElementBase {
|
|
|
1925
1925
|
PopupModal.modalDescriptors = [];
|
|
1926
1926
|
|
|
1927
1927
|
/*!
|
|
1928
|
-
* surveyjs - Survey JavaScript library v2.1.
|
|
1928
|
+
* surveyjs - Survey JavaScript library v2.1.1
|
|
1929
1929
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
1930
1930
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
1931
1931
|
*/
|
|
@@ -1995,7 +1995,7 @@ var iconsV1 = {
|
|
|
1995
1995
|
};
|
|
1996
1996
|
|
|
1997
1997
|
/*!
|
|
1998
|
-
* surveyjs - Survey JavaScript library v2.1.
|
|
1998
|
+
* surveyjs - Survey JavaScript library v2.1.1
|
|
1999
1999
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
2000
2000
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
2001
2001
|
*/
|
|
@@ -3162,6 +3162,9 @@ class SurveyQuestionDropdownBase extends SurveyQuestionUncontrolledElement {
|
|
|
3162
3162
|
this.question.onFocus(event);
|
|
3163
3163
|
};
|
|
3164
3164
|
}
|
|
3165
|
+
get dropdownListModel() {
|
|
3166
|
+
return this.question["dropdownListModel"];
|
|
3167
|
+
}
|
|
3165
3168
|
getStateElement() {
|
|
3166
3169
|
return this.question["dropdownListModel"];
|
|
3167
3170
|
}
|
|
@@ -3173,7 +3176,7 @@ class SurveyQuestionDropdownBase extends SurveyQuestionUncontrolledElement {
|
|
|
3173
3176
|
}
|
|
3174
3177
|
renderReadOnlyElement() {
|
|
3175
3178
|
if (this.question.locReadOnlyText) {
|
|
3176
|
-
return this.renderLocString(this.question.locReadOnlyText);
|
|
3179
|
+
return (React.createElement("div", { className: this.question.cssClasses.controlValue }, this.renderLocString(this.question.locReadOnlyText)));
|
|
3177
3180
|
}
|
|
3178
3181
|
else {
|
|
3179
3182
|
return null;
|
|
@@ -3181,32 +3184,33 @@ class SurveyQuestionDropdownBase extends SurveyQuestionUncontrolledElement {
|
|
|
3181
3184
|
}
|
|
3182
3185
|
renderSelect(cssClasses) {
|
|
3183
3186
|
let selectElement = null;
|
|
3184
|
-
const dropdownListModel = this.
|
|
3187
|
+
const dropdownListModel = this.dropdownListModel;
|
|
3185
3188
|
if (this.question.isReadOnly) {
|
|
3186
3189
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
3187
3190
|
// @ts-ignore
|
|
3188
|
-
selectElement = React.createElement("div", { id: this.question.inputId, role: dropdownListModel === null || dropdownListModel === void 0 ? void 0 : dropdownListModel.ariaQuestionRole, "aria-label": dropdownListModel === null || dropdownListModel === void 0 ? void 0 : dropdownListModel.ariaQuestionLabel, "aria-labelledby": dropdownListModel === null || dropdownListModel === void 0 ? void 0 : dropdownListModel.ariaQuestionLabelledby, "aria-describedby": dropdownListModel === null || dropdownListModel === void 0 ? void 0 : dropdownListModel.ariaQuestionDescribedby, "aria-expanded": "false", "aria-readonly": "true", "aria-disabled": "true", tabIndex: this.question.isDisabledAttr ? undefined : 0, className: this.question.getControlClass(), ref: (div) => (this.setControl(div)) },
|
|
3191
|
+
selectElement = React.createElement("div", { id: this.question.inputId, role: dropdownListModel === null || dropdownListModel === void 0 ? void 0 : dropdownListModel.ariaQuestionRole, "aria-label": dropdownListModel === null || dropdownListModel === void 0 ? void 0 : dropdownListModel.ariaQuestionLabel, "aria-labelledby": dropdownListModel === null || dropdownListModel === void 0 ? void 0 : dropdownListModel.ariaQuestionLabelledby, "aria-describedby": dropdownListModel === null || dropdownListModel === void 0 ? void 0 : dropdownListModel.ariaQuestionDescribedby, "aria-expanded": "false", "aria-readonly": "true", "aria-disabled": "true", tabIndex: this.question.isDisabledAttr ? undefined : 0, className: this.question.getControlClass(), ref: (div) => (this.setControl(div)) },
|
|
3192
|
+
this.renderReadOnlyElement(),
|
|
3193
|
+
this.renderEditorButtons());
|
|
3189
3194
|
}
|
|
3190
3195
|
else {
|
|
3191
3196
|
selectElement = React.createElement(React.Fragment, null,
|
|
3192
|
-
this.renderInput(
|
|
3197
|
+
this.renderInput(),
|
|
3193
3198
|
React.createElement(Popup, { model: dropdownListModel.popupModel }));
|
|
3194
3199
|
}
|
|
3195
|
-
return (React.createElement("div", { className: cssClasses.selectWrapper, onClick: this.click },
|
|
3196
|
-
selectElement,
|
|
3197
|
-
this.createChevronButton()));
|
|
3200
|
+
return (React.createElement("div", { className: cssClasses.selectWrapper, onClick: this.click }, selectElement));
|
|
3198
3201
|
}
|
|
3199
|
-
renderValueElement(
|
|
3202
|
+
renderValueElement() {
|
|
3200
3203
|
if (this.question.showInputFieldComponent) {
|
|
3201
|
-
return ReactElementFactory.Instance.createElement(this.question.inputFieldComponentName, { item: dropdownListModel.getSelectedAction(), question: this.question });
|
|
3204
|
+
return ReactElementFactory.Instance.createElement(this.question.inputFieldComponentName, { item: this.dropdownListModel.getSelectedAction(), question: this.question });
|
|
3202
3205
|
}
|
|
3203
3206
|
else if (this.question.showSelectedItemLocText) {
|
|
3204
3207
|
return this.renderLocString(this.question.selectedItemLocText);
|
|
3205
3208
|
}
|
|
3206
3209
|
return null;
|
|
3207
3210
|
}
|
|
3208
|
-
renderInput(
|
|
3209
|
-
|
|
3211
|
+
renderInput() {
|
|
3212
|
+
const dropdownListModel = this.dropdownListModel;
|
|
3213
|
+
let valueElement = this.renderValueElement();
|
|
3210
3214
|
const { root } = settings.environment;
|
|
3211
3215
|
const onInputChange = (e) => {
|
|
3212
3216
|
if (e.target === root.activeElement) {
|
|
@@ -3227,25 +3231,15 @@ class SurveyQuestionDropdownBase extends SurveyQuestionUncontrolledElement {
|
|
|
3227
3231
|
React.createElement("span", null, dropdownListModel.hintStringSuffix))) : null,
|
|
3228
3232
|
valueElement,
|
|
3229
3233
|
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 })),
|
|
3230
|
-
this.
|
|
3231
|
-
}
|
|
3232
|
-
createClearButton() {
|
|
3233
|
-
if (!this.question.allowClear || !this.question.cssClasses.cleanButtonIconId)
|
|
3234
|
-
return null;
|
|
3235
|
-
const style = { display: !this.question.showClearButton ? "none" : "" };
|
|
3236
|
-
return (React.createElement("div", { className: this.question.cssClasses.cleanButton, style: style, onClick: this.clear, "aria-hidden": "true" },
|
|
3237
|
-
React.createElement(SvgIcon, { className: this.question.cssClasses.cleanButtonSvg, iconName: this.question.cssClasses.cleanButtonIconId, title: this.question.clearCaption, size: "auto" })));
|
|
3238
|
-
}
|
|
3239
|
-
createChevronButton() {
|
|
3240
|
-
if (!this.question.cssClasses.chevronButtonIconId)
|
|
3241
|
-
return null;
|
|
3242
|
-
return (React.createElement("div", { className: this.question.cssClasses.chevronButton, "aria-hidden": "true", onPointerDown: this.chevronPointerDown },
|
|
3243
|
-
React.createElement(SvgIcon, { className: this.question.cssClasses.chevronButtonSvg, iconName: this.question.cssClasses.chevronButtonIconId, size: "auto" })));
|
|
3234
|
+
this.renderEditorButtons()));
|
|
3244
3235
|
}
|
|
3245
3236
|
renderOther(cssClasses) {
|
|
3246
3237
|
return (React.createElement("div", { className: this.question.getCommentAreaCss(true) },
|
|
3247
3238
|
React.createElement(SurveyQuestionOtherValueItem, { question: this.question, otherCss: cssClasses.other, cssClasses: cssClasses, isDisplayMode: this.isDisplayMode, isOther: true })));
|
|
3248
3239
|
}
|
|
3240
|
+
renderEditorButtons() {
|
|
3241
|
+
return React.createElement(SurveyActionBar, { model: this.dropdownListModel.editorButtons });
|
|
3242
|
+
}
|
|
3249
3243
|
componentDidUpdate(prevProps, prevState) {
|
|
3250
3244
|
super.componentDidUpdate(prevProps, prevState);
|
|
3251
3245
|
this.updateInputDomElement();
|
|
@@ -3321,8 +3315,8 @@ class SurveyQuestionTagbox extends SurveyQuestionDropdownBase {
|
|
|
3321
3315
|
const renderedItem = (React.createElement(SurveyQuestionTagboxItem, { key: key, question: this.question, item: item }));
|
|
3322
3316
|
return renderedItem;
|
|
3323
3317
|
}
|
|
3324
|
-
renderInput(
|
|
3325
|
-
const
|
|
3318
|
+
renderInput() {
|
|
3319
|
+
const dropdownListModel = this.dropdownListModel;
|
|
3326
3320
|
const items = this.question.selectedChoices.map((choice, index) => { return this.renderItem("item" + index, choice); });
|
|
3327
3321
|
return (React.createElement("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: dropdownListModel.noTabIndex ? undefined : 0,
|
|
3328
3322
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -3330,8 +3324,8 @@ class SurveyQuestionTagbox extends SurveyQuestionDropdownBase {
|
|
|
3330
3324
|
disabled: this.question.isInputReadOnly, required: this.question.isRequired, onKeyDown: this.keyhandler, onBlur: this.blur, role: dropdownListModel.ariaQuestionRole, "aria-required": dropdownListModel.ariaQuestionRequired, "aria-invalid": dropdownListModel.ariaQuestionInvalid, "aria-errormessage": dropdownListModel.ariaQuestionErrorMessage, "aria-label": dropdownListModel.ariaQuestionLabel, "aria-labelledby": dropdownListModel.ariaQuestionLabelledby, "aria-describedby": dropdownListModel.ariaQuestionDescribedby, "aria-expanded": dropdownListModel.ariaQuestionExpanded, "aria-controls": dropdownListModel.ariaQuestionControls, "aria-activedescendant": dropdownListModel.ariaQuestionActivedescendant, ref: (div) => (this.setControl(div)) },
|
|
3331
3325
|
React.createElement("div", { className: this.question.cssClasses.controlValue },
|
|
3332
3326
|
items,
|
|
3333
|
-
React.createElement(TagboxFilterString, { model:
|
|
3334
|
-
this.
|
|
3327
|
+
React.createElement(TagboxFilterString, { model: dropdownListModel, question: this.question })),
|
|
3328
|
+
this.renderEditorButtons()));
|
|
3335
3329
|
}
|
|
3336
3330
|
renderElement() {
|
|
3337
3331
|
const cssClasses = this.question.cssClasses;
|
|
@@ -3341,14 +3335,6 @@ class SurveyQuestionTagbox extends SurveyQuestionDropdownBase {
|
|
|
3341
3335
|
select,
|
|
3342
3336
|
comment));
|
|
3343
3337
|
}
|
|
3344
|
-
renderReadOnlyElement() {
|
|
3345
|
-
if (this.question.locReadOnlyText) {
|
|
3346
|
-
return this.renderLocString(this.question.locReadOnlyText);
|
|
3347
|
-
}
|
|
3348
|
-
else {
|
|
3349
|
-
return null;
|
|
3350
|
-
}
|
|
3351
|
-
}
|
|
3352
3338
|
}
|
|
3353
3339
|
ReactQuestionFactory.Instance.registerQuestion("tagbox", (props) => {
|
|
3354
3340
|
return React.createElement(SurveyQuestionTagbox, props);
|
|
@@ -3376,6 +3362,12 @@ class SurveyQuestionDropdownSelect extends SurveyQuestionDropdown {
|
|
|
3376
3362
|
selectElement,
|
|
3377
3363
|
this.createChevronButton()));
|
|
3378
3364
|
}
|
|
3365
|
+
createChevronButton() {
|
|
3366
|
+
if (!this.question.cssClasses.chevronButtonIconId)
|
|
3367
|
+
return null;
|
|
3368
|
+
return (React.createElement("div", { className: this.question.cssClasses.chevronButton, "aria-hidden": "true", onPointerDown: this.chevronPointerDown },
|
|
3369
|
+
React.createElement(SvgIcon, { className: this.question.cssClasses.chevronButtonSvg, iconName: this.question.cssClasses.chevronButtonIconId, size: "auto" })));
|
|
3370
|
+
}
|
|
3379
3371
|
}
|
|
3380
3372
|
ReactQuestionFactory.Instance.registerQuestion("sv-dropdown-select", (props) => {
|
|
3381
3373
|
return React.createElement(SurveyQuestionDropdownSelect, props);
|
|
@@ -3562,7 +3554,7 @@ class SurveyQuestionMatrixCell extends ReactSurveyElement {
|
|
|
3562
3554
|
mobileSpan));
|
|
3563
3555
|
}
|
|
3564
3556
|
renderInput(inputId, isChecked) {
|
|
3565
|
-
return (React.createElement("input", { id: inputId, type: "radio", className: this.cssClasses.itemValue, name: this.row.fullName, value: this.column.value, disabled: this.row.isDisabledAttr, readOnly: this.row.isReadOnlyAttr, checked: isChecked, onChange: this.handleOnChange, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.getCellAriaLabel(this.row
|
|
3557
|
+
return (React.createElement("input", { id: inputId, type: "radio", className: this.cssClasses.itemValue, name: this.row.fullName, value: this.column.value, disabled: this.row.isDisabledAttr, readOnly: this.row.isReadOnlyAttr, checked: isChecked, onChange: this.handleOnChange, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.getCellAriaLabel(this.row, this.column), "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage }));
|
|
3566
3558
|
}
|
|
3567
3559
|
}
|
|
3568
3560
|
ReactElementFactory.Instance.registerElement("survey-matrix-cell", props => {
|
|
@@ -4614,7 +4606,7 @@ class SurveyQuestionMatrixDropdownCell extends SurveyQuestionAndErrorsCell {
|
|
|
4614
4606
|
return (React.createElement(SurveyQuestionRadioItem, { key: key, question: this.cell.question, cssClasses: this.cell.question.cssClasses, isDisplayMode: this.cell.question.isInputReadOnly, item: this.cell.item, index: this.cell.choiceIndex.toString(), isChecked: this.cell.question.value === this.cell.item.value, isDisabled: this.cell.question.isReadOnly || !this.cell.item.isEnabled, hideCaption: true, ariaLabel: this.getCellAriaLabel() }));
|
|
4615
4607
|
}
|
|
4616
4608
|
getCellAriaLabel() {
|
|
4617
|
-
return this.question.parentQuestion.getCellAriaLabel(this.cell.row
|
|
4609
|
+
return this.question.parentQuestion.getCellAriaLabel(this.cell.row, this.cell.column);
|
|
4618
4610
|
}
|
|
4619
4611
|
}
|
|
4620
4612
|
|
|
@@ -6179,7 +6171,7 @@ ReactElementFactory.Instance.registerElement(LocalizableString.editableRenderer,
|
|
|
6179
6171
|
return React.createElement(SurveyLocStringEditor, props);
|
|
6180
6172
|
});
|
|
6181
6173
|
|
|
6182
|
-
checkLibraryVersion(`${"2.1.
|
|
6174
|
+
checkLibraryVersion(`${"2.1.1"}`, "survey-react-ui");
|
|
6183
6175
|
|
|
6184
6176
|
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, 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 };
|
|
6185
6177
|
//# sourceMappingURL=survey-react-ui.mjs.map
|