survey-creator-react 3.0.0-beta.0 → 3.0.0-beta.1
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/README.md +1 -1
- package/fesm/survey-creator-react.mjs +33 -51
- package/fesm/survey-creator-react.mjs.map +1 -1
- package/fesm/ui-preset-editor/index.mjs +1 -1
- package/package.json +4 -4
- package/survey-creator-react.js +3704 -5717
- package/survey-creator-react.js.map +1 -1
- package/survey-creator-react.min.js +7 -2
- package/typings/QuestionEmbeddedSurvey.d.ts +4 -3
- package/typings/entries/index-wc.d.ts +0 -1
- package/ui-preset-editor/index.js +149 -349
- package/ui-preset-editor/index.js.map +1 -1
- package/ui-preset-editor/index.min.js +7 -2
- package/index.html +0 -50
- package/survey-creator-react.min.js.LICENSE.txt +0 -6
- package/typings/custom-questions/TextWithResetQuestion.d.ts +0 -9
- package/typings/entries/helpers.d.ts +0 -4
- package/typings/entries/presets.d.ts +0 -3
- package/typings/ui-preset-editor/Presets.d.ts +0 -16
- package/typings/ui-preset-editor/PresetsIconItem.d.ts +0 -10
- package/typings/ui-preset-editor/PresetsPropertyGrid.d.ts +0 -10
- package/ui-preset-editor/index.min.js.LICENSE.txt +0 -6
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<video src="https://github.com/surveyjs/survey-creator/assets/22315929/884eeb5b-68e6-4d38-a8f9-d2483e6ce386"></video>
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
[](https://dev.azure.com/SurveyJS/V2%20Libraries/_build/latest?definitionId=149&repoName=surveyjs%2Fsurvey-creator&branchName=master)
|
|
8
8
|
<a href="https://www.npmjs.com/package/survey-creator"><img alt="NPM Version" src="https://img.shields.io/npm/v/survey-creator.svg" data-canonical-src="https://img.shields.io/npm/v/survey-creator.svg" style="max-width:100%;"></a>
|
|
9
9
|
|
|
10
10
|
A visual designer that enables you and your users to create and modify surveys and forms in your React application.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator
|
|
2
|
+
* SurveyJS Creator v3.0.0-beta.1
|
|
3
3
|
* (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* Github: https://github.com/surveyjs/survey-creator
|
|
5
5
|
* License: https://surveyjs.io/Licenses#SurveyCreator
|
|
@@ -194,17 +194,11 @@ class SurveyCreatorComponent extends SurveyElementBase {
|
|
|
194
194
|
}
|
|
195
195
|
renderActiveTab() {
|
|
196
196
|
const creator = this.props.creator;
|
|
197
|
-
|
|
198
|
-
if (creator.tabs[i].id === creator.activeTab) {
|
|
199
|
-
return this.renderCreatorTab(creator.tabs[i]);
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
return null;
|
|
197
|
+
return this.renderCreatorTab(creator.activeTabMenuItem);
|
|
203
198
|
}
|
|
204
199
|
renderCreatorTab(tab) {
|
|
205
|
-
if (tab
|
|
200
|
+
if (!tab)
|
|
206
201
|
return null;
|
|
207
|
-
}
|
|
208
202
|
const creator = this.props.creator;
|
|
209
203
|
const component = !!tab.renderTab
|
|
210
204
|
? tab.renderTab()
|
|
@@ -1024,19 +1018,34 @@ ReactQuestionFactory.Instance.registerQuestion("linkvalue", (props) => {
|
|
|
1024
1018
|
});
|
|
1025
1019
|
|
|
1026
1020
|
class SurveyElementEmbeddedSurvey extends SurveyQuestionElementBase {
|
|
1021
|
+
constructor() {
|
|
1022
|
+
super(...arguments);
|
|
1023
|
+
this.rootRef = React.createRef();
|
|
1024
|
+
}
|
|
1027
1025
|
get embeddedSurvey() {
|
|
1028
|
-
|
|
1026
|
+
const element = (this.props.element || this.props.question);
|
|
1027
|
+
if (!element)
|
|
1028
|
+
return null;
|
|
1029
|
+
const survey = element.embeddedSurvey;
|
|
1030
|
+
if (!survey || !survey.currentPage)
|
|
1031
|
+
return null;
|
|
1032
|
+
return survey;
|
|
1029
1033
|
}
|
|
1030
1034
|
get creator() {
|
|
1031
1035
|
return this.props.creator;
|
|
1032
1036
|
}
|
|
1037
|
+
componentDidMount() {
|
|
1038
|
+
super.componentDidMount();
|
|
1039
|
+
if (this.embeddedSurvey) {
|
|
1040
|
+
this.embeddedSurvey.rootElement = this.rootRef.current;
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1033
1043
|
render() {
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
const survey = this.embeddedSurvey.embeddedSurvey;
|
|
1037
|
-
if (!survey || !survey.currentPage)
|
|
1044
|
+
const survey = this.embeddedSurvey;
|
|
1045
|
+
if (!survey)
|
|
1038
1046
|
return null;
|
|
1039
|
-
return React.createElement(
|
|
1047
|
+
return React.createElement("div", { style: { display: "contents" }, ref: this.rootRef },
|
|
1048
|
+
React.createElement(SurveyPage, { survey: survey, page: survey.currentPage, css: survey.css, creator: this.creator }));
|
|
1040
1049
|
}
|
|
1041
1050
|
}
|
|
1042
1051
|
ReactQuestionFactory.Instance.registerQuestion("embeddedsurvey", (props) => {
|
|
@@ -1605,9 +1614,12 @@ class SearchComponent extends SurveyElementBase {
|
|
|
1605
1614
|
if (!this.model.isVisible)
|
|
1606
1615
|
return null;
|
|
1607
1616
|
const onChange = (e) => {
|
|
1608
|
-
const
|
|
1609
|
-
|
|
1610
|
-
|
|
1617
|
+
const target = e.target;
|
|
1618
|
+
const root = (target === null || target === void 0 ? void 0 : target.getRootNode()) || settings.environment.root;
|
|
1619
|
+
if (!(root instanceof Document || root instanceof ShadowRoot))
|
|
1620
|
+
return;
|
|
1621
|
+
if (target === root.activeElement) {
|
|
1622
|
+
this.model.filterString = target.value;
|
|
1611
1623
|
}
|
|
1612
1624
|
};
|
|
1613
1625
|
return (React.createElement("div", { className: "svc-search" },
|
|
@@ -2898,36 +2910,6 @@ ReactQuestionFactory.Instance.registerQuestion("fileedit", (props) => {
|
|
|
2898
2910
|
return React.createElement(SurveyQuestionFileEditor, props);
|
|
2899
2911
|
});
|
|
2900
2912
|
|
|
2901
|
-
class SurveyQuestionTextWithReset extends SurveyQuestionElementBase {
|
|
2902
|
-
get question() {
|
|
2903
|
-
return this.questionBase;
|
|
2904
|
-
}
|
|
2905
|
-
renderElement() {
|
|
2906
|
-
const textElement = this.renderInput();
|
|
2907
|
-
const resetButton = this.renderResetButton();
|
|
2908
|
-
return (React.createElement("div", { className: this.question.getRootClass() },
|
|
2909
|
-
textElement,
|
|
2910
|
-
resetButton));
|
|
2911
|
-
}
|
|
2912
|
-
renderInput() {
|
|
2913
|
-
return ReactQuestionFactory.Instance.createQuestion(this.question.wrappedQuestionTemplate, {
|
|
2914
|
-
question: this.question,
|
|
2915
|
-
isDisplayMode: this.question.isInputReadOnly,
|
|
2916
|
-
creator: this,
|
|
2917
|
-
});
|
|
2918
|
-
}
|
|
2919
|
-
renderResetButton() {
|
|
2920
|
-
return (React.createElement("button", { className: this.question.cssClasses.resetButton, disabled: this.question.resetValueAdorner.isDisabled, title: this.question.resetValueAdorner.caption, onClick: () => this.question.resetValueAdorner.resetValue() },
|
|
2921
|
-
React.createElement(SvgIcon, { iconName: this.question.cssClasses.resetButtonIcon, size: "auto" })));
|
|
2922
|
-
}
|
|
2923
|
-
}
|
|
2924
|
-
ReactQuestionFactory.Instance.registerQuestion("textwithreset", (props) => {
|
|
2925
|
-
return React.createElement(SurveyQuestionTextWithReset, props);
|
|
2926
|
-
});
|
|
2927
|
-
ReactQuestionFactory.Instance.registerQuestion("commentwithreset", (props) => {
|
|
2928
|
-
return React.createElement(SurveyQuestionTextWithReset, props);
|
|
2929
|
-
});
|
|
2930
|
-
|
|
2931
2913
|
class SurveyQuestionBooleanSwitch extends SurveyQuestionElementBase {
|
|
2932
2914
|
renderElement() {
|
|
2933
2915
|
const button = attachKey2click(React.createElement("div", { className: "spg-boolean-switch__button" + (this.questionBase.booleanValue ? " 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 },
|
|
@@ -2947,8 +2929,8 @@ ReactQuestionFactory.Instance.registerQuestion("sv-boolean-switch", (props) => {
|
|
|
2947
2929
|
RendererFactory.Instance.registerRenderer("boolean", "switch", "sv-boolean-switch");
|
|
2948
2930
|
|
|
2949
2931
|
let Version;
|
|
2950
|
-
Version = `${"3.0.0-beta.
|
|
2951
|
-
checkLibraryVersion(`${"3.0.0-beta.
|
|
2932
|
+
Version = `${"3.0.0-beta.1"}`;
|
|
2933
|
+
checkLibraryVersion(`${"3.0.0-beta.1"}`, "survey-creator-react");
|
|
2952
2934
|
|
|
2953
|
-
export { ActionButton, AdaptiveToolbox, CellQuestionAdornerComponent, CellQuestionDropdownAdornerComponent, ComponentContainer, 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,
|
|
2935
|
+
export { ActionButton, AdaptiveToolbox, CellQuestionAdornerComponent, CellQuestionDropdownAdornerComponent, ComponentContainer, 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, SurveyResults, SurveyResultsByRow, SurveySimulator, SwitcherComponent, TabButtonComponent, TabDesignerComponent, TabJsonEditorAceComponent, TabJsonEditorErrorsComponent, TabJsonEditorTextareaComponent, TabLogicAddButtonComponent, TabLogicComponent, TabPreviewSurveyComponent, TabPreviewTestSurveyAgainComponent, TabThemeSurveyComponent, TabTranslationComponent, TabbedMenuComponent, TabbedMenuItemComponent, ToolboxList, TranslateFromAction, TranslationLineSkeleton, Version };
|
|
2954
2936
|
//# sourceMappingURL=survey-creator-react.mjs.map
|