survey-react-ui 1.9.72 → 1.9.75

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 CHANGED
@@ -1,6 +1,4 @@
1
- ## **SurveyJS** is a JavaScript Survey and Form Library.
2
-
3
- **SurveyJS** is a modern way to add surveys and forms to your website. It has versions for Angular, jQuery, knockout, react and vue.
1
+ # SurveyJS React Form Library
4
2
 
5
3
  [![Build Status](https://dev.azure.com/SurveyJS/SurveyJS%20Integration%20Tests/_apis/build/status/SurveyJS%20Library?branchName=master)](https://dev.azure.com/SurveyJS/SurveyJS%20Integration%20Tests/_build/latest?definitionId=7&branchName=master)
6
4
  [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE)
@@ -14,201 +12,32 @@
14
12
  <img alt="Closed issues" title="Closed Issues" src="https://img.shields.io/github/issues-closed/surveyjs/survey-library.svg">
15
13
  </a>
16
14
 
17
- ## Documentation
18
-
19
- [SurveyJS Library Documentation](https://surveyjs.io/Documentation/Library)
20
-
21
- ## Live Examples
22
-
23
- [SurveyJS Library Live Examples](https://surveyjs.io/Examples/Library)
24
-
25
- ## Survey Creator / Form Builder
26
-
27
- [Create your Survey or Form now](https://surveyjs.io/create-survey)
28
-
29
- Survey Creator sources are [here](https://github.com/surveyjs/survey-creator)
30
-
31
- ## Export Survey to PDF
32
-
33
- [Export to PDF overview](https://surveyjs.io/Overview/Survey-Pdf-Export)
34
-
35
- Export to PDF sources are [here](https://github.com/surveyjs/survey-pdf)
36
-
37
- ## More info about SurveyJS
38
-
39
- **SurveyJS** is the most feature-rich Survey / Form Library available at the current moment. It can be easily customized and extended to suit your needs.
40
-
41
- ![alt tag](https://cloud.githubusercontent.com/assets/22315929/22462339/ed33f60a-e7bd-11e6-942b-72882e6bf1db.gif)
42
-
43
- ## Main Features
44
-
45
- ### A lot of question types with a lot of built-in functionalities.
46
-
47
- * [Text Question](https://surveyjs.io/Examples/Library/?id=questiontype-text)
48
- * [Radigroup Question](https://surveyjs.io/Examples/Library/?id=questiontype-radiogroup)
49
- * [Dropdown Question](https://surveyjs.io/Examples/Library/?id=questiontype-dropdown)
50
- * [Checkboxes Question](https://surveyjs.io/Examples/Library/?id=questiontype-checkbox)
51
- * [Boolean Question](https://surveyjs.io/Examples/Library/?id=questiontype-boolean)
52
- * [Matrix Question](https://surveyjs.io/Examples/Library/?id=questiontype-matrix)
53
- * [Matrix Rubric Question](https://surveyjs.io/Examples/Library/?id=questiontype-matrix-rubric)
54
- * [Matrix Dropdown Question](https://surveyjs.io/Examples/Library/?id=questiontype-matrixdropdown)
55
- * [Matrix Dynamic Question](https://surveyjs.io/Examples/Library/?id=questiontype-matrixdynamic)
56
- * [Multiple Text Question](https://surveyjs.io/Examples/Library/?id=questiontype-multipletext)
57
- * [Rating Question](https://surveyjs.io/Examples/Library/?id=questiontype-rating)
58
- * [Ranking Question](https://surveyjs.io/Examples/Library?id=questiontype-ranking)
59
- * [Comment Question](https://surveyjs.io/Examples/Library/?id=questiontype-comment)
60
- * [Html Question](https://surveyjs.io/Examples/Library/?id=questiontype-html)
61
- * [Files uploading Question](https://surveyjs.io/Examples/Library/?id=questiontype-file)
62
- * [Panel Container](https://surveyjs.io/Examples/Library/?id=questiontype-panel)
63
- * [Panel Dynamic Question](https://surveyjs.io/Examples/Library/?id=questiontype-paneldynamic)
64
- * [Expression Question](https://surveyjs.io/Examples/Library/?id=questiontype-expression)
65
- * [Image Picker Question](https://surveyjs.io/Examples/Library/?id=questiontype-imagepicker)
66
- * [Support for third-party popular UI widgets](https://surveyjs.io/Examples/Library/?id=custom-widget-select2). The custom widgets [GitHub repo](https://github.com/surveyjs/widgets)
67
-
68
- ### Multiple Pages Support
69
-
70
- You may create a very complex forms with a lot of pages, like [this one](https://surveyjs.io/Examples/Library/?id=real-patient-history).
71
-
72
- ### Dynamically change survey logic and questions content
73
-
74
- * [Change questions visibility using logical expressions](https://surveyjs.io/Examples/Library/?id=condition-kids)
75
- * [Create custom functions to use it in expression](https://surveyjs.io/Examples/Library/?id=condition-customfunctions)
76
- * [Filter choices in checkbox, radiogroup and dropdown questions](https://surveyjs.io/Examples/Library/?id=condition-choicesVisibleIf)
77
- * [Filter rows and columns in matrix question](https://surveyjs.io/Examples/Library/?id=condition-matrixVisibleIf)
78
- * [Disabled/enabled questions based on logical expressions](https://surveyjs.io/Examples/Library/?id=condition-enable-kids)
79
- * [Questions value validation](https://surveyjs.io/Examples/Library/?id=validators-standard)
80
-
81
- ### Localization and Multiple language support
82
-
83
- * [Localization for over 20 languages](https://surveyjs.io/Examples/Library/?id=survey-localization&platform)
84
- * [Multiple language support in one survey](https://surveyjs.io/Examples/Library/?id=survey-multilanguages)
85
-
86
- ### Appearance and custom Rendering
87
-
88
- * [Seven built-in Themes](https://surveyjs.io/Examples/Library/?id=darkblue-theme)
89
- * [Bootstrap support](https://surveyjs.io/Examples/Library/?id=bootstrap-theme)
90
- * [CSS styles customization](https://surveyjs.io/Examples/Library/?id=survey-cssclasses)
91
- * [API for adding new or changing existing HTML elements](https://surveyjs.io/Examples/Library/?id=survey-afterrender)
92
- * [Render Questions in one line](https://surveyjs.io/Examples/Library/?id=survey-startwithnewline)
93
- * [Markdown support](https://surveyjs.io/Examples/Library/?id=survey-markdown-radiogroup)
94
-
95
- ### Frequently used functionalities
96
-
97
- * [Quiz creation](https://surveyjs.io/Examples/Library/?id=survey-quiz)
98
- * [Show survey or form in the popup window](https://surveyjs.io/Examples/Library/?id=survey-window)
99
- * [Display mode](https://surveyjs.io/Examples/Library/?id=survey-displaymode)
100
- * [Custom navigation](https://surveyjs.io/Examples/Library/?id=survey-customnavigation)
101
- * [Sharing same data between questions](https://surveyjs.io/Examples/Library/?id=survey-shareddata)
102
-
103
- ### To find out more about the library
104
-
105
- * go to the [SurveyJS Library Site](https://surveyjs.io/Library)
106
- * explore the live [Examples](https://www.surveyjs.io/Examples/Library)
107
- * and create a survey or form using [Survey Creator](https://surveyjs.io/survey/Builder/)
108
-
109
- #### You can use our quickstart repos:
110
-
111
- * [Angular CLI](https://github.com/surveyjs/surveyjs_angular_cli)
112
- * [React](https://github.com/surveyjs/surveyjs_react_quickstart)
113
- * [Vue](https://github.com/surveyjs/surveyjs_vue_quickstart)
114
-
115
- ## Getting started
116
-
117
- Install the library using npm.
118
-
119
- Angular version:
120
-
121
- ```
122
- npm install survey-angular
123
- ```
124
-
125
- jQuery version:
126
-
127
- ```
128
- npm install survey-jquery
129
- ```
130
-
131
- Knockout version:
132
-
133
- ```
134
- npm install survey-knockout
135
- ```
136
-
137
- React version:
138
-
139
- ```
140
- npm install survey-react
141
- ```
142
-
143
- Vue version:
144
-
145
- ```
146
- npm install survey-vue
147
- ```
148
-
149
- Or use unpkg CDN:
150
-
151
- * https://unpkg.com/survey-angular@{version-number}/survey.angular.min.js
152
- * https://unpkg.com/survey-knockout@{version-number}/survey.ko.min.js
153
- * https://unpkg.com/survey-react@{version-number}/survey.react.min.js
154
- * https://unpkg.com/survey-jquery@{version-number}/survey.jquery.min.js
155
- * https://unpkg.com/survey-vue@{version-number}/survey.vue.min.js
156
-
157
- You find all versions/builds in the [surveyjs/build repo](https://github.com/surveyjs/builds).
158
-
159
- Or dowload a version as zip file from [Releases](https://github.com/surveyjs/survey-library/releases)
160
-
161
- If you want to import it in another script:
162
-
163
- ```javascript
164
- import * as Survey from "survey-jquery";
165
- ```
166
-
167
- ## Building survey.js from sources
168
-
169
- To build library yourself:
170
-
171
- 1. **Clone the repo from GitHub**
172
-
173
- ```
174
- git clone https://github.com/surveyjs/survey-library.git
175
- cd survey-library
176
- ```
177
-
178
- 2. **Acquire build dependencies.** Make sure you have [Node.js](http://nodejs.org/) installed on your workstation. You need a version of Node.js greater than 6.0.0 and npm greater than 2.7.0. This is only needed to _build_ surveyjs from sources.
179
-
180
- ```
181
- npm install -g karma-cli
182
- npm install
183
- ```
184
-
185
- 3. **Build the library**
186
-
187
- ```
188
- npm run build_prod
189
- ```
190
-
191
- After that you should have the libraries (angular, jquery, knockout, react and vue) at 'packages' directory.
15
+ A free and open-source MIT-licensed JavaScript form builder library that allows you to design dynamic, data-driven, multi-language survey forms and run them in your React applications.
192
16
 
193
- 4. **Run samples**
17
+ ## Features
194
18
 
195
- ```
196
- npm start
197
- ```
19
+ - Dynamic forms, surveys, polls, and quizzes for your JavaScript application
20
+ - Integration with React, Angular, Vue, jQuery, and Knockout
21
+ - 20+ built-in question types and support for custom question types
22
+ - Built-in themes and CSS customization
23
+ - Answer validation
24
+ - TypeScript support
25
+ - Community-supported UI localization to 50+ languages
26
+ - Integration with any backend framework (examples for PHP, NodeJS, and ASP.NET included)
27
+ - Compatibility with any server + database combination
28
+ - Third-party component integration
198
29
 
199
- This command will run local http server at the http://localhost:7777
200
- You can open http://localhost:7777/examples/knockout to view KnockoutJS samples, http://localhost:7777/examples/react to view ReactJS samples and so on
30
+ ## Get Started
201
31
 
202
- 5. **Run unit tests**
203
- ```
204
- karma start
205
- ```
206
- This command will run unit tests using [Karma](https://karma-runner.github.io/0.13/index.html)
32
+ To get started with SurveyJS React Form Library, refer to the following tutorial: [Add a Survey to a React Application](https://surveyjs.io/Documentation/Library?id=get-started-react).
207
33
 
208
- ### WordPress integration
34
+ ## Resources
209
35
 
210
- [SurveyJS WordPress plugin](https://wordpress.org/plugins/surveyjs/)
36
+ - [Website](https://surveyjs.io/)
37
+ - [Documentation](https://surveyjs.io/Documentation/Library)
38
+ - [Live Examples](https://surveyjs.io/form-library/examples/nps-question/reactjs)
39
+ - [What's New](https://surveyjs.io/WhatsNew)
211
40
 
212
- ## License
41
+ ## Licensing
213
42
 
214
- [MIT license](https://github.com/surveyjs/survey-library/blob/master/LICENSE)
43
+ SurveyJS Form Library is distributed under the [MIT license](https://github.com/surveyjs/survey-library/blob/master/LICENSE).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "survey-react-ui",
3
- "version": "1.9.72",
3
+ "version": "1.9.75",
4
4
  "description": "survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.",
5
5
  "keywords": [
6
6
  "Survey",
@@ -29,6 +29,18 @@ declare module "react/reactquestion_factory" {
29
29
  createQuestion(questionType: string, params: any): JSX.Element | null;
30
30
  }
31
31
  }
32
+ declare module "react/components/character-counter" {
33
+ import { Base, CharacterCounter } from "survey-core";
34
+ import { SurveyElementBase } from "react/reactquestion_element";
35
+ export interface ICharacterCounterComponentProps {
36
+ counter: CharacterCounter;
37
+ remainingCharacterCounter: string;
38
+ }
39
+ export class CharacterCounterComponent extends SurveyElementBase<ICharacterCounterComponentProps, any> {
40
+ protected getStateElement(): Base;
41
+ renderElement(): JSX.Element | null;
42
+ }
43
+ }
32
44
  declare module "react/reactquestion_comment" {
33
45
  import { ReactSurveyElement, SurveyQuestionUncontrolledElement } from "react/reactquestion_element";
34
46
  import { QuestionCommentModel } from "survey-core";
@@ -1067,15 +1079,33 @@ declare module "react/reactSurveyProgressButtons" {
1067
1079
  componentWillUnmount(): void;
1068
1080
  }
1069
1081
  }
1082
+ declare module "react/components/rating/rating-item" {
1083
+ import { QuestionRatingModel, RenderedRatingItem } from "survey-core";
1084
+ import { SurveyElementBase } from "react/reactquestion_element";
1085
+ interface IRatingItemProps {
1086
+ question: QuestionRatingModel;
1087
+ data: RenderedRatingItem;
1088
+ index: any;
1089
+ handleOnClick: any;
1090
+ isDisplayMode: boolean;
1091
+ }
1092
+ export class RatingItem extends SurveyElementBase<IRatingItemProps, any> {
1093
+ get question(): QuestionRatingModel;
1094
+ get item(): RenderedRatingItem;
1095
+ get index(): any;
1096
+ getStateElement(): RenderedRatingItem;
1097
+ render(): JSX.Element | null;
1098
+ componentDidMount(): void;
1099
+ }
1100
+ }
1070
1101
  declare module "react/reactquestion_rating" {
1071
1102
  import { SurveyQuestionElementBase } from "react/reactquestion_element";
1072
- import { QuestionRatingModel, RenderedRatingItem } from "survey-core";
1103
+ import { QuestionRatingModel } from "survey-core";
1073
1104
  export class SurveyQuestionRating extends SurveyQuestionElementBase {
1074
1105
  constructor(props: any);
1075
1106
  protected get question(): QuestionRatingModel;
1076
1107
  handleOnClick(event: any): void;
1077
1108
  protected renderElement(): JSX.Element;
1078
- protected renderItem(key: string, item: RenderedRatingItem, index: number, cssClasses: any): JSX.Element;
1079
1109
  }
1080
1110
  }
1081
1111
  declare module "react/rating-dropdown" {
@@ -1368,6 +1398,7 @@ declare module "entries/react-ui-model" {
1368
1398
  export { MatrixRow } from "react/components/matrix/row";
1369
1399
  export { Skeleton } from "react/components/skeleton";
1370
1400
  export { NotifierComponent } from "react/components/notifier";
1401
+ export { CharacterCounterComponent } from "react/components/character-counter";
1371
1402
  export { SurveyLocStringViewer } from "react/string-viewer";
1372
1403
  export { SurveyLocStringEditor } from "react/string-editor";
1373
1404
  }