survey-creator-js 2.0.0 → 2.0.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-creator-js.js +15 -12
- package/fesm/survey-creator-js.js.map +1 -1
- package/package.json +11 -4
- package/survey-creator-js.js +15 -13
- package/survey-creator-js.js.map +1 -1
- package/survey-creator-js.min.js +1 -1
- package/survey-creator-js.min.js.LICENSE.txt +1 -1
- package/typings/survey-creator-react/src/QuestionEditorContent.d.ts +1 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator UI v2.0.
|
|
2
|
+
* SurveyJS Creator UI v2.0.2
|
|
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
|
|
@@ -92,7 +92,7 @@ class TabbedMenuItemComponent extends SurveyElementBase {
|
|
|
92
92
|
}
|
|
93
93
|
render() {
|
|
94
94
|
const item = this.item;
|
|
95
|
-
return (attachKey2click(React.createElement("div", { className: item.getRootCss(), onClick: () => item.action(item) },
|
|
95
|
+
return (attachKey2click(React.createElement("div", { role: "tab", id: "tab-" + item.id, "aria-selected": item.active, "aria-controls": "scrollableDiv-" + item.id, className: item.getRootCss(), onClick: () => item.action(item) },
|
|
96
96
|
item.hasTitle ? React.createElement("span", { className: item.getTitleCss() }, item.title) : null,
|
|
97
97
|
item.hasIcon ? React.createElement(SvgIcon, { iconName: item.iconName, className: item.getIconCss(), size: "auto", title: item.tooltip || item.title }) : null)));
|
|
98
98
|
}
|
|
@@ -196,7 +196,7 @@ class SurveyCreatorComponent extends SurveyElementBase {
|
|
|
196
196
|
data: tab.data.model
|
|
197
197
|
});
|
|
198
198
|
const className = "svc-creator-tab" + (creator.toolboxLocation == "right" ? " svc-creator__toolbox--right" : "");
|
|
199
|
-
return (React.createElement("div", { key: tab.id, id: "scrollableDiv-" + tab.id, className: className }, component));
|
|
199
|
+
return (React.createElement("div", { role: "tabpanel", key: tab.id, id: "scrollableDiv-" + tab.id, "aria-labelledby": "tab-" + tab.id, className: className }, component));
|
|
200
200
|
}
|
|
201
201
|
renderSidebar() {
|
|
202
202
|
if (!!this.creator.sidebar) {
|
|
@@ -785,9 +785,9 @@ class CreatorSurveyPageComponent extends CreatorModelElement {
|
|
|
785
785
|
}, onDoubleClick: e => this.model.dblclick(e.nativeEvent), onMouseLeave: (e) => this.model.hover(e.nativeEvent, e.currentTarget), onMouseOver: (e) => this.model.hover(e.nativeEvent, e.currentTarget) },
|
|
786
786
|
React.createElement("div", { className: "svc-question__drop-indicator svc-question__drop-indicator--top" }),
|
|
787
787
|
React.createElement("div", { className: "svc-question__drop-indicator svc-question__drop-indicator--bottom" }),
|
|
788
|
-
this.renderHeader(),
|
|
789
788
|
this.renderContent(),
|
|
790
789
|
this.renderPlaceholder(),
|
|
790
|
+
this.renderHeader(),
|
|
791
791
|
this.renderFooter())));
|
|
792
792
|
}
|
|
793
793
|
renderPlaceholder() {
|
|
@@ -828,7 +828,7 @@ class AddQuestionButtonComponent extends SurveyElementBase {
|
|
|
828
828
|
return attachKey2click(React.createElement("button", { type: "button", onClick: (e) => {
|
|
829
829
|
e.stopPropagation();
|
|
830
830
|
questionTypeSelectorModel.action();
|
|
831
|
-
}, className: "svc-element__question-type-selector", title: this.model.addNewQuestionText },
|
|
831
|
+
}, className: "svc-element__question-type-selector", title: this.model.addNewQuestionText, role: "button" },
|
|
832
832
|
React.createElement("span", { className: "svc-element__question-type-selector-icon" },
|
|
833
833
|
React.createElement(SvgIcon, { iconName: questionTypeSelectorModel.iconName, size: "auto", title: this.model.addNewQuestionText })),
|
|
834
834
|
this.props.renderPopup === undefined || this.props.renderPopup ?
|
|
@@ -1023,7 +1023,7 @@ class QuestionEditorContentComponent extends React.Component {
|
|
|
1023
1023
|
}
|
|
1024
1024
|
render() {
|
|
1025
1025
|
const question = this.survey.getAllQuestions()[0];
|
|
1026
|
-
return (React.createElement(
|
|
1026
|
+
return (React.createElement("div", { style: this.props.style },
|
|
1027
1027
|
React.createElement(SurveyQuestion, { creator: this, element: question })));
|
|
1028
1028
|
}
|
|
1029
1029
|
}
|
|
@@ -1706,10 +1706,13 @@ class TabButtonComponent extends SurveyElementBase {
|
|
|
1706
1706
|
return this.props.model;
|
|
1707
1707
|
}
|
|
1708
1708
|
renderElement() {
|
|
1709
|
-
const
|
|
1709
|
+
const model = this.props.model;
|
|
1710
|
+
if (!model.visible)
|
|
1711
|
+
return null;
|
|
1712
|
+
const button = attachKey2click(React.createElement("div", { className: model.buttonClassName, title: model.tooltip, onClick: () => { model.action(); } },
|
|
1710
1713
|
React.createElement("div", { className: "svc-menu-action__icon" },
|
|
1711
1714
|
React.createElement("div", { className: "svc-menu-action__icon-container" },
|
|
1712
|
-
React.createElement(SvgIcon, { iconName:
|
|
1715
|
+
React.createElement(SvgIcon, { iconName: model.iconName, size: "auto" })))), model);
|
|
1713
1716
|
return (React.createElement("div", { className: "svc-menu-action" }, button));
|
|
1714
1717
|
}
|
|
1715
1718
|
}
|
|
@@ -2131,7 +2134,7 @@ class SurveyPageNavigator extends CreatorModelElement {
|
|
|
2131
2134
|
if (this.model.isPopupOpened)
|
|
2132
2135
|
className += " svc-page-navigator__button--pressed";
|
|
2133
2136
|
return (React.createElement("div", { className: "svc-page-navigator", ref: this.containerRef, style: { display: this.model.visible ? "flex" : "none" } },
|
|
2134
|
-
attachKey2click(React.createElement("div", { className: className, onClick: () => this.model.togglePageSelector(), title: this.model.pageSelectorCaption },
|
|
2137
|
+
attachKey2click(React.createElement("div", { role: "button", className: className, onClick: () => this.model.togglePageSelector(), title: this.model.pageSelectorCaption },
|
|
2135
2138
|
React.createElement(SvgIcon, { className: "svc-page-navigator__button-icon", iconName: this.model.icon, size: "auto", title: this.model.pageSelectorCaption }),
|
|
2136
2139
|
React.createElement(Popup, { model: this.model.popupModel }))),
|
|
2137
2140
|
React.createElement("div", null, this.model.visibleItems.map((item) => (React.createElement(SurveyPageNavigatorItem, { key: item.id, item: item }))))));
|
|
@@ -2150,7 +2153,7 @@ class SurveyPageNavigatorItem extends CreatorModelElement {
|
|
|
2150
2153
|
if (unwrap(item.disabled)) {
|
|
2151
2154
|
className += " svc-page-navigator-item--disabled";
|
|
2152
2155
|
}
|
|
2153
|
-
return (React.createElement("div", { className: "svc-page-navigator-item" }, attachKey2click(React.createElement("div", { className: className, onClick: (e) => {
|
|
2156
|
+
return (React.createElement("div", { className: "svc-page-navigator-item" }, attachKey2click(React.createElement("div", { role: "button", className: className, onClick: (e) => {
|
|
2154
2157
|
item.action(item);
|
|
2155
2158
|
e.stopPropagation();
|
|
2156
2159
|
} },
|
|
@@ -2841,8 +2844,8 @@ ReactQuestionFactory.Instance.registerQuestion("sv-boolean-switch", (props) => {
|
|
|
2841
2844
|
RendererFactory.Instance.registerRenderer("boolean", "switch", "sv-boolean-switch");
|
|
2842
2845
|
|
|
2843
2846
|
let Version;
|
|
2844
|
-
Version = `${"2.0.
|
|
2845
|
-
checkLibraryVersion(`${"2.0.
|
|
2847
|
+
Version = `${"2.0.2"}`;
|
|
2848
|
+
checkLibraryVersion(`${"2.0.2"}`, "survey-creator-react");
|
|
2846
2849
|
|
|
2847
2850
|
const jQuery = window["jQuery"] || window["$"];
|
|
2848
2851
|
function renderSurveyCreator(creator, element, props = {}) {
|