survey-core 1.12.1 → 1.12.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/defaultV2.css +3 -1
- package/defaultV2.css.map +1 -1
- package/defaultV2.fontless.css +3 -1
- package/defaultV2.fontless.css.map +1 -1
- package/defaultV2.fontless.min.css +2 -2
- package/defaultV2.min.css +2 -2
- package/i18n/arabic.js +1 -1
- package/i18n/arabic.min.js +1 -1
- package/i18n/basque.js +1 -1
- package/i18n/basque.min.js +1 -1
- package/i18n/bulgarian.js +1 -1
- package/i18n/bulgarian.min.js +1 -1
- package/i18n/catalan.js +1 -1
- package/i18n/catalan.min.js +1 -1
- package/i18n/croatian.js +1 -1
- package/i18n/croatian.min.js +1 -1
- package/i18n/czech.js +1 -1
- package/i18n/czech.min.js +1 -1
- package/i18n/danish.js +1 -1
- package/i18n/danish.min.js +1 -1
- package/i18n/dutch.js +1 -1
- package/i18n/dutch.min.js +1 -1
- package/i18n/english.js +1 -1
- package/i18n/english.min.js +1 -1
- package/i18n/estonian.js +1 -1
- package/i18n/estonian.min.js +1 -1
- package/i18n/finnish.js +1 -1
- package/i18n/finnish.min.js +1 -1
- package/i18n/french.js +1 -1
- package/i18n/french.min.js +1 -1
- package/i18n/georgian.js +1 -1
- package/i18n/georgian.min.js +1 -1
- package/i18n/german.js +1 -1
- package/i18n/german.min.js +1 -1
- package/i18n/greek.js +1 -1
- package/i18n/greek.min.js +1 -1
- package/i18n/hebrew.js +1 -1
- package/i18n/hebrew.min.js +1 -1
- package/i18n/hindi.js +1 -1
- package/i18n/hindi.min.js +1 -1
- package/i18n/hungarian.js +1 -1
- package/i18n/hungarian.min.js +1 -1
- package/i18n/icelandic.js +1 -1
- package/i18n/icelandic.min.js +1 -1
- package/i18n/index.js +45 -45
- package/i18n/index.js.map +1 -1
- package/i18n/index.min.js +2 -2
- package/i18n/indonesian.js +1 -1
- package/i18n/indonesian.min.js +1 -1
- package/i18n/italian.js +1 -1
- package/i18n/italian.min.js +1 -1
- package/i18n/japanese.js +45 -45
- package/i18n/japanese.js.map +1 -1
- package/i18n/japanese.min.js +2 -2
- package/i18n/kazakh.js +1 -1
- package/i18n/kazakh.min.js +1 -1
- package/i18n/korean.js +1 -1
- package/i18n/korean.min.js +1 -1
- package/i18n/latvian.js +1 -1
- package/i18n/latvian.min.js +1 -1
- package/i18n/lithuanian.js +1 -1
- package/i18n/lithuanian.min.js +1 -1
- package/i18n/macedonian.js +1 -1
- package/i18n/macedonian.min.js +1 -1
- package/i18n/malay.js +1 -1
- package/i18n/malay.min.js +1 -1
- package/i18n/nl-BE.js +1 -1
- package/i18n/nl-BE.min.js +1 -1
- package/i18n/norwegian.js +1 -1
- package/i18n/norwegian.min.js +1 -1
- package/i18n/persian.js +1 -1
- package/i18n/persian.min.js +1 -1
- package/i18n/philippines.js +1 -1
- package/i18n/philippines.min.js +1 -1
- package/i18n/polish.js +1 -1
- package/i18n/polish.min.js +1 -1
- package/i18n/portuguese-br.js +1 -1
- package/i18n/portuguese-br.min.js +1 -1
- package/i18n/portuguese.js +1 -1
- package/i18n/portuguese.min.js +1 -1
- package/i18n/romanian.js +1 -1
- package/i18n/romanian.min.js +1 -1
- package/i18n/russian.js +1 -1
- package/i18n/russian.min.js +1 -1
- package/i18n/serbian.js +1 -1
- package/i18n/serbian.min.js +1 -1
- package/i18n/simplified-chinese.js +1 -1
- package/i18n/simplified-chinese.min.js +1 -1
- package/i18n/slovak.js +1 -1
- package/i18n/slovak.min.js +1 -1
- package/i18n/spanish.js +1 -1
- package/i18n/spanish.min.js +1 -1
- package/i18n/swahili.js +1 -1
- package/i18n/swahili.min.js +1 -1
- package/i18n/swedish.js +1 -1
- package/i18n/swedish.min.js +1 -1
- package/i18n/tajik.js +1 -1
- package/i18n/tajik.min.js +1 -1
- package/i18n/telugu.js +1 -1
- package/i18n/telugu.min.js +1 -1
- package/i18n/thai.js +1 -1
- package/i18n/thai.min.js +1 -1
- package/i18n/traditional-chinese.js +1 -1
- package/i18n/traditional-chinese.min.js +1 -1
- package/i18n/turkish.js +1 -1
- package/i18n/turkish.min.js +1 -1
- package/i18n/ukrainian.js +1 -1
- package/i18n/ukrainian.min.js +1 -1
- package/i18n/urdu.js +1 -1
- package/i18n/urdu.min.js +1 -1
- package/i18n/vietnamese.js +1 -1
- package/i18n/vietnamese.min.js +1 -1
- package/i18n/welsh.js +1 -1
- package/i18n/welsh.min.js +1 -1
- package/modern.css +1 -1
- package/modern.fontless.css +1 -1
- package/modern.fontless.min.css +1 -1
- package/modern.min.css +1 -1
- package/package.json +1 -1
- package/plugins/bootstrap-integration/index.js +1 -1
- package/plugins/bootstrap-integration/index.min.js +1 -1
- package/plugins/bootstrap-material-integration/index.js +1 -1
- package/plugins/bootstrap-material-integration/index.min.js +1 -1
- package/survey.core.js +831 -235
- package/survey.core.js.map +1 -1
- package/survey.core.min.js +3 -3
- package/survey.css +1 -1
- package/survey.i18n.js +45 -45
- package/survey.i18n.js.map +1 -1
- package/survey.i18n.min.js +2 -2
- package/survey.min.css +1 -1
- package/themes/borderless-dark-panelless.js +1 -1
- package/themes/borderless-dark-panelless.min.js +1 -1
- package/themes/borderless-dark.js +1 -1
- package/themes/borderless-dark.min.js +1 -1
- package/themes/borderless-light-panelless..js +1 -1
- package/themes/borderless-light-panelless..min.js +1 -1
- package/themes/borderless-light.js +1 -1
- package/themes/borderless-light.min.js +1 -1
- package/themes/contrast-dark-panelless.js +1 -1
- package/themes/contrast-dark-panelless.min.js +1 -1
- package/themes/contrast-dark.js +1 -1
- package/themes/contrast-dark.min.js +1 -1
- package/themes/contrast-light-panelless.js +1 -1
- package/themes/contrast-light-panelless.min.js +1 -1
- package/themes/contrast-light.js +1 -1
- package/themes/contrast-light.min.js +1 -1
- package/themes/default-dark-panelless.js +1 -1
- package/themes/default-dark-panelless.min.js +1 -1
- package/themes/default-dark.js +1 -1
- package/themes/default-dark.min.js +1 -1
- package/themes/default-light-panelless.js +1 -1
- package/themes/default-light-panelless.min.js +1 -1
- package/themes/default-light.js +1 -1
- package/themes/default-light.min.js +1 -1
- package/themes/doubleborder-dark-panelless.js +1 -1
- package/themes/doubleborder-dark-panelless.min.js +1 -1
- package/themes/doubleborder-dark.js +1 -1
- package/themes/doubleborder-dark.min.js +1 -1
- package/themes/doubleborder-light-panelles.js +1 -1
- package/themes/doubleborder-light-panelles.min.js +1 -1
- package/themes/doubleborder-light.js +1 -1
- package/themes/doubleborder-light.min.js +1 -1
- package/themes/flat-dark-panelless.js +1 -1
- package/themes/flat-dark-panelless.min.js +1 -1
- package/themes/flat-dark.js +1 -1
- package/themes/flat-dark.min.js +1 -1
- package/themes/flat-light-panelless.js +1 -1
- package/themes/flat-light-panelless.min.js +1 -1
- package/themes/flat-light.js +1 -1
- package/themes/flat-light.min.js +1 -1
- package/themes/index.js +1 -1
- package/themes/index.min.js +1 -1
- package/themes/layered-dark-panelless.js +1 -1
- package/themes/layered-dark-panelless.min.js +1 -1
- package/themes/layered-dark.js +1 -1
- package/themes/layered-dark.min.js +1 -1
- package/themes/layered-light-panelless.js +1 -1
- package/themes/layered-light-panelless.min.js +1 -1
- package/themes/layered-light.js +1 -1
- package/themes/layered-light.min.js +1 -1
- package/themes/plain-dark-panelless.js +1 -1
- package/themes/plain-dark-panelless.min.js +1 -1
- package/themes/plain-dark.js +1 -1
- package/themes/plain-dark.min.js +1 -1
- package/themes/plain-light-panelless.js +1 -1
- package/themes/plain-light-panelless.min.js +1 -1
- package/themes/plain-light.js +1 -1
- package/themes/plain-light.min.js +1 -1
- package/themes/sharp-dark-panelless.js +1 -1
- package/themes/sharp-dark-panelless.min.js +1 -1
- package/themes/sharp-dark.js +1 -1
- package/themes/sharp-dark.min.js +1 -1
- package/themes/sharp-light-panelless.js +1 -1
- package/themes/sharp-light-panelless.min.js +1 -1
- package/themes/sharp-light.js +1 -1
- package/themes/sharp-light.min.js +1 -1
- package/themes/solid-dark-panelless.js +1 -1
- package/themes/solid-dark-panelless.min.js +1 -1
- package/themes/solid-dark.js +1 -1
- package/themes/solid-dark.min.js +1 -1
- package/themes/solid-light-panelless.js +1 -1
- package/themes/solid-light-panelless.min.js +1 -1
- package/themes/solid-light.js +1 -1
- package/themes/solid-light.min.js +1 -1
- package/themes/three-dimensional-dark-panelless.js +1 -1
- package/themes/three-dimensional-dark-panelless.min.js +1 -1
- package/themes/three-dimensional-dark.js +1 -1
- package/themes/three-dimensional-dark.min.js +1 -1
- package/themes/three-dimensional-light-panelless.js +1 -1
- package/themes/three-dimensional-light-panelless.min.js +1 -1
- package/themes/three-dimensional-light.js +1 -1
- package/themes/three-dimensional-light.min.js +1 -1
- package/ts3.4/typings/packages/survey-core/entries/chunks/model.d.ts +1 -0
- package/ts3.4/typings/packages/survey-core/src/base-interfaces.d.ts +2 -0
- package/ts3.4/typings/packages/survey-core/src/defaultCss/defaultV2Css.d.ts +1 -0
- package/ts3.4/typings/packages/survey-core/src/martixBase.d.ts +7 -6
- package/ts3.4/typings/packages/survey-core/src/page.d.ts +3 -0
- package/ts3.4/typings/packages/survey-core/src/panel.d.ts +3 -1
- package/ts3.4/typings/packages/survey-core/src/question.d.ts +9 -6
- package/ts3.4/typings/packages/survey-core/src/question_baseselect.d.ts +3 -0
- package/ts3.4/typings/packages/survey-core/src/question_comment.d.ts +4 -0
- package/ts3.4/typings/packages/survey-core/src/question_matrix.d.ts +9 -1
- package/ts3.4/typings/packages/survey-core/src/question_matrixdropdown.d.ts +4 -1
- package/ts3.4/typings/packages/survey-core/src/question_matrixdropdownbase.d.ts +23 -2
- package/ts3.4/typings/packages/survey-core/src/question_matrixdropdowncolumn.d.ts +1 -0
- package/ts3.4/typings/packages/survey-core/src/question_matrixdynamic.d.ts +1 -0
- package/ts3.4/typings/packages/survey-core/src/survey-element.d.ts +1 -0
- package/ts3.4/typings/packages/survey-core/src/survey.d.ts +1 -1
- package/ts3.4/typings/packages/survey-core/src/utils/text-area.d.ts +56 -0
- package/ts3.4/typings/packages/survey-core/src/validator.d.ts +59 -16
- package/ts3.4/typings/src/defaultCss/cssmodern.d.ts +1 -0
- package/typings/packages/survey-core/entries/chunks/model.d.ts +1 -0
- package/typings/packages/survey-core/src/base-interfaces.d.ts +2 -0
- package/typings/packages/survey-core/src/defaultCss/defaultV2Css.d.ts +1 -0
- package/typings/packages/survey-core/src/martixBase.d.ts +7 -6
- package/typings/packages/survey-core/src/page.d.ts +3 -0
- package/typings/packages/survey-core/src/panel.d.ts +3 -1
- package/typings/packages/survey-core/src/question.d.ts +9 -6
- package/typings/packages/survey-core/src/question_baseselect.d.ts +3 -0
- package/typings/packages/survey-core/src/question_comment.d.ts +4 -0
- package/typings/packages/survey-core/src/question_matrix.d.ts +9 -1
- package/typings/packages/survey-core/src/question_matrixdropdown.d.ts +4 -1
- package/typings/packages/survey-core/src/question_matrixdropdownbase.d.ts +24 -2
- package/typings/packages/survey-core/src/question_matrixdropdowncolumn.d.ts +1 -0
- package/typings/packages/survey-core/src/question_matrixdynamic.d.ts +1 -0
- package/typings/packages/survey-core/src/survey-element.d.ts +1 -0
- package/typings/packages/survey-core/src/survey.d.ts +1 -1
- package/typings/packages/survey-core/src/utils/text-area.d.ts +56 -0
- package/typings/packages/survey-core/src/validator.d.ts +60 -16
- package/typings/src/defaultCss/cssmodern.d.ts +1 -0
|
@@ -8,13 +8,18 @@ export declare class ValidatorResult {
|
|
|
8
8
|
constructor(value: any, error?: SurveyError);
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* A base class for all classes that implement validators.
|
|
12
|
+
*
|
|
13
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
12
14
|
*/
|
|
13
15
|
export declare class SurveyValidator extends Base {
|
|
14
16
|
errorOwner: ISurveyErrorOwner;
|
|
15
17
|
onAsyncCompleted: (result: ValidatorResult) => void;
|
|
16
18
|
constructor();
|
|
17
19
|
getSurvey(live?: boolean): ISurvey;
|
|
20
|
+
/**
|
|
21
|
+
* An error message to display when a value fails validation.
|
|
22
|
+
*/
|
|
18
23
|
get text(): string;
|
|
19
24
|
set text(value: string);
|
|
20
25
|
get isValidateAllValues(): boolean;
|
|
@@ -46,7 +51,9 @@ export declare class ValidatorRunner {
|
|
|
46
51
|
private prepareAsyncValidators;
|
|
47
52
|
}
|
|
48
53
|
/**
|
|
49
|
-
*
|
|
54
|
+
* A class that implements a validator for numeric values.
|
|
55
|
+
*
|
|
56
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
50
57
|
*/
|
|
51
58
|
export declare class NumericValidator extends SurveyValidator {
|
|
52
59
|
constructor(minValue?: number, maxValue?: number);
|
|
@@ -54,18 +61,24 @@ export declare class NumericValidator extends SurveyValidator {
|
|
|
54
61
|
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
|
|
55
62
|
protected getDefaultErrorText(name: string): string;
|
|
56
63
|
/**
|
|
57
|
-
*
|
|
64
|
+
* A minimum allowed numeric value.
|
|
65
|
+
*
|
|
66
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
58
67
|
*/
|
|
59
68
|
get minValue(): number;
|
|
60
69
|
set minValue(val: number);
|
|
61
70
|
/**
|
|
62
|
-
*
|
|
71
|
+
* A maximum allowed numeric value.
|
|
72
|
+
*
|
|
73
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
63
74
|
*/
|
|
64
75
|
get maxValue(): number;
|
|
65
76
|
set maxValue(val: number);
|
|
66
77
|
}
|
|
67
78
|
/**
|
|
68
|
-
*
|
|
79
|
+
* A class that implements a validator for text values.
|
|
80
|
+
*
|
|
81
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
69
82
|
*/
|
|
70
83
|
export declare class TextValidator extends SurveyValidator {
|
|
71
84
|
constructor();
|
|
@@ -73,23 +86,35 @@ export declare class TextValidator extends SurveyValidator {
|
|
|
73
86
|
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
|
|
74
87
|
protected getDefaultErrorText(name: string): string;
|
|
75
88
|
/**
|
|
76
|
-
* The
|
|
89
|
+
* The minimum length of a text value measured in characters.
|
|
90
|
+
*
|
|
91
|
+
* Default value: 0
|
|
92
|
+
*
|
|
93
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
77
94
|
*/
|
|
78
95
|
get minLength(): number;
|
|
79
96
|
set minLength(val: number);
|
|
80
97
|
/**
|
|
81
|
-
* The
|
|
98
|
+
* The maximum length of a text value measured in characters.
|
|
99
|
+
*
|
|
100
|
+
* Default value: 0 (unlimited)
|
|
101
|
+
*
|
|
102
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
82
103
|
*/
|
|
83
104
|
get maxLength(): number;
|
|
84
105
|
set maxLength(val: number);
|
|
85
106
|
/**
|
|
86
|
-
*
|
|
107
|
+
* Specifies whether a text value can include numerical digits.
|
|
108
|
+
*
|
|
109
|
+
* Default value: `true`
|
|
87
110
|
*/
|
|
88
111
|
get allowDigits(): boolean;
|
|
89
112
|
set allowDigits(val: boolean);
|
|
90
113
|
}
|
|
91
114
|
/**
|
|
92
|
-
*
|
|
115
|
+
* A class that implements answer count validation in the question types that can have multiple values (for instance, [Checkboxes](https://surveyjs.io/form-library/documentation/api-reference/checkbox-question-model)).
|
|
116
|
+
*
|
|
117
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
93
118
|
*/
|
|
94
119
|
export declare class AnswerCountValidator extends SurveyValidator {
|
|
95
120
|
constructor(minCount?: number, maxCount?: number);
|
|
@@ -97,18 +122,22 @@ export declare class AnswerCountValidator extends SurveyValidator {
|
|
|
97
122
|
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
|
|
98
123
|
protected getDefaultErrorText(name: string): string;
|
|
99
124
|
/**
|
|
100
|
-
*
|
|
125
|
+
* A minimum number of selected answers.
|
|
126
|
+
*
|
|
127
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
101
128
|
*/
|
|
102
129
|
get minCount(): number;
|
|
103
130
|
set minCount(val: number);
|
|
104
131
|
/**
|
|
105
|
-
*
|
|
132
|
+
* A maximum number of selected answers.
|
|
133
|
+
*
|
|
134
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
106
135
|
*/
|
|
107
136
|
get maxCount(): number;
|
|
108
137
|
set maxCount(val: number);
|
|
109
138
|
}
|
|
110
139
|
/**
|
|
111
|
-
*
|
|
140
|
+
* A class that implements validation using regular expressions.
|
|
112
141
|
*
|
|
113
142
|
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
114
143
|
*/
|
|
@@ -118,16 +147,27 @@ export declare class RegexValidator extends SurveyValidator {
|
|
|
118
147
|
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
|
|
119
148
|
private hasError;
|
|
120
149
|
/**
|
|
121
|
-
*
|
|
150
|
+
* A regular expression used to validate values.
|
|
151
|
+
*
|
|
152
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
122
153
|
*/
|
|
123
154
|
get regex(): string;
|
|
124
155
|
set regex(val: string);
|
|
156
|
+
/**
|
|
157
|
+
* Specifies whether uppercase and lowercase letters must be treated as distinct or equivalent when validating values.
|
|
158
|
+
*
|
|
159
|
+
* Default value: `false` (uppercase and lowercase letters are treated as distinct)
|
|
160
|
+
*/
|
|
161
|
+
get caseInsensitive(): boolean;
|
|
162
|
+
set caseInsensitive(val: boolean);
|
|
125
163
|
get insensitive(): boolean;
|
|
126
164
|
set insensitive(val: boolean);
|
|
127
165
|
private createRegExp;
|
|
128
166
|
}
|
|
129
167
|
/**
|
|
130
|
-
*
|
|
168
|
+
* A class that implements a validator for e-mail addresses.
|
|
169
|
+
*
|
|
170
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
131
171
|
*/
|
|
132
172
|
export declare class EmailValidator extends SurveyValidator {
|
|
133
173
|
private re;
|
|
@@ -137,7 +177,9 @@ export declare class EmailValidator extends SurveyValidator {
|
|
|
137
177
|
protected getDefaultErrorText(name: string): string;
|
|
138
178
|
}
|
|
139
179
|
/**
|
|
140
|
-
*
|
|
180
|
+
* A class that implements validation using [expressions](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions).
|
|
181
|
+
*
|
|
182
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
141
183
|
*/
|
|
142
184
|
export declare class ExpressionValidator extends SurveyValidator {
|
|
143
185
|
private conditionRunner;
|
|
@@ -152,7 +194,9 @@ export declare class ExpressionValidator extends SurveyValidator {
|
|
|
152
194
|
protected getDefaultErrorText(name: string): string;
|
|
153
195
|
protected ensureConditionRunner(): boolean;
|
|
154
196
|
/**
|
|
155
|
-
*
|
|
197
|
+
* A Boolean [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions). If it evaluates to `false`, validation fails.
|
|
198
|
+
*
|
|
199
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
156
200
|
*/
|
|
157
201
|
get expression(): string;
|
|
158
202
|
set expression(val: string);
|