survey-creator-react 1.12.29 → 1.12.31
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-react.js → survey-creator-react.mjs} +15 -44
- package/fesm/survey-creator-react.mjs.map +1 -0
- package/package.json +4 -4
- package/survey-creator-react.js +3 -3
- package/survey-creator-react.min.js +1 -1
- package/survey-creator-react.min.js.LICENSE.txt +1 -1
- package/fesm/survey-creator-react.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator React v2.0.
|
|
2
|
+
* SurveyJS Creator React v2.0.3
|
|
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
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
import { createElement, Fragment } from 'react';
|
|
10
10
|
import * as ReactDOM from 'react-dom';
|
|
11
|
-
import { ReactElementFactory, SurveyElementBase, attachKey2click, SvgIcon, Survey, SvgBundleComponent, PopupModal, SurveyActionBar, NotifierComponent, ReactQuestionFactory, SurveyLocStringViewer, TitleElement, ReactSurveyElementsWrapper, LoadingIndicatorComponent, SurveyPage, Popup, LogoImage, SurveyQuestionElementBase, SurveyQuestion, CharacterCounterComponent, SurveyQuestionDropdown, SurveyHeader, List, SurveyQuestionButtonGroup, SurveyQuestionText } from 'survey-react-ui';
|
|
12
|
-
import { assign, SurveyCreatorModel, RowViewModel, QuestionAdornerViewModel, QuestionDropdownAdornerViewModel, QuestionImageAdornerViewModel, QuestionRatingAdornerViewModel, PageAdorner, LogoImageViewModel, editorLocalization, ItemValueWrapperViewModel, ImageItemValueWrapperViewModel, MatrixCellWrapperViewModel, SurveyResultsModel, ToolboxToolViewModel,
|
|
11
|
+
import { ReactElementFactory, SurveyElementBase, attachKey2click, SvgIcon, Survey, SvgBundleComponent, PopupModal, SurveyActionBar, NotifierComponent, ReactQuestionFactory, SurveyLocStringViewer, TitleElement, ReactSurveyElementsWrapper, LoadingIndicatorComponent, SurveyPage, Popup, LogoImage, SurveyQuestionElementBase, SurveyQuestion, Scroll, CharacterCounterComponent, SurveyQuestionDropdown, SurveyHeader, List, SurveyQuestionButtonGroup, SurveyQuestionText } from 'survey-react-ui';
|
|
12
|
+
import { assign, SurveyCreatorModel, RowViewModel, QuestionAdornerViewModel, QuestionDropdownAdornerViewModel, QuestionImageAdornerViewModel, QuestionRatingAdornerViewModel, PageAdorner, LogoImageViewModel, editorLocalization, ItemValueWrapperViewModel, ImageItemValueWrapperViewModel, MatrixCellWrapperViewModel, SurveyResultsModel, ToolboxToolViewModel, editableStringRendererName, StringEditorViewModelBase, initLogicOperator, PageNavigatorViewModel } from 'survey-creator-core';
|
|
13
13
|
export { PropertyGridEditorCollection, SurveyLogic, SurveyLogicUI, SurveyQuestionEditorDefinition, ToolboxToolViewModel, editorLocalization, localization, settings, svgBundle } from 'survey-creator-core';
|
|
14
14
|
import { ResponsivityManager, CssClassBuilder, settings, VerticalResponsivityManager, RendererFactory, unwrap, checkLibraryVersion } from 'survey-core';
|
|
15
15
|
|
|
@@ -94,7 +94,7 @@ class TabbedMenuItemComponent extends SurveyElementBase {
|
|
|
94
94
|
}
|
|
95
95
|
render() {
|
|
96
96
|
const item = this.item;
|
|
97
|
-
return (attachKey2click(React.createElement("div", { className: item.getRootCss(), onClick: () => item.action(item) },
|
|
97
|
+
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) },
|
|
98
98
|
item.hasTitle ? React.createElement("span", { className: item.getTitleCss() }, item.title) : null,
|
|
99
99
|
item.hasIcon ? React.createElement(SvgIcon, { iconName: item.iconName, className: item.getIconCss(), size: "auto", title: item.tooltip || item.title }) : null)));
|
|
100
100
|
}
|
|
@@ -198,7 +198,7 @@ class SurveyCreatorComponent extends SurveyElementBase {
|
|
|
198
198
|
data: tab.data.model
|
|
199
199
|
});
|
|
200
200
|
const className = "svc-creator-tab" + (creator.toolboxLocation == "right" ? " svc-creator__toolbox--right" : "");
|
|
201
|
-
return (React.createElement("div", { key: tab.id, id: "scrollableDiv-" + tab.id, className: className }, component));
|
|
201
|
+
return (React.createElement("div", { role: "tabpanel", key: tab.id, id: "scrollableDiv-" + tab.id, "aria-labelledby": "tab-" + tab.id, className: className }, component));
|
|
202
202
|
}
|
|
203
203
|
renderSidebar() {
|
|
204
204
|
if (!!this.creator.sidebar) {
|
|
@@ -830,7 +830,7 @@ class AddQuestionButtonComponent extends SurveyElementBase {
|
|
|
830
830
|
return attachKey2click(React.createElement("button", { type: "button", onClick: (e) => {
|
|
831
831
|
e.stopPropagation();
|
|
832
832
|
questionTypeSelectorModel.action();
|
|
833
|
-
}, className: "svc-element__question-type-selector", title: this.model.addNewQuestionText },
|
|
833
|
+
}, className: "svc-element__question-type-selector", title: this.model.addNewQuestionText, role: "button" },
|
|
834
834
|
React.createElement("span", { className: "svc-element__question-type-selector-icon" },
|
|
835
835
|
React.createElement(SvgIcon, { iconName: questionTypeSelectorModel.iconName, size: "auto", title: this.model.addNewQuestionText })),
|
|
836
836
|
this.props.renderPopup === undefined || this.props.renderPopup ?
|
|
@@ -1547,34 +1547,6 @@ ReactElementFactory.Instance.registerElement("svc-search", (props) => {
|
|
|
1547
1547
|
return React.createElement(SearchComponent, props);
|
|
1548
1548
|
});
|
|
1549
1549
|
|
|
1550
|
-
class ScrollComponent extends React.Component {
|
|
1551
|
-
constructor(props) {
|
|
1552
|
-
super(props);
|
|
1553
|
-
this.rootRef = React.createRef();
|
|
1554
|
-
this.model = new ScrollViewModel();
|
|
1555
|
-
}
|
|
1556
|
-
componentDidMount() {
|
|
1557
|
-
const container = this.rootRef.current;
|
|
1558
|
-
if (!container)
|
|
1559
|
-
return;
|
|
1560
|
-
this.model.setRootElement(container);
|
|
1561
|
-
}
|
|
1562
|
-
componentWillUnmount() {
|
|
1563
|
-
this.model.unsubscribeRootElement();
|
|
1564
|
-
this.model.setRootElement(undefined);
|
|
1565
|
-
}
|
|
1566
|
-
render() {
|
|
1567
|
-
return React.createElement("div", { ref: this.rootRef, className: "svc-scroll__wrapper" },
|
|
1568
|
-
React.createElement("div", { className: "svc-scroll__scroller sv-drag-target-skipped", onScroll: () => this.model.onScrollContainer() },
|
|
1569
|
-
React.createElement("div", { className: "svc-scroll__container" }, this.props.children)),
|
|
1570
|
-
React.createElement("div", { className: "svc-scroll__scrollbar", onScroll: () => this.model.onScrollScrollbar() },
|
|
1571
|
-
React.createElement("div", { className: "svc-scroll__scrollbar-sizer" })));
|
|
1572
|
-
}
|
|
1573
|
-
}
|
|
1574
|
-
ReactElementFactory.Instance.registerElement("svc-scroll", (props) => {
|
|
1575
|
-
return React.createElement(ScrollComponent, props);
|
|
1576
|
-
});
|
|
1577
|
-
|
|
1578
1550
|
class AdaptiveToolbox extends SurveyElementBase {
|
|
1579
1551
|
constructor(props) {
|
|
1580
1552
|
super(props);
|
|
@@ -1631,7 +1603,7 @@ class AdaptiveToolbox extends SurveyElementBase {
|
|
|
1631
1603
|
React.createElement("div", { onBlur: (e) => this.toolbox.focusOut(e), className: "svc-toolbox__panel" },
|
|
1632
1604
|
search,
|
|
1633
1605
|
placeholder,
|
|
1634
|
-
React.createElement(
|
|
1606
|
+
React.createElement(Scroll, null, (this.toolbox.showInSingleCategory) ?
|
|
1635
1607
|
(React.createElement("div", { className: "svc-toolbox__category" }, this.renderItems(this.toolbox.renderedActions, this.toolbox.isCompactRendered)))
|
|
1636
1608
|
: this.renderCategories()))));
|
|
1637
1609
|
}
|
|
@@ -1738,7 +1710,7 @@ class TabControl extends SurveyElementBase {
|
|
|
1738
1710
|
React.createElement(TabButtonComponent, { model: this.props.model.expandCollapseAction })),
|
|
1739
1711
|
React.createElement("div", { className: "svc-sidebar-tabs__separator" },
|
|
1740
1712
|
React.createElement("div", null)),
|
|
1741
|
-
React.createElement(
|
|
1713
|
+
React.createElement(Scroll, null,
|
|
1742
1714
|
React.createElement("div", { className: "svc-sidebar-tabs__items" },
|
|
1743
1715
|
React.createElement(TabsComponent, { model: this.props.model.topToolbar })))),
|
|
1744
1716
|
React.createElement("div", { className: "svc-sidebar-tabs__bottom-container" },
|
|
@@ -2136,7 +2108,7 @@ class SurveyPageNavigator extends CreatorModelElement {
|
|
|
2136
2108
|
if (this.model.isPopupOpened)
|
|
2137
2109
|
className += " svc-page-navigator__button--pressed";
|
|
2138
2110
|
return (React.createElement("div", { className: "svc-page-navigator", ref: this.containerRef, style: { display: this.model.visible ? "flex" : "none" } },
|
|
2139
|
-
attachKey2click(React.createElement("div", { className: className, onClick: () => this.model.togglePageSelector(), title: this.model.pageSelectorCaption },
|
|
2111
|
+
attachKey2click(React.createElement("div", { role: "button", className: className, onClick: () => this.model.togglePageSelector(), title: this.model.pageSelectorCaption },
|
|
2140
2112
|
React.createElement(SvgIcon, { className: "svc-page-navigator__button-icon", iconName: this.model.icon, size: "auto", title: this.model.pageSelectorCaption }),
|
|
2141
2113
|
React.createElement(Popup, { model: this.model.popupModel }))),
|
|
2142
2114
|
React.createElement("div", null, this.model.visibleItems.map((item) => (React.createElement(SurveyPageNavigatorItem, { key: item.id, item: item }))))));
|
|
@@ -2155,7 +2127,7 @@ class SurveyPageNavigatorItem extends CreatorModelElement {
|
|
|
2155
2127
|
if (unwrap(item.disabled)) {
|
|
2156
2128
|
className += " svc-page-navigator-item--disabled";
|
|
2157
2129
|
}
|
|
2158
|
-
return (React.createElement("div", { className: "svc-page-navigator-item" }, attachKey2click(React.createElement("div", { className: className, onClick: (e) => {
|
|
2130
|
+
return (React.createElement("div", { className: "svc-page-navigator-item" }, attachKey2click(React.createElement("div", { role: "button", className: className, onClick: (e) => {
|
|
2159
2131
|
item.action(item);
|
|
2160
2132
|
e.stopPropagation();
|
|
2161
2133
|
} },
|
|
@@ -2251,7 +2223,7 @@ class TabDesignerComponent extends SurveyElementBase {
|
|
|
2251
2223
|
return (React.createElement(React.Fragment, null,
|
|
2252
2224
|
React.createElement("div", { className: "svc-flex-column" }, this.model.isToolboxVisible ? ReactElementFactory.Instance.createElement("svc-toolbox", { model: this.creator }) : null),
|
|
2253
2225
|
React.createElement("div", { className: designerTabClassName, onClick: () => this.model.clickDesigner() },
|
|
2254
|
-
React.createElement(
|
|
2226
|
+
React.createElement(Scroll, null,
|
|
2255
2227
|
React.createElement("div", { className: "svc-tab-designer_content" }, this.model.showPlaceholder ? this.renderPlaceHolder() : this.renderTabContent())))));
|
|
2256
2228
|
}
|
|
2257
2229
|
renderHeader(condition) {
|
|
@@ -2621,8 +2593,7 @@ class PropertyGridComponent extends SurveyElementBase {
|
|
|
2621
2593
|
renderElement() {
|
|
2622
2594
|
return (React.createElement("div", { className: this.model.rootCss },
|
|
2623
2595
|
React.createElement(SearchComponent, { model: this.model.searchManager }),
|
|
2624
|
-
React.createElement(
|
|
2625
|
-
React.createElement(Survey, { model: this.model.survey }))));
|
|
2596
|
+
React.createElement(Survey, { model: this.model.survey })));
|
|
2626
2597
|
}
|
|
2627
2598
|
}
|
|
2628
2599
|
ReactQuestionFactory.Instance.registerQuestion("buttongroup", (props) => {
|
|
@@ -2846,8 +2817,8 @@ ReactQuestionFactory.Instance.registerQuestion("sv-boolean-switch", (props) => {
|
|
|
2846
2817
|
RendererFactory.Instance.registerRenderer("boolean", "switch", "sv-boolean-switch");
|
|
2847
2818
|
|
|
2848
2819
|
let Version;
|
|
2849
|
-
Version = `${"2.0.
|
|
2850
|
-
checkLibraryVersion(`${"2.0.
|
|
2820
|
+
Version = `${"2.0.3"}`;
|
|
2821
|
+
checkLibraryVersion(`${"2.0.3"}`, "survey-creator-react");
|
|
2851
2822
|
|
|
2852
2823
|
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 };
|
|
2853
|
-
//# sourceMappingURL=survey-creator-react.
|
|
2824
|
+
//# sourceMappingURL=survey-creator-react.mjs.map
|