survey-react-ui 3.0.0-beta.7 → 3.0.0-beta.8
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 +26 -3
- package/fesm/survey-react-ui.mjs.map +1 -1
- package/package.json +2 -2
- package/survey-react-ui.js +29 -2
- package/survey-react-ui.js.map +1 -1
- package/survey-react-ui.min.js +2 -2
- package/typings/entries/react-ui-model.d.ts +1 -0
- package/typings/src/boolean-switch.d.ts +6 -0
package/fesm/survey-react-ui.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v3.0.0-beta.
|
|
2
|
+
* surveyjs - Survey JavaScript library v3.0.0-beta.8
|
|
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
|
*/
|
|
@@ -4284,6 +4284,29 @@ ReactQuestionFactory.Instance.registerQuestion("sv-boolean-radio", (props) => {
|
|
|
4284
4284
|
});
|
|
4285
4285
|
RendererFactory.Instance.registerRenderer("boolean", "radio", "sv-boolean-radio");
|
|
4286
4286
|
|
|
4287
|
+
class SurveyQuestionBooleanSwitch extends SurveyQuestionBoolean {
|
|
4288
|
+
constructor(props) {
|
|
4289
|
+
super(props);
|
|
4290
|
+
}
|
|
4291
|
+
renderElement() {
|
|
4292
|
+
const cssClasses = this.question.cssClasses;
|
|
4293
|
+
const buttonClass = this.question.getSwitchButtonCss();
|
|
4294
|
+
const button = attachKey2click(React.createElement("div", { className: buttonClass, tabIndex: 0, role: "checkbox", "aria-checked": this.question.booleanValue || false, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage },
|
|
4295
|
+
React.createElement("div", { className: cssClasses.switchThumb },
|
|
4296
|
+
React.createElement("div", { className: cssClasses.switchThumbCircle + " " + cssClasses.switchThumbLeft })),
|
|
4297
|
+
React.createElement("div", { className: cssClasses.switchThumb },
|
|
4298
|
+
React.createElement("div", { className: cssClasses.switchThumbCircle + " " + cssClasses.switchThumbRight }))), this.question, { processEsc: false });
|
|
4299
|
+
return (React.createElement("div", { className: cssClasses.rootSwitch, onClick: () => this.question.booleanValue = !this.question.booleanValue },
|
|
4300
|
+
button,
|
|
4301
|
+
React.createElement("div", { className: cssClasses.switchCaption },
|
|
4302
|
+
React.createElement("div", { className: cssClasses.switchTitle, id: this.question.labelRenderedAriaID }, SurveyElementBase.renderLocString(this.question.locTitle)))));
|
|
4303
|
+
}
|
|
4304
|
+
}
|
|
4305
|
+
ReactQuestionFactory.Instance.registerQuestion("sv-boolean-switch", (props) => {
|
|
4306
|
+
return React.createElement(SurveyQuestionBooleanSwitch, props);
|
|
4307
|
+
});
|
|
4308
|
+
RendererFactory.Instance.registerRenderer("boolean", "switch", "sv-boolean-switch");
|
|
4309
|
+
|
|
4287
4310
|
class SurveyQuestionEmpty extends SurveyQuestionElementBase {
|
|
4288
4311
|
constructor(props) {
|
|
4289
4312
|
super(props);
|
|
@@ -6086,7 +6109,7 @@ ReactElementFactory.Instance.registerElement(LocalizableString.editableRenderer,
|
|
|
6086
6109
|
return React.createElement(SurveyLocStringEditor, props);
|
|
6087
6110
|
});
|
|
6088
6111
|
|
|
6089
|
-
checkLibraryVersion(`${"3.0.0-beta.
|
|
6112
|
+
checkLibraryVersion(`${"3.0.0-beta.8"}`, "survey-react-ui");
|
|
6090
6113
|
|
|
6091
|
-
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, SurveyFileItem, SurveyFilePreview, SurveyFlowPanel, SurveyHeader, SurveyLocStringEditor, SurveyLocStringViewer, SurveyNavigationBase, 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, 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, SvgBundleComponent, SvgIcon, TagboxFilterString, TitleActions, TitleElement, attachKey2click };
|
|
6114
|
+
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, 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, SvgBundleComponent, SvgIcon, TagboxFilterString, TitleActions, TitleElement, attachKey2click };
|
|
6092
6115
|
//# sourceMappingURL=survey-react-ui.mjs.map
|