survey-creator-react 2.0.3 → 2.0.4
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator React v2.0.
|
|
2
|
+
* SurveyJS Creator React v2.0.4
|
|
3
3
|
* (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* Github: https://github.com/surveyjs/survey-creator
|
|
5
5
|
* License: https://surveyjs.io/Licenses#SurveyCreator
|
|
@@ -26,7 +26,7 @@ class TabbedMenuComponent extends SurveyElementBase {
|
|
|
26
26
|
}
|
|
27
27
|
renderElement() {
|
|
28
28
|
const items = this.model.renderedActions.map((item) => React.createElement(TabbedMenuItemWrapper, { item: item, key: item.renderedId }));
|
|
29
|
-
return (React.createElement("div", { ref: this.rootRef, className: "svc-tabbed-menu" }, items));
|
|
29
|
+
return (React.createElement("div", { ref: this.rootRef, className: "svc-tabbed-menu", role: "tablist" }, items));
|
|
30
30
|
}
|
|
31
31
|
componentDidMount() {
|
|
32
32
|
super.componentDidMount();
|
|
@@ -1467,11 +1467,9 @@ class SurveyCreatorToolboxCategory extends SurveyElementBase {
|
|
|
1467
1467
|
renderButton() {
|
|
1468
1468
|
if (!this.toolbox.canCollapseCategories)
|
|
1469
1469
|
return null;
|
|
1470
|
-
const iconName = this.category.
|
|
1471
|
-
const suffixName = this.category.collapsed ? "expand" : "collapse";
|
|
1472
|
-
const svgIconClassName = "svc-toolbox__category-header__button svc-string-editor__button--" + suffixName;
|
|
1470
|
+
const iconName = this.category.iconName;
|
|
1473
1471
|
return (React.createElement("div", { className: "svc-toolbox__category-header__controls" },
|
|
1474
|
-
React.createElement(SvgIcon, { className:
|
|
1472
|
+
React.createElement(SvgIcon, { className: this.category.iconClassName, iconName: iconName, size: "auto" })));
|
|
1475
1473
|
}
|
|
1476
1474
|
renderCategoryContent() {
|
|
1477
1475
|
return this.renderItems(this.category.items);
|
|
@@ -2062,7 +2060,7 @@ class SurveyLogicOpertor extends SurveyQuestionDropdown {
|
|
|
2062
2060
|
return (React.createElement("div", { id: this.question.inputId, className: q.getControlClass(), tabIndex: this.question.isInputReadOnly ? undefined : 0,
|
|
2063
2061
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2064
2062
|
// @ts-ignore
|
|
2065
|
-
disabled: this.question.isInputReadOnly, required: this.question.isRequired, onChange: this.updateValueOnEvent, onInput: this.updateValueOnEvent, onKeyUp: this.keyhandler, role: this.question.ariaRole, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-
|
|
2063
|
+
disabled: this.question.isInputReadOnly, required: this.question.isRequired, onChange: this.updateValueOnEvent, onInput: this.updateValueOnEvent, onKeyUp: this.keyhandler, role: this.question.ariaRole, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-labelledby": this.question.ariaLabelledBy, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage, "aria-expanded": this.question.ariaExpanded },
|
|
2066
2064
|
React.createElement("div", { className: this.question.cssClasses.controlValue },
|
|
2067
2065
|
text,
|
|
2068
2066
|
React.createElement("div", null, q.readOnlyText)),
|
|
@@ -2655,7 +2653,7 @@ class SurveyQuestionSpinEditor extends SurveyQuestionText {
|
|
|
2655
2653
|
}
|
|
2656
2654
|
renderInput() {
|
|
2657
2655
|
return (React.createElement(React.Fragment, null,
|
|
2658
|
-
React.createElement("input", { id: this.question.inputId, disabled: this.isDisplayMode, className: this.question.cssClasses.control, ref: (input) => (this.setControl(input)), placeholder: this.question.renderedPlaceholder, autoComplete: "off", onBlur: (event) => this.question.onBlur(event.nativeEvent), onFocus: (event) => this.question.onFocus(event.nativeEvent), onChange: this.question.onChange, onBeforeInput: event => this.question.onBeforeInput(event.nativeEvent), onKeyUp: (event) => this.question.onKeyUp(event.nativeEvent), onKeyDown: (event) => this.question.onInputKeyDown(event.nativeEvent), "aria-required": this.question.
|
|
2656
|
+
React.createElement("input", { role: "spinbutton", id: this.question.inputId, disabled: this.isDisplayMode, className: this.question.cssClasses.control, ref: (input) => (this.setControl(input)), placeholder: this.question.renderedPlaceholder, autoComplete: "off", onBlur: (event) => this.question.onBlur(event.nativeEvent), onFocus: (event) => this.question.onFocus(event.nativeEvent), onChange: this.question.onChange, onBeforeInput: event => this.question.onBeforeInput(event.nativeEvent), onKeyUp: (event) => this.question.onKeyUp(event.nativeEvent), onKeyDown: (event) => this.question.onInputKeyDown(event.nativeEvent), "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage })));
|
|
2659
2657
|
}
|
|
2660
2658
|
renderElement() {
|
|
2661
2659
|
return (React.createElement("div", { className: this.question.cssClasses.root, onKeyDown: event => this.question.onKeyDown(event.nativeEvent) },
|
|
@@ -2667,9 +2665,9 @@ class SurveyQuestionSpinEditor extends SurveyQuestionText {
|
|
|
2667
2665
|
}
|
|
2668
2666
|
renderButtons() {
|
|
2669
2667
|
return (React.createElement("span", { className: this.question.cssClasses.buttonsContainer },
|
|
2670
|
-
React.createElement("button", { tabIndex: -1, className: this.question.cssClasses.arrowButton, disabled: this.isDisplayMode, onClick: this.question.onDownButtonClick, onMouseDown: this.question.onDownButtonMouseDown, onMouseUp: this.question.onButtonMouseUp, onMouseLeave: this.question.onButtonMouseLeave, onBlur: event => this.question.onBlur(event.nativeEvent), onFocus: event => this.question.onFocus(event.nativeEvent) },
|
|
2668
|
+
React.createElement("button", { tabIndex: -1, "aria-hidden": "true", className: this.question.cssClasses.arrowButton, disabled: this.isDisplayMode, onClick: this.question.onDownButtonClick, onMouseDown: this.question.onDownButtonMouseDown, onMouseUp: this.question.onButtonMouseUp, onMouseLeave: this.question.onButtonMouseLeave, onBlur: event => this.question.onBlur(event.nativeEvent), onFocus: event => this.question.onFocus(event.nativeEvent) },
|
|
2671
2669
|
React.createElement(SvgIcon, { iconName: this.question.cssClasses.decreaseButtonIcon, size: "auto" })),
|
|
2672
|
-
React.createElement("button", { tabIndex: -1, className: this.question.cssClasses.arrowButton, disabled: this.isDisplayMode, onClick: this.question.onUpButtonClick, onMouseDown: this.question.onUpButtonMouseDown, onMouseUp: this.question.onButtonMouseUp, onMouseLeave: this.question.onButtonMouseLeave, onBlur: event => this.question.onBlur(event.nativeEvent), onFocus: event => this.question.onFocus(event.nativeEvent) },
|
|
2670
|
+
React.createElement("button", { tabIndex: -1, "aria-hidden": "true", className: this.question.cssClasses.arrowButton, disabled: this.isDisplayMode, onClick: this.question.onUpButtonClick, onMouseDown: this.question.onUpButtonMouseDown, onMouseUp: this.question.onButtonMouseUp, onMouseLeave: this.question.onButtonMouseLeave, onBlur: event => this.question.onBlur(event.nativeEvent), onFocus: event => this.question.onFocus(event.nativeEvent) },
|
|
2673
2671
|
React.createElement(SvgIcon, { iconName: this.question.cssClasses.increaseButtonIcon, size: "auto" }))));
|
|
2674
2672
|
}
|
|
2675
2673
|
}
|
|
@@ -2698,7 +2696,7 @@ class SurveyQuestionColor extends SurveyQuestionText {
|
|
|
2698
2696
|
}
|
|
2699
2697
|
renderInput() {
|
|
2700
2698
|
return (React.createElement(React.Fragment, null,
|
|
2701
|
-
React.createElement("input", { id: this.question.inputId, disabled: this.isDisplayMode, className: this.question.cssClasses.control, ref: (input) => (this.setControl(input)), placeholder: this.question.renderedPlaceholder, autoComplete: "off", onKeyUp: (event) => this.question.onKeyUp(event.nativeEvent), onBlur: (event) => this.question.onBlur(event.nativeEvent), onChange: this.question.onChange, onBeforeInput: event => this.question.onBeforeInput(event.nativeEvent), "aria-required": this.question.
|
|
2699
|
+
React.createElement("input", { id: this.question.inputId, disabled: this.isDisplayMode, className: this.question.cssClasses.control, ref: (input) => (this.setControl(input)), placeholder: this.question.renderedPlaceholder, autoComplete: "off", onKeyUp: (event) => this.question.onKeyUp(event.nativeEvent), onBlur: (event) => this.question.onBlur(event.nativeEvent), onChange: this.question.onChange, onBeforeInput: event => this.question.onBeforeInput(event.nativeEvent), "aria-required": this.question.a11y_input_ariaRequired, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-label": this.question.a11y_input_ariaLabel, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-describedby": this.question.a11y_input_ariaDescribedBy })));
|
|
2702
2700
|
}
|
|
2703
2701
|
renderElement() {
|
|
2704
2702
|
return (React.createElement("div", { className: this.question.cssClasses.root, onKeyDown: event => this.question.onKeyDown(event.nativeEvent) },
|
|
@@ -2712,11 +2710,11 @@ class SurveyQuestionColor extends SurveyQuestionText {
|
|
|
2712
2710
|
renderColorSwatch() {
|
|
2713
2711
|
return React.createElement("label", { className: this.question.getSwatchCss(), style: this.question.getSwatchStyle() },
|
|
2714
2712
|
React.createElement(SvgIcon, { iconName: this.question.cssClasses.swatchIcon, size: "auto" }),
|
|
2715
|
-
React.createElement("input", { type: "color", disabled: this.isDisplayMode, value: this.question.renderedColorValue, className: this.question.cssClasses.colorInput, onChange: (event) => this.question.onColorInputChange(event.nativeEvent), tabIndex: -1 }));
|
|
2713
|
+
React.createElement("input", { type: "color", disabled: this.isDisplayMode, value: this.question.renderedColorValue, className: this.question.cssClasses.colorInput, onChange: (event) => this.question.onColorInputChange(event.nativeEvent), tabIndex: -1, "aria-required": this.question.a11y_input_ariaRequired, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-label": this.question.a11y_input_ariaLabel, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-describedby": this.question.a11y_input_ariaDescribedBy }));
|
|
2716
2714
|
}
|
|
2717
2715
|
renderDropdownAction() {
|
|
2718
2716
|
return (React.createElement(React.Fragment, null,
|
|
2719
|
-
ReactElementFactory.Instance.createElement("sv-action-bar-item", { item: this.question.dropdownAction }),
|
|
2717
|
+
React.createElement("div", { "aria-hidden": "true", className: this.question.cssClasses.choicesButtonWrapper }, ReactElementFactory.Instance.createElement("sv-action-bar-item", { item: this.question.dropdownAction })),
|
|
2720
2718
|
this.renderPopup()));
|
|
2721
2719
|
}
|
|
2722
2720
|
renderPopup() {
|
|
@@ -2750,11 +2748,11 @@ class SurveyQuestionFileEditor extends SurveyQuestionText {
|
|
|
2750
2748
|
this.renderChooseButton()));
|
|
2751
2749
|
}
|
|
2752
2750
|
renderClearButton() {
|
|
2753
|
-
return attachKey2click((React.createElement("button", {
|
|
2754
|
-
React.createElement(SvgIcon, { iconName: this.questionFile.cssClasses.clearButtonIcon, size: "auto"
|
|
2751
|
+
return attachKey2click((React.createElement("button", { className: this.questionFile.cssClasses.clearButton, title: this.questionFile.clearButtonCaption, disabled: this.questionFile.getIsClearButtonDisabled(), onClick: this.questionFile.doClean },
|
|
2752
|
+
React.createElement(SvgIcon, { iconName: this.questionFile.cssClasses.clearButtonIcon, size: "auto" }))));
|
|
2755
2753
|
}
|
|
2756
2754
|
renderChooseButton() {
|
|
2757
|
-
return (attachKey2click(React.createElement("label", {
|
|
2755
|
+
return (attachKey2click(React.createElement("label", { onClick: event => this.questionFile.chooseFiles(event.nativeEvent), className: this.questionFile.getChooseButtonCss(), htmlFor: this.questionFile.inputId, "aria-label": this.questionFile.chooseButtonCaption },
|
|
2758
2756
|
React.createElement(SvgIcon, { iconName: this.questionFile.cssClasses.chooseButtonIcon, size: "auto", title: this.questionFile.chooseButtonCaption }))));
|
|
2759
2757
|
}
|
|
2760
2758
|
renderElement() {
|
|
@@ -2800,7 +2798,7 @@ ReactQuestionFactory.Instance.registerQuestion("commentwithreset", (props) => {
|
|
|
2800
2798
|
|
|
2801
2799
|
class SurveyQuestionBooleanSwitch extends SurveyQuestionElementBase {
|
|
2802
2800
|
renderElement() {
|
|
2803
|
-
const button = attachKey2click(React.createElement("div", { className: "spg-boolean-switch__button" + (this.questionBase.value ? " spg-boolean-switch__button--checked" : ""), tabIndex: 0, role: "checkbox", "aria-required": this.questionBase.
|
|
2801
|
+
const button = attachKey2click(React.createElement("div", { className: "spg-boolean-switch__button" + (this.questionBase.value ? " spg-boolean-switch__button--checked" : ""), tabIndex: 0, role: "checkbox", "aria-checked": this.questionBase.booleanValue || false, "aria-required": this.questionBase.a11y_input_ariaRequired, "aria-label": this.questionBase.a11y_input_ariaLabel, "aria-labelledby": this.questionBase.a11y_input_ariaLabelledBy, "aria-invalid": this.questionBase.a11y_input_ariaInvalid, "aria-errormessage": this.questionBase.a11y_input_ariaErrormessage },
|
|
2804
2802
|
React.createElement("div", { className: "spg-boolean-switch__thumb" },
|
|
2805
2803
|
React.createElement("div", { className: "spg-boolean-switch__thumb-circle spg-boolean-switch__thumb--left" })),
|
|
2806
2804
|
React.createElement("div", { className: "spg-boolean-switch__thumb" },
|
|
@@ -2808,7 +2806,7 @@ class SurveyQuestionBooleanSwitch extends SurveyQuestionElementBase {
|
|
|
2808
2806
|
return (React.createElement("div", { className: "spg-boolean-switch", onClick: () => this.questionBase.value = !this.questionBase.value },
|
|
2809
2807
|
button,
|
|
2810
2808
|
React.createElement("div", { className: "spg-boolean-switch__caption" },
|
|
2811
|
-
React.createElement("div", { className: "spg-boolean-switch__title" }, SurveyElementBase.renderLocString(this.questionBase.locTitle)))));
|
|
2809
|
+
React.createElement("div", { className: "spg-boolean-switch__title", id: this.questionBase.labelRenderedAriaID }, SurveyElementBase.renderLocString(this.questionBase.locTitle)))));
|
|
2812
2810
|
}
|
|
2813
2811
|
}
|
|
2814
2812
|
ReactQuestionFactory.Instance.registerQuestion("sv-boolean-switch", (props) => {
|
|
@@ -2817,8 +2815,8 @@ ReactQuestionFactory.Instance.registerQuestion("sv-boolean-switch", (props) => {
|
|
|
2817
2815
|
RendererFactory.Instance.registerRenderer("boolean", "switch", "sv-boolean-switch");
|
|
2818
2816
|
|
|
2819
2817
|
let Version;
|
|
2820
|
-
Version = `${"2.0.
|
|
2821
|
-
checkLibraryVersion(`${"2.0.
|
|
2818
|
+
Version = `${"2.0.4"}`;
|
|
2819
|
+
checkLibraryVersion(`${"2.0.4"}`, "survey-creator-react");
|
|
2822
2820
|
|
|
2823
2821
|
export { ActionButton, AdaptiveToolbox, CellQuestionAdornerComponent, CellQuestionDropdownAdornerComponent, CreatorSurveyPageComponent, ImageItemValueAdornerComponent, ItemValueAdornerComponent, LogoImageComponent, MatrixCellAdornerComponent, PanelAdornerComponent, PropertyGridComponent, PropertyGridPlaceholderComponent, QuestionAdornerComponent, QuestionBanner, QuestionDropdownAdornerComponent, QuestionEditorContentComponent, QuestionErrorComponent, QuestionImageAdornerComponent, QuestionRatingAdornerComponent, QuestionWidgetAdornerComponent, QuestionWrapperFooter, QuestionWrapperHeader, ReactDragEvent, ReactMouseEvent, RowWrapper, SearchComponent, SideBarDefaultHeader, SidebarComponent, SurveyCreator, SurveyCreatorComponent, SurveyCreatorToolboxCategory, SurveyCreatorToolboxItem, SurveyCreatorToolboxItemGroup, SurveyCreatorToolboxTool, SurveyElementEmbeddedSurvey, SurveyLocStringEditor, SurveyLogicOpertor, SurveyNavigation, SurveyQuestionBooleanSwitch, SurveyQuestionColor, SurveyQuestionFileEditor, SurveyQuestionLinkValue, SurveyQuestionSpinEditor, SurveyQuestionTextWithReset, SurveyResults, SurveyResultsByRow, SurveySimulator, SwitcherComponent, TabButtonComponent, TabDesignerComponent, TabJsonEditorAceComponent, TabJsonEditorErrorsComponent, TabJsonEditorTextareaComponent, TabLogicAddButtonComponent, TabLogicComponent, TabPreviewSurveyComponent, TabPreviewTestSurveyAgainComponent, TabThemeSurveyComponent, TabTranslationComponent, TabbedMenuComponent, TabbedMenuItemComponent, ToolboxList, TranslateFromAction, TranslationLineSkeleton, Version };
|
|
2824
2822
|
//# sourceMappingURL=survey-creator-react.mjs.map
|