survey-js-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-js-ui.mjs +41 -30
- package/fesm/survey-js-ui.mjs.map +1 -1
- package/package.json +2 -2
- package/survey-js-ui.js +45 -34
- package/survey-js-ui.js.map +1 -1
- package/survey-js-ui.min.js +1 -1
- package/survey-js-ui.min.js.LICENSE.txt +1 -1
- package/typings/survey-react-ui/src/dropdown-base.d.ts +2 -2
- package/typings/survey-react-ui/src/reactquestion_checkbox.d.ts +1 -1
- package/typings/survey-react-ui/src/reactquestion_comment.d.ts +3 -1
- package/typings/survey-react-ui/src/reactquestion_radiogroup.d.ts +2 -1
package/fesm/survey-js-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
|
*/
|
|
@@ -1255,13 +1255,15 @@ class SurveyQuestionCommentItem extends ReactSurveyElement {
|
|
|
1255
1255
|
const comment = this.textAreaModel.getTextValue() || "";
|
|
1256
1256
|
return _$1("div", null, comment);
|
|
1257
1257
|
}
|
|
1258
|
-
return (_$1(TextAreaComponent, { viewModel: this.textAreaModel }));
|
|
1258
|
+
return (_$1(TextAreaComponent, { key: this.getKey(), viewModel: this.textAreaModel }));
|
|
1259
1259
|
}
|
|
1260
|
+
getKey() { return undefined; }
|
|
1260
1261
|
}
|
|
1261
|
-
class
|
|
1262
|
+
class SurveyQuestionCommentValueItem extends SurveyQuestionCommentItem {
|
|
1262
1263
|
getTextAreaModel() {
|
|
1263
|
-
return this.props.question.
|
|
1264
|
+
return this.props.question.getCommentTextAreaModel(this.props.item);
|
|
1264
1265
|
}
|
|
1266
|
+
getKey() { return this.props.item.normalizedId; }
|
|
1265
1267
|
}
|
|
1266
1268
|
ReactQuestionFactory.Instance.registerQuestion("comment", (props) => {
|
|
1267
1269
|
return _$1(SurveyQuestionComment, props);
|
|
@@ -1978,7 +1980,7 @@ class PopupModal extends SurveyElementBase {
|
|
|
1978
1980
|
PopupModal.modalDescriptors = [];
|
|
1979
1981
|
|
|
1980
1982
|
/*!
|
|
1981
|
-
* surveyjs - Survey JavaScript library v2.2.
|
|
1983
|
+
* surveyjs - Survey JavaScript library v2.2.6
|
|
1982
1984
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
1983
1985
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
1984
1986
|
*/
|
|
@@ -2048,7 +2050,7 @@ var iconsV1 = {
|
|
|
2048
2050
|
};
|
|
2049
2051
|
|
|
2050
2052
|
/*!
|
|
2051
|
-
* surveyjs - Survey JavaScript library v2.2.
|
|
2053
|
+
* surveyjs - Survey JavaScript library v2.2.6
|
|
2052
2054
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
2053
2055
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
2054
2056
|
*/
|
|
@@ -2699,8 +2701,7 @@ class SurveyQuestionCheckbox extends SurveyQuestionElementBase {
|
|
|
2699
2701
|
this.question.hasColumns
|
|
2700
2702
|
? this.getColumnedBody(cssClasses)
|
|
2701
2703
|
: this.getBody(cssClasses),
|
|
2702
|
-
this.getFooter()
|
|
2703
|
-
this.question.isOtherSelected ? this.renderOther() : null));
|
|
2704
|
+
this.getFooter()));
|
|
2704
2705
|
}
|
|
2705
2706
|
getHeader() {
|
|
2706
2707
|
if (this.question.hasHeadItems) {
|
|
@@ -2733,7 +2734,6 @@ class SurveyQuestionCheckbox extends SurveyQuestionElementBase {
|
|
|
2733
2734
|
var renderedItems = [];
|
|
2734
2735
|
for (var i = 0; i < choices.length; i++) {
|
|
2735
2736
|
var item = choices[i];
|
|
2736
|
-
"item" + item.value;
|
|
2737
2737
|
var renderedItem = this.renderItem(item, i == 0, cssClasses, "" + i);
|
|
2738
2738
|
if (!!renderedItem) {
|
|
2739
2739
|
renderedItems.push(renderedItem);
|
|
@@ -2744,11 +2744,6 @@ class SurveyQuestionCheckbox extends SurveyQuestionElementBase {
|
|
|
2744
2744
|
get textStyle() {
|
|
2745
2745
|
return null;
|
|
2746
2746
|
}
|
|
2747
|
-
renderOther() {
|
|
2748
|
-
let cssClasses = this.question.cssClasses;
|
|
2749
|
-
return (_$1("div", { className: this.question.getCommentAreaCss(true) },
|
|
2750
|
-
_$1(SurveyQuestionOtherValueItem, { question: this.question, otherCss: cssClasses.other, cssClasses: cssClasses, isDisplayMode: this.isDisplayMode })));
|
|
2751
|
-
}
|
|
2752
2747
|
renderItem(item, isFirst, cssClasses, index) {
|
|
2753
2748
|
const renderedItem = ReactElementFactory.Instance.createElement(this.question.itemComponent, {
|
|
2754
2749
|
key: item.value,
|
|
@@ -2823,12 +2818,20 @@ class SurveyQuestionCheckboxItem extends ReactSurveyElement {
|
|
|
2823
2818
|
return !!this.item && !!this.question;
|
|
2824
2819
|
}
|
|
2825
2820
|
renderElement() {
|
|
2826
|
-
|
|
2827
|
-
return
|
|
2821
|
+
const isChecked = this.question.isItemSelected(this.item);
|
|
2822
|
+
return _$1(k$2, null,
|
|
2823
|
+
this.renderCheckbox(isChecked, null),
|
|
2824
|
+
this.renderComment());
|
|
2828
2825
|
}
|
|
2829
2826
|
get inputStyle() {
|
|
2830
2827
|
return null; //{ marginRight: "3px" };
|
|
2831
2828
|
}
|
|
2829
|
+
renderComment() {
|
|
2830
|
+
if (!this.item.isCommentShowing)
|
|
2831
|
+
return null;
|
|
2832
|
+
return _$1("div", { className: this.question.getCommentAreaCss(true) },
|
|
2833
|
+
_$1(SurveyQuestionCommentValueItem, { question: this.question, item: this.item, isDisplayMode: this.isDisplayMode, cssClasses: this.question.cssClasses, otherCss: this.question.getCommentAreaCss(false) }));
|
|
2834
|
+
}
|
|
2832
2835
|
renderCheckbox(isChecked, otherItem) {
|
|
2833
2836
|
const id = this.question.getItemId(this.item);
|
|
2834
2837
|
const itemClass = this.question.getItemClass(this.item);
|
|
@@ -3290,9 +3293,11 @@ class SurveyQuestionDropdownBase extends SurveyQuestionUncontrolledElement {
|
|
|
3290
3293
|
};
|
|
3291
3294
|
return _$1("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 });
|
|
3292
3295
|
}
|
|
3293
|
-
renderOther(cssClasses) {
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
+
renderOther(item, cssClasses) {
|
|
3297
|
+
if (!item || !item.isCommentShowing)
|
|
3298
|
+
return null;
|
|
3299
|
+
return (_$1("div", { key: item.normalizedId, className: this.question.getCommentAreaCss(true) },
|
|
3300
|
+
_$1(SurveyQuestionCommentValueItem, { question: this.question, item: item, isDisplayMode: this.isDisplayMode, cssClasses: this.question.cssClasses, otherCss: this.question.getCommentAreaCss(false) })));
|
|
3296
3301
|
}
|
|
3297
3302
|
renderEditorButtons() {
|
|
3298
3303
|
return _$1(SurveyActionBar, { model: this.dropdownListModel.editorButtons });
|
|
@@ -3327,7 +3332,7 @@ class SurveyQuestionDropdown extends SurveyQuestionDropdownBase {
|
|
|
3327
3332
|
}
|
|
3328
3333
|
renderElement() {
|
|
3329
3334
|
const cssClasses = this.question.cssClasses;
|
|
3330
|
-
const comment = this.question.
|
|
3335
|
+
const comment = this.renderOther(this.question.selectedItem, cssClasses);
|
|
3331
3336
|
const select = this.renderSelect(cssClasses);
|
|
3332
3337
|
return (_$1("div", { className: this.question.renderCssRoot },
|
|
3333
3338
|
select,
|
|
@@ -3386,7 +3391,7 @@ class SurveyQuestionTagbox extends SurveyQuestionDropdownBase {
|
|
|
3386
3391
|
}
|
|
3387
3392
|
renderElement() {
|
|
3388
3393
|
const cssClasses = this.question.cssClasses;
|
|
3389
|
-
const comment = this.question.
|
|
3394
|
+
const comment = this.renderOther(this.question.otherItem, cssClasses);
|
|
3390
3395
|
const select = this.renderSelect(cssClasses);
|
|
3391
3396
|
return (_$1("div", { className: this.question.renderCssRoot },
|
|
3392
3397
|
select,
|
|
@@ -3902,7 +3907,6 @@ class SurveyQuestionRadiogroup extends SurveyQuestionElementBase {
|
|
|
3902
3907
|
? this.getColumnedBody(cssClasses)
|
|
3903
3908
|
: this.getBody(cssClasses),
|
|
3904
3909
|
this.getFooter(),
|
|
3905
|
-
this.question.isOtherSelected ? this.renderOther(cssClasses) : null,
|
|
3906
3910
|
clearButton));
|
|
3907
3911
|
}
|
|
3908
3912
|
getFooter() {
|
|
@@ -3941,10 +3945,6 @@ class SurveyQuestionRadiogroup extends SurveyQuestionElementBase {
|
|
|
3941
3945
|
get textStyle() {
|
|
3942
3946
|
return null; //{ display: "inline", position: "static" };
|
|
3943
3947
|
}
|
|
3944
|
-
renderOther(cssClasses) {
|
|
3945
|
-
return (_$1("div", { className: this.question.getCommentAreaCss(true) },
|
|
3946
|
-
_$1(SurveyQuestionOtherValueItem, { question: this.question, otherCss: cssClasses.other, cssClasses: cssClasses, isDisplayMode: this.isDisplayMode })));
|
|
3947
|
-
}
|
|
3948
3948
|
renderItem(item, value, cssClasses, index) {
|
|
3949
3949
|
const renderedItem = ReactElementFactory.Instance.createElement(this.question.itemComponent, {
|
|
3950
3950
|
key: item.value,
|
|
@@ -4029,6 +4029,17 @@ class SurveyQuestionRadioItem extends ReactSurveyElement {
|
|
|
4029
4029
|
}
|
|
4030
4030
|
}
|
|
4031
4031
|
renderElement() {
|
|
4032
|
+
return _$1(k$2, null,
|
|
4033
|
+
this.renderRadioButton(),
|
|
4034
|
+
this.renderComment());
|
|
4035
|
+
}
|
|
4036
|
+
renderComment() {
|
|
4037
|
+
if (!this.item.isCommentShowing)
|
|
4038
|
+
return null;
|
|
4039
|
+
return _$1("div", { className: this.question.getCommentAreaCss(true) },
|
|
4040
|
+
_$1(SurveyQuestionCommentValueItem, { question: this.question, item: this.item, isDisplayMode: this.isDisplayMode, cssClasses: this.question.cssClasses, otherCss: this.question.getCommentAreaCss(false) }));
|
|
4041
|
+
}
|
|
4042
|
+
renderRadioButton() {
|
|
4032
4043
|
var itemClass = this.question.getItemClass(this.item);
|
|
4033
4044
|
var labelClass = this.question.getLabelClass(this.item);
|
|
4034
4045
|
var controlLabelClass = this.question.getControlLabelClass(this.item);
|
|
@@ -4652,7 +4663,7 @@ class SurveyQuestionMatrixDropdownCell extends SurveyQuestionAndErrorsCell {
|
|
|
4652
4663
|
renderOtherComment() {
|
|
4653
4664
|
const question = this.cell.question;
|
|
4654
4665
|
const cssClasses = question.cssClasses || {};
|
|
4655
|
-
return _$1(
|
|
4666
|
+
return _$1(SurveyQuestionCommentValueItem, { question: question, item: question.otherItem, cssClasses: cssClasses, otherCss: cssClasses.other, isDisplayMode: question.isInputReadOnly });
|
|
4656
4667
|
}
|
|
4657
4668
|
renderCellCheckboxButton() {
|
|
4658
4669
|
var key = this.cell.question.id + "item" + this.cell.choiceIndex;
|
|
@@ -5330,7 +5341,7 @@ class SurveyQuestionExpression extends SurveyQuestionElementBase {
|
|
|
5330
5341
|
}
|
|
5331
5342
|
renderElement() {
|
|
5332
5343
|
var cssClasses = this.question.cssClasses;
|
|
5333
|
-
return (_$1("div", { id: this.question.inputId, className: cssClasses.root, ref: (div) => (this.setControl(div)) }, this.question.formatedValue));
|
|
5344
|
+
return (_$1("div", { id: this.question.inputId, className: cssClasses.root, ref: (div) => (this.setControl(div)), "aria-live": "polite", "aria-label": this.question.formatedValue }, this.question.formatedValue));
|
|
5334
5345
|
}
|
|
5335
5346
|
}
|
|
5336
5347
|
ReactQuestionFactory.Instance.registerQuestion("expression", (props) => {
|
|
@@ -5569,7 +5580,7 @@ class SurveyQuestionImagePickerItem extends ReactSurveyElement {
|
|
|
5569
5580
|
}
|
|
5570
5581
|
const renderedItem = (_$1("div", { className: itemClass },
|
|
5571
5582
|
_$1("label", { className: cssClasses.label },
|
|
5572
|
-
_$1("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,
|
|
5583
|
+
_$1("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 }),
|
|
5573
5584
|
_$1("div", { className: this.question.cssClasses.itemDecorator },
|
|
5574
5585
|
_$1("div", { className: this.question.cssClasses.imageContainer },
|
|
5575
5586
|
!!this.question.cssClasses.checkedItemDecorator ?
|
|
@@ -6298,7 +6309,7 @@ SurveyModel.prototype["render"] = function (element = null) {
|
|
|
6298
6309
|
}
|
|
6299
6310
|
};
|
|
6300
6311
|
const preact = React;
|
|
6301
|
-
checkLibraryVersion(`${"2.2.
|
|
6312
|
+
checkLibraryVersion(`${"2.2.6"}`, "survey-js-ui");
|
|
6302
6313
|
|
|
6303
6314
|
export { CharacterCounterComponent, O as Children, x$2 as Component, ComponentsContainer, k$2 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, 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, P as Suspense, B as SuspenseList, SvgBundleComponent, SvgIcon, TagboxFilterString, TitleActions, TitleElement, attachKey2click, _n as cloneElement, K$1 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$1 as useCallback, x$1 as useContext, P$1 as useDebugValue, w as useDeferredValue, y as useEffect, g$1 as useId, F$1 as useImperativeHandle, I as useInsertionEffect, _ as useLayoutEffect, T$1 as useMemo, h as useReducer, A$1 as useRef, d as useState, C as useSyncExternalStore, k as useTransition, vn as version };
|
|
6304
6315
|
//# sourceMappingURL=survey-js-ui.mjs.map
|