survey-js-ui 2.3.0 → 2.3.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 +46 -43
- package/fesm/survey-js-ui.mjs.map +1 -1
- package/package.json +2 -2
- package/survey-js-ui.js +152 -143
- 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/entries/react-ui-model.d.ts +1 -0
- package/typings/survey-react-ui/src/boolean-radio.d.ts +0 -1
package/fesm/survey-js-ui.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v2.3.
|
|
2
|
+
* surveyjs - Survey JavaScript library v2.3.2
|
|
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
|
*/
|
|
@@ -1983,7 +1983,7 @@ class PopupModal extends SurveyElementBase {
|
|
|
1983
1983
|
PopupModal.modalDescriptors = [];
|
|
1984
1984
|
|
|
1985
1985
|
/*!
|
|
1986
|
-
* surveyjs - Survey JavaScript library v2.3.
|
|
1986
|
+
* surveyjs - Survey JavaScript library v2.3.2
|
|
1987
1987
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
1988
1988
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
1989
1989
|
*/
|
|
@@ -2053,7 +2053,7 @@ var iconsV1 = {
|
|
|
2053
2053
|
};
|
|
2054
2054
|
|
|
2055
2055
|
/*!
|
|
2056
|
-
* surveyjs - Survey JavaScript library v2.3.
|
|
2056
|
+
* surveyjs - Survey JavaScript library v2.3.2
|
|
2057
2057
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
2058
2058
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
2059
2059
|
*/
|
|
@@ -3747,12 +3747,22 @@ ReactElementFactory.Instance.registerElement("sv-file-choose-btn", (props) => {
|
|
|
3747
3747
|
return _$1(SurveyFileChooseButton, props);
|
|
3748
3748
|
});
|
|
3749
3749
|
|
|
3750
|
-
class
|
|
3750
|
+
class SurveyFilePage extends SurveyElementBase {
|
|
3751
3751
|
get question() {
|
|
3752
3752
|
return this.props.question;
|
|
3753
3753
|
}
|
|
3754
|
-
get
|
|
3755
|
-
return this.props.
|
|
3754
|
+
get page() {
|
|
3755
|
+
return this.props.page;
|
|
3756
|
+
}
|
|
3757
|
+
renderElement() {
|
|
3758
|
+
const items = this.page.items.map((item, index) => { return ReactElementFactory.Instance.createElement("sv-file-item", { item, question: this.question, key: index }); });
|
|
3759
|
+
return (_$1("div", { className: this.page.css, id: this.page.id }, items));
|
|
3760
|
+
}
|
|
3761
|
+
}
|
|
3762
|
+
|
|
3763
|
+
class SurveyFilePreview extends SurveyElementBase {
|
|
3764
|
+
get question() {
|
|
3765
|
+
return this.props.question;
|
|
3756
3766
|
}
|
|
3757
3767
|
renderFileSign(className, val) {
|
|
3758
3768
|
if (!className || !val.name)
|
|
@@ -3763,38 +3773,23 @@ class SurveyFileItem extends SurveyElementBase {
|
|
|
3763
3773
|
}, title: val.name, download: val.name, style: { width: this.question.imageWidth } }, val.name)));
|
|
3764
3774
|
}
|
|
3765
3775
|
renderElement() {
|
|
3766
|
-
const
|
|
3767
|
-
return
|
|
3768
|
-
this.renderFileSign(this.question.cssClasses.fileSign, val),
|
|
3769
|
-
_$1("div", { className: this.question.getImageWrapperCss(val) },
|
|
3770
|
-
this.question.canPreviewImage(val) ? (_$1("img", { src: val.content, style: { height: this.question.imageHeight, width: this.question.imageWidth }, alt: "File preview" })) : (this.question.cssClasses.defaultImage ? (_$1(SvgIcon, { iconName: this.question.cssClasses.defaultImageIconId, size: "auto", className: this.question.cssClasses.defaultImage })) : null),
|
|
3771
|
-
val.name && !this.question.isReadOnly ? (_$1("div", { className: this.question.getRemoveButtonCss(), onClick: (event) => this.question.doRemoveFile(val, event) },
|
|
3772
|
-
_$1("span", { className: this.question.cssClasses.removeFile }, this.question.removeFileCaption),
|
|
3773
|
-
(this.question.cssClasses.removeFileSvgIconId) ?
|
|
3774
|
-
(_$1(SvgIcon, { title: this.question.removeFileCaption, iconName: this.question.cssClasses.removeFileSvgIconId, size: "auto", className: this.question.cssClasses.removeFileSvg })) : null)) : null),
|
|
3775
|
-
this.renderFileSign(this.question.cssClasses.fileSignBottom, val)));
|
|
3776
|
+
const content = this.question.renderedPages.map((page, index) => { return (_$1(SurveyFilePage, { page: page, question: this.question, key: page.id })); });
|
|
3777
|
+
return _$1("div", { className: this.question.cssClasses.fileList || undefined }, content);
|
|
3776
3778
|
}
|
|
3777
3779
|
canRender() {
|
|
3778
3780
|
return this.question.showPreviewContainer;
|
|
3779
3781
|
}
|
|
3780
3782
|
}
|
|
3783
|
+
ReactElementFactory.Instance.registerElement("sv-file-preview", (props) => {
|
|
3784
|
+
return _$1(SurveyFilePreview, props);
|
|
3785
|
+
});
|
|
3781
3786
|
|
|
3782
|
-
class
|
|
3787
|
+
class SurveyFileItem extends SurveyElementBase {
|
|
3783
3788
|
get question() {
|
|
3784
3789
|
return this.props.question;
|
|
3785
3790
|
}
|
|
3786
|
-
get
|
|
3787
|
-
return this.props.
|
|
3788
|
-
}
|
|
3789
|
-
renderElement() {
|
|
3790
|
-
const items = this.page.items.map((item, index) => { return (_$1(SurveyFileItem, { item: item, question: this.question, key: index })); });
|
|
3791
|
-
return (_$1("div", { className: this.page.css, id: this.page.id }, items));
|
|
3792
|
-
}
|
|
3793
|
-
}
|
|
3794
|
-
|
|
3795
|
-
class SurveyFilePreview extends SurveyElementBase {
|
|
3796
|
-
get question() {
|
|
3797
|
-
return this.props.question;
|
|
3791
|
+
get item() {
|
|
3792
|
+
return this.props.item;
|
|
3798
3793
|
}
|
|
3799
3794
|
renderFileSign(className, val) {
|
|
3800
3795
|
if (!className || !val.name)
|
|
@@ -3805,15 +3800,23 @@ class SurveyFilePreview extends SurveyElementBase {
|
|
|
3805
3800
|
}, title: val.name, download: val.name, style: { width: this.question.imageWidth } }, val.name)));
|
|
3806
3801
|
}
|
|
3807
3802
|
renderElement() {
|
|
3808
|
-
const
|
|
3809
|
-
return _$1("
|
|
3803
|
+
const val = this.item;
|
|
3804
|
+
return (_$1("span", { className: this.question.cssClasses.previewItem, onClick: (event) => this.question.doDownloadFileFromContainer(event) },
|
|
3805
|
+
this.renderFileSign(this.question.cssClasses.fileSign, val),
|
|
3806
|
+
_$1("div", { className: this.question.getImageWrapperCss(val) },
|
|
3807
|
+
this.question.canPreviewImage(val) ? (_$1("img", { src: val.content, style: { height: this.question.imageHeight, width: this.question.imageWidth }, alt: "File preview" })) : (this.question.cssClasses.defaultImage ? (_$1(SvgIcon, { iconName: this.question.cssClasses.defaultImageIconId, size: "auto", className: this.question.cssClasses.defaultImage })) : null),
|
|
3808
|
+
val.name && !this.question.isReadOnly ? (_$1("div", { className: this.question.getRemoveButtonCss(), onClick: (event) => this.question.doRemoveFile(val, event) },
|
|
3809
|
+
_$1("span", { className: this.question.cssClasses.removeFile }, this.question.removeFileCaption),
|
|
3810
|
+
(this.question.cssClasses.removeFileSvgIconId) ?
|
|
3811
|
+
(_$1(SvgIcon, { title: this.question.removeFileCaption, iconName: this.question.cssClasses.removeFileSvgIconId, size: "auto", className: this.question.cssClasses.removeFileSvg })) : null)) : null),
|
|
3812
|
+
this.renderFileSign(this.question.cssClasses.fileSignBottom, val)));
|
|
3810
3813
|
}
|
|
3811
3814
|
canRender() {
|
|
3812
3815
|
return this.question.showPreviewContainer;
|
|
3813
3816
|
}
|
|
3814
3817
|
}
|
|
3815
|
-
ReactElementFactory.Instance.registerElement("sv-file-
|
|
3816
|
-
return _$1(
|
|
3818
|
+
ReactElementFactory.Instance.registerElement("sv-file-item", (props) => {
|
|
3819
|
+
return _$1(SurveyFileItem, props);
|
|
3817
3820
|
});
|
|
3818
3821
|
|
|
3819
3822
|
class SurveyQuestionMultipleText extends SurveyQuestionElementBase {
|
|
@@ -4234,15 +4237,15 @@ RendererFactory.Instance.registerRenderer("boolean", "checkbox", "sv-boolean-che
|
|
|
4234
4237
|
class SurveyQuestionBooleanRadio extends SurveyQuestionBoolean {
|
|
4235
4238
|
constructor(props) {
|
|
4236
4239
|
super(props);
|
|
4237
|
-
this.handleOnChange = (event) => {
|
|
4238
|
-
this.question.booleanValue = event.nativeEvent.target.value == "true";
|
|
4239
|
-
};
|
|
4240
4240
|
}
|
|
4241
4241
|
renderRadioItem(value, locText) {
|
|
4242
4242
|
const cssClasses = this.question.cssClasses;
|
|
4243
|
+
const handleOnChange = () => {
|
|
4244
|
+
this.question.value = value;
|
|
4245
|
+
};
|
|
4243
4246
|
return (_$1("div", { role: "presentation", className: this.question.getRadioItemClass(cssClasses, value) },
|
|
4244
4247
|
_$1("label", { className: cssClasses.radioLabel },
|
|
4245
|
-
_$1("input", { type: "radio", name: this.question.name, value: value, "aria-errormessage": this.question.ariaErrormessage, checked: value === this.question.
|
|
4248
|
+
_$1("input", { type: "radio", name: this.question.name, 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 }),
|
|
4246
4249
|
this.question.cssClasses.materialRadioDecorator ?
|
|
4247
4250
|
(_$1("span", { className: cssClasses.materialRadioDecorator }, this.question.itemSvgIcon ?
|
|
4248
4251
|
(_$1("svg", { className: cssClasses.itemRadioDecorator },
|
|
@@ -4254,12 +4257,12 @@ class SurveyQuestionBooleanRadio extends SurveyQuestionBoolean {
|
|
|
4254
4257
|
return (_$1("div", { className: cssClasses.rootRadio },
|
|
4255
4258
|
_$1("fieldset", { role: "presentation", className: cssClasses.radioFieldset }, !this.question.swapOrder ?
|
|
4256
4259
|
(_$1(k$2, null,
|
|
4257
|
-
this.renderRadioItem(
|
|
4258
|
-
this.renderRadioItem(
|
|
4260
|
+
this.renderRadioItem(this.question.getValueFalse(), this.question.locLabelFalse),
|
|
4261
|
+
this.renderRadioItem(this.question.getValueTrue(), this.question.locLabelTrue)))
|
|
4259
4262
|
:
|
|
4260
4263
|
(_$1(k$2, null,
|
|
4261
|
-
this.renderRadioItem(
|
|
4262
|
-
this.renderRadioItem(
|
|
4264
|
+
this.renderRadioItem(this.question.getValueTrue(), this.question.locLabelTrue),
|
|
4265
|
+
this.renderRadioItem(this.question.getValueFalse(), this.question.locLabelFalse))))));
|
|
4263
4266
|
}
|
|
4264
4267
|
}
|
|
4265
4268
|
ReactQuestionFactory.Instance.registerQuestion("sv-boolean-radio", (props) => {
|
|
@@ -6313,7 +6316,7 @@ SurveyModel.prototype["render"] = function (element = null) {
|
|
|
6313
6316
|
}
|
|
6314
6317
|
};
|
|
6315
6318
|
const preact = React;
|
|
6316
|
-
checkLibraryVersion(`${"2.3.
|
|
6319
|
+
checkLibraryVersion(`${"2.3.2"}`, "survey-js-ui");
|
|
6317
6320
|
|
|
6318
|
-
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, Q$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 };
|
|
6321
|
+
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, SurveyFileItem, 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, Q$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 };
|
|
6319
6322
|
//# sourceMappingURL=survey-js-ui.mjs.map
|