survey-creator-react 1.9.30 → 1.9.33
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 +12 -54
- package/package.json +4 -4
- package/survey-creator-react.d.ts +252 -202
- package/survey-creator-react.js +453 -234
- package/survey-creator-react.min.js +2 -2
package/README.md
CHANGED
|
@@ -1,65 +1,23 @@
|
|
|
1
|
-
# Survey Creator
|
|
1
|
+
# Survey Creator / Form Builder for React
|
|
2
2
|
|
|
3
3
|
[](https://dev.azure.com/SurveyJS/SurveyJS%20Integration%20Tests/_build/latest?definitionId=8&branchName=master)
|
|
4
4
|
<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>
|
|
5
5
|
|
|
6
|
-
Survey Creator
|
|
6
|
+
Survey Creator / Form Builder for React is a visual survey designer / form builder for the React version of [SurveyJS](https://github.com/surveyjs/survey-library).
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
- [Documentation](https://surveyjs.io/Documentation/Survey-Creator)
|
|
10
|
-
- [Create your Survey or Form now](https://surveyjs.io/create-survey-v2)
|
|
11
|
-
|
|
12
|
-
**NOTE**: This package contains Survey Creator V2. If you are looking for information on V1, refer to the [survey-creator](/packages/survey-creator) directory. Differences between these two versions are described in the following help topic: [SurveyJS Creator V2: What's new](https://surveyjs.io/Documentation/Survey-Creator?id=Creator-V2-Whats-New). For information on how to migrate to V2, refer to the [Migration Guide for SurveyJS Creator - from V1 to V2](https://surveyjs.io/Documentation/Survey-Creator?id=Migrate-from-V1-to-V2) article.
|
|
13
|
-
|
|
14
|
-
## Install
|
|
8
|
+
[Try Survey Creator / Form Builder](https://surveyjs.io/create-survey)
|
|
15
9
|
|
|
16
|
-
|
|
17
|
-
npm install survey-creator-react --save
|
|
18
|
-
```
|
|
10
|
+
## Get Started
|
|
19
11
|
|
|
20
|
-
|
|
12
|
+
[Add Survey Creator / Form Builder to a React Application](https://surveyjs.io/Documentation/Survey-Creator?id=get-started-react)
|
|
21
13
|
|
|
22
|
-
|
|
14
|
+
## Resources
|
|
23
15
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
import "survey-core/defaultV2.min.css";
|
|
29
|
-
import "survey-creator-core/survey-creator-core.min.css";
|
|
30
|
-
|
|
31
|
-
export class SurveyCreatorWidget extends Component {
|
|
32
|
-
constructor() {
|
|
33
|
-
super();
|
|
34
|
-
// Instantiate Survey Creator
|
|
35
|
-
this.creator = new SurveyCreator({ showLogicTab: true });
|
|
36
|
-
// Enable auto save
|
|
37
|
-
this.creator.isAutoSave = true;
|
|
38
|
-
// Save the survey definition JSON to your web service
|
|
39
|
-
this.creator.saveSurveyFunc = (saveNo, callback) => {
|
|
40
|
-
// Call a function on your web service to store the survey definition JSON
|
|
41
|
-
// As an alternative to this.creator.JSON, you can use the this.creator.text string property
|
|
42
|
-
// saveSurveyJSON(this.id, this.creator.JSON, () => {
|
|
43
|
-
// callback(saveNo, true);
|
|
44
|
-
// });
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
componentDidMount() {
|
|
48
|
-
// Load a survey definition JSON from you web service
|
|
49
|
-
// ...
|
|
50
|
-
// Assign the survey definition to Survey Creator
|
|
51
|
-
// this.creator.JSON = yourJSON;
|
|
52
|
-
}
|
|
53
|
-
render() {
|
|
54
|
-
return (
|
|
55
|
-
<Fragment>
|
|
56
|
-
<SurveyCreatorComponent creator={this.creator} />
|
|
57
|
-
</Fragment>
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
```
|
|
16
|
+
- [Website](https://surveyjs.io/)
|
|
17
|
+
- [Documentation](https://surveyjs.io/Documentation/Survey-Creator)
|
|
18
|
+
- [Live Examples](https://surveyjs.io/Examples/Survey-Creator)
|
|
19
|
+
- [What's New](https://surveyjs.io/WhatsNew)
|
|
62
20
|
|
|
63
|
-
##
|
|
21
|
+
## Licensing
|
|
64
22
|
|
|
65
|
-
|
|
23
|
+
Survey Creator is **not available for free commercial usage**. If you want to integrate it into your application, you must purchase a [commercial license](https://surveyjs.io/Licenses#SurveyCreator). However, you can use [online Survey Creator](https://surveyjs.io/create-survey) to produce JSON survey configurations and use them with SurveyJS in your application free of charge.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-creator-react",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.33",
|
|
4
4
|
"description": "Use SurveyJS Creator to create or edit JSON for SurveyJS Library.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Survey",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"survey-core": "^1.9.9",
|
|
35
35
|
"survey-react-ui": "^1.9.9",
|
|
36
|
-
"survey-creator-core": "1.9.
|
|
37
|
-
"react": "^17.0.1",
|
|
38
|
-
"react-dom": "^17.0.1"
|
|
36
|
+
"survey-creator-core": "1.9.33",
|
|
37
|
+
"react": "^16.5.0 || ^17.0.1 || ^18.1.0",
|
|
38
|
+
"react-dom": "^16.5.0 || ^17.0.1 || ^18.1.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {}
|
|
41
41
|
}
|