survey-react 1.9.98 → 1.9.100
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 +78 -52
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +16 -9
- package/modern.css.map +1 -1
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/survey.css +7 -3
- package/survey.css.map +1 -1
- package/survey.min.css +2 -2
- package/survey.react.d.ts +1563 -1458
- package/survey.react.js +527 -183
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +4 -4
package/survey.react.d.ts
CHANGED
@@ -1,663 +1,146 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
declare module "
|
3
|
-
export
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
svgMountContainer: HTMLElement | string;
|
8
|
-
stylesSheetsMountContainer: HTMLElement;
|
9
|
-
};
|
10
|
-
/**
|
11
|
-
* Global settings that apply to all surveys on the page. To specify one of the settings, use the code below:
|
12
|
-
*
|
13
|
-
* ```js
|
14
|
-
* import { settings } from "survey-core";
|
15
|
-
*
|
16
|
-
* settings.settingName = "value";
|
17
|
-
* ```
|
18
|
-
*/
|
19
|
-
export var settings: {
|
20
|
-
/**
|
21
|
-
* An object that configures survey appearance when the survey is being designed in Survey Creator.
|
22
|
-
*
|
23
|
-
* Nested properties:
|
24
|
-
*
|
25
|
-
* - `showEmptyDescriptions`: `Boolean`\
|
26
|
-
* Specifies whether to display an empty description for pages and panels. Default value: `true`.
|
27
|
-
*
|
28
|
-
* - `showEmptyTitles`: `Boolean`\
|
29
|
-
* Specifies whether to display an empty title for pages and panels. Default value: `true`.
|
30
|
-
*/
|
31
|
-
designMode: {
|
32
|
-
showEmptyDescriptions: boolean;
|
33
|
-
showEmptyTitles: boolean;
|
34
|
-
};
|
35
|
-
/**
|
36
|
-
* This property is obsolete. Use the [`settings.designMode.showEmptyDescriptions`](https://surveyjs.io/form-library/documentation/api-reference/settings#designMode) property instead.
|
37
|
-
*/
|
38
|
-
allowShowEmptyDescriptionInDesignMode: boolean;
|
39
|
-
/**
|
40
|
-
* This property is obsolete. Use the [`settings.designMode.showEmptyTitles`](https://surveyjs.io/form-library/documentation/api-reference/settings#designMode) property instead.
|
41
|
-
*/
|
42
|
-
allowShowEmptyTitleInDesignMode: boolean;
|
2
|
+
declare module "helpers" {
|
3
|
+
export interface HashTable<T = any> {
|
4
|
+
[key: string]: T;
|
5
|
+
}
|
6
|
+
export class Helpers {
|
43
7
|
/**
|
44
|
-
*
|
45
|
-
*
|
46
|
-
* Nested properties:
|
47
|
-
*
|
48
|
-
* - `useLocalTimeZone`: `Boolean`\
|
49
|
-
* Disable this property if you want internal SurveyJS functions to use methods that work with UTC date and time (`setUTCDate()` `setUTCHours()`, etc.) instead of methods that work with local date and time (`setYear`, `setHours()`, etc.). Default value: `true`.
|
50
|
-
*
|
51
|
-
* - `defaultLocaleName`: `String`\
|
52
|
-
* A property key that stores a translation for the default locale. Default value: `"default"`.
|
53
|
-
*
|
54
|
-
* - `storeDuplicatedTranslations`: `Boolean`\
|
55
|
-
* Specifies whether surveys should store translation strings that equal the translation strings in the default locale. Default value: `false`.
|
8
|
+
* A static methods that returns true if a value undefined, null, empty string or empty array.
|
9
|
+
* @param value
|
56
10
|
*/
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
11
|
+
static isValueEmpty(value: any): boolean;
|
12
|
+
static isArrayContainsEqual(x: any, y: any): boolean;
|
13
|
+
static isArraysEqual(x: any, y: any, ignoreOrder?: boolean, caseSensitive?: boolean, trimStrings?: boolean): boolean;
|
14
|
+
static compareStrings(x: string, y: string): number;
|
15
|
+
static isTwoValueEquals(x: any, y: any, ignoreOrder?: boolean, caseSensitive?: boolean, trimStrings?: boolean): boolean;
|
16
|
+
static randomizeArray<T>(array: Array<T>): Array<T>;
|
17
|
+
static getUnbindValue(value: any): any;
|
18
|
+
static createCopy(obj: any): any;
|
19
|
+
static isConvertibleToNumber(value: any): boolean;
|
20
|
+
static isNumber(value: any): boolean;
|
21
|
+
static getNumber(value: any): number;
|
22
|
+
private static prepareStringToNumber;
|
23
|
+
static getMaxLength(maxLength: number, surveyLength: number): any;
|
24
|
+
static getRemainingCharacterCounterText(newValue: string | undefined, maxLength: number | null): string;
|
25
|
+
static getNumberByIndex(index: number, startIndexStr: string): string;
|
26
|
+
static isCharNotLetterAndDigit(ch: string): boolean;
|
27
|
+
static isCharDigit(ch: string): boolean;
|
28
|
+
private static getNumberFromStr;
|
29
|
+
private static countDecimals;
|
30
|
+
static correctAfterPlusMinis(a: number, b: number, res: number): number;
|
31
|
+
static sumAnyValues(a: any, b: any): any;
|
32
|
+
static correctAfterMultiple(a: number, b: number, res: number): number;
|
33
|
+
static convertArrayValueToObject(src: Array<any>, propName: string, dest?: Array<any>): Array<any>;
|
34
|
+
private static findObjByPropValue;
|
35
|
+
static convertArrayObjectToValue(src: Array<any>, propName: string): Array<any>;
|
36
|
+
static convertDateToString(date: Date): string;
|
37
|
+
static convertDateTimeToString(date: Date): string;
|
38
|
+
static convertValToQuestionVal(val: any, inputType?: string): any;
|
39
|
+
}
|
40
|
+
}
|
41
|
+
declare module "localization/english" {
|
42
|
+
export var englishStrings: {
|
43
|
+
pagePrevText: string;
|
44
|
+
pageNextText: string;
|
45
|
+
completeText: string;
|
46
|
+
previewText: string;
|
47
|
+
editText: string;
|
48
|
+
startSurveyText: string;
|
49
|
+
otherItemText: string;
|
50
|
+
noneItemText: string;
|
51
|
+
selectAllItemText: string;
|
52
|
+
progressText: string;
|
53
|
+
indexText: string;
|
54
|
+
panelDynamicProgressText: string;
|
55
|
+
panelDynamicTabTextFormat: string;
|
56
|
+
questionsProgressText: string;
|
57
|
+
emptySurvey: string;
|
58
|
+
completingSurvey: string;
|
59
|
+
completingSurveyBefore: string;
|
60
|
+
loadingSurvey: string;
|
61
|
+
placeholder: string;
|
62
|
+
ratingOptionsCaption: string;
|
63
|
+
value: string;
|
64
|
+
requiredError: string;
|
65
|
+
requiredErrorInPanel: string;
|
66
|
+
requiredInAllRowsError: string;
|
67
|
+
numericError: string;
|
68
|
+
minError: string;
|
69
|
+
maxError: string;
|
70
|
+
textMinLength: string;
|
71
|
+
textMaxLength: string;
|
72
|
+
textMinMaxLength: string;
|
73
|
+
minRowCountError: string;
|
74
|
+
minSelectError: string;
|
75
|
+
maxSelectError: string;
|
76
|
+
numericMinMax: string;
|
77
|
+
numericMin: string;
|
78
|
+
numericMax: string;
|
79
|
+
invalidEmail: string;
|
80
|
+
invalidExpression: string;
|
81
|
+
urlRequestError: string;
|
82
|
+
urlGetChoicesError: string;
|
83
|
+
exceedMaxSize: string;
|
84
|
+
otherRequiredError: string;
|
85
|
+
uploadingFile: string;
|
86
|
+
loadingFile: string;
|
87
|
+
chooseFile: string;
|
88
|
+
noFileChosen: string;
|
89
|
+
fileDragAreaPlaceholder: string;
|
90
|
+
confirmDelete: string;
|
91
|
+
keyDuplicationError: string;
|
92
|
+
addColumn: string;
|
93
|
+
addRow: string;
|
94
|
+
removeRow: string;
|
95
|
+
emptyRowsText: string;
|
96
|
+
addPanel: string;
|
97
|
+
removePanel: string;
|
98
|
+
choices_Item: string;
|
99
|
+
matrix_column: string;
|
100
|
+
matrix_row: string;
|
101
|
+
multipletext_itemname: string;
|
102
|
+
savingData: string;
|
103
|
+
savingDataError: string;
|
104
|
+
savingDataSuccess: string;
|
105
|
+
saveAgainButton: string;
|
106
|
+
timerMin: string;
|
107
|
+
timerSec: string;
|
108
|
+
timerSpentAll: string;
|
109
|
+
timerSpentPage: string;
|
110
|
+
timerSpentSurvey: string;
|
111
|
+
timerLimitAll: string;
|
112
|
+
timerLimitPage: string;
|
113
|
+
timerLimitSurvey: string;
|
114
|
+
clearCaption: string;
|
115
|
+
signaturePlaceHolder: string;
|
116
|
+
chooseFileCaption: string;
|
117
|
+
removeFileCaption: string;
|
118
|
+
booleanCheckedLabel: string;
|
119
|
+
booleanUncheckedLabel: string;
|
120
|
+
confirmRemoveFile: string;
|
121
|
+
confirmRemoveAllFiles: string;
|
122
|
+
questionTitlePatternText: string;
|
123
|
+
modalCancelButtonText: string;
|
124
|
+
modalApplyButtonText: string;
|
125
|
+
filterStringPlaceholder: string;
|
126
|
+
emptyMessage: string;
|
127
|
+
noEntriesText: string;
|
128
|
+
noEntriesReadonlyText: string;
|
129
|
+
more: string;
|
130
|
+
tagboxDoneButtonCaption: string;
|
131
|
+
selectToRankEmptyRankedAreaText: string;
|
132
|
+
selectToRankEmptyUnrankedAreaText: string;
|
133
|
+
};
|
134
|
+
}
|
135
|
+
declare module "surveyStrings" {
|
136
|
+
export var surveyLocalization: {
|
137
|
+
currentLocaleValue: string;
|
138
|
+
defaultLocaleValue: string;
|
139
|
+
locales: {
|
140
|
+
[index: string]: any;
|
61
141
|
};
|
62
|
-
|
63
|
-
|
64
|
-
*/
|
65
|
-
useLocalTimeZone: boolean;
|
66
|
-
/**
|
67
|
-
* This property is obsolete. Use the [`settings.localization.storeDuplicatedTranslations`](https://surveyjs.io/form-library/documentation/api-reference/settings#localization) property instead.
|
68
|
-
*/
|
69
|
-
storeDuplicatedTranslations: boolean;
|
70
|
-
/**
|
71
|
-
* This property is obsolete. Use the [`settings.localization.defaultLocaleName`](https://surveyjs.io/form-library/documentation/api-reference/settings#localization) property instead.
|
72
|
-
*/
|
73
|
-
defaultLocaleName: string;
|
74
|
-
/**
|
75
|
-
* An object with properties that configure surveys when they work with a web service.
|
76
|
-
*
|
77
|
-
* Nested properties:
|
78
|
-
*
|
79
|
-
* - `encodeUrlParams`: `Boolean`\
|
80
|
-
* Specifies whether to encode URL parameters when you access a web service. Default value: `true`.
|
81
|
-
*
|
82
|
-
* - `cacheLoadedChoices`: `Boolean`\
|
83
|
-
* Specifies whether to cache [choices](https://surveyjs.io/form-library/documentation/api-reference/checkbox-question-model#choicesByUrl) loaded from a web service. Default value: `true`.
|
84
|
-
*
|
85
|
-
* - `disableQuestionWhileLoadingChoices`: `Boolean`\
|
86
|
-
* Disables a question while its choices are being loaded from a web service. Default value: `false`.
|
87
|
-
*
|
88
|
-
* - `surveyServiceUrl`: `String`\
|
89
|
-
* The URL of the SurveyJS Service API endpoint.
|
90
|
-
*/
|
91
|
-
web: {
|
92
|
-
encodeUrlParams: boolean;
|
93
|
-
cacheLoadedChoices: boolean;
|
94
|
-
disableQuestionWhileLoadingChoices: boolean;
|
95
|
-
surveyServiceUrl: string;
|
96
|
-
};
|
97
|
-
/**
|
98
|
-
* This property is obsolete. Use the [`settings.web.encodeUrlParams`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
|
99
|
-
*/
|
100
|
-
webserviceEncodeParameters: boolean;
|
101
|
-
/**
|
102
|
-
* This property is obsolete. Use the [`settings.web.cacheLoadedChoices`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
|
103
|
-
*/
|
104
|
-
useCachingForChoicesRestful: boolean;
|
105
|
-
useCachingForChoicesRestfull: boolean;
|
106
|
-
/**
|
107
|
-
* This property is obsolete. Use the [`settings.web.disableQuestionWhileLoadingChoices`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
|
108
|
-
*/
|
109
|
-
disableOnGettingChoicesFromWeb: boolean;
|
110
|
-
/**
|
111
|
-
* This property is obsolete. Use the [`settings.web.surveyServiceUrl`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
|
112
|
-
*/
|
113
|
-
surveyServiceUrl: string;
|
114
|
-
/**
|
115
|
-
* An object that contains properties related to [triggers](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-survey-logic-triggers).
|
116
|
-
*
|
117
|
-
* Nested properties:
|
118
|
-
*
|
119
|
-
* - `changeNavigationButtonsOnComplete`: `Boolean`\
|
120
|
-
* Specifies whether to re-evaluate an expression associated with the [Complete trigger](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#complete) immediately when a question value changes. If the expression evaluates to `true`, the trigger is executed. Default value: `false`.\
|
121
|
-
* Keep this property set to `false` if you want to re-evaluate the Complete trigger's expression only when the respondents navigate to another page.
|
122
|
-
*
|
123
|
-
* - `executeCompleteOnValueChanged`: `Boolean`\
|
124
|
-
* Specifies whether to replace the Next button with the Complete button when the [Complete trigger](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#complete) is going to be executed. Default value: `true`.
|
125
|
-
*
|
126
|
-
* - `executeSkipOnValueChanged`: `Boolean`\
|
127
|
-
* Specifies whether to re-evaluate an expression associated with the [Skip trigger](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#skip) immediately when a question value changes. If the expression evaluates to `true`, the trigger is executed. Default value: `true`.\
|
128
|
-
* Disable this property if you want to re-evaluate the Skip trigger's expression only when respondents navigate to another page.
|
129
|
-
*/
|
130
|
-
triggers: {
|
131
|
-
changeNavigationButtonsOnComplete: boolean;
|
132
|
-
executeCompleteOnValueChanged: boolean;
|
133
|
-
executeSkipOnValueChanged: boolean;
|
134
|
-
};
|
135
|
-
/**
|
136
|
-
* This property is obsolete. Use the [`settings.triggers.executeCompleteOnValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/settings#triggers) property instead.
|
137
|
-
*/
|
138
|
-
executeCompleteTriggerOnValueChanged: boolean;
|
139
|
-
/**
|
140
|
-
* This property is obsolete. Use the [`settings.triggers.changeNavigationButtonsOnComplete`](https://surveyjs.io/form-library/documentation/api-reference/settings#triggers) property instead.
|
141
|
-
*/
|
142
|
-
changeNavigationButtonsOnCompleteTrigger: boolean;
|
143
|
-
/**
|
144
|
-
* This property is obsolete. Use the [`settings.triggers.executeSkipOnValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/settings#triggers) property instead.
|
145
|
-
*/
|
146
|
-
executeSkipTriggerOnValueChanged: boolean;
|
147
|
-
/**
|
148
|
-
* An object that contains properties related to JSON serialization.
|
149
|
-
*
|
150
|
-
* Nested properties:
|
151
|
-
*
|
152
|
-
* - `itemValueSerializeAsObject`: `Boolean`\
|
153
|
-
* Enable this property if you want to serialize [`ItemValue`](https://surveyjs.io/form-library/documentation/api-reference/itemvalue) instances as objects even when they include only the `value` property. Default value: `false`. View an example below.
|
154
|
-
*
|
155
|
-
* - `itemValueSerializeDisplayText`: `Boolean`\
|
156
|
-
* Enable this property if you want to serialize the `text` property of [`ItemValue`](https://surveyjs.io/form-library/documentation/api-reference/itemvalue) objects even when it is empty or equal to the `value` property. Default value: `false`. View an example below.
|
157
|
-
*
|
158
|
-
* - `localizableStringSerializeAsObject`: `Boolean`\
|
159
|
-
* Enable this property if you want to serialize [`LocalizableString`](https://surveyjs.io/form-library/documentation/api-reference/localizablestring) instances as objects even when they include only a translation string for the default locale. For example, `"Custom String"` will be serialized as `{ default: "Custom String" }`. Default value: `false`.
|
160
|
-
*
|
161
|
-
* ```js
|
162
|
-
* import { ItemValue, settings } from "survey-core";
|
163
|
-
*
|
164
|
-
* // `itemValueSerializeAsObject` example
|
165
|
-
* settings.localization.itemValueSerializeAsObject = true;
|
166
|
-
* const item = new ItemValue(5);
|
167
|
-
* const itemString = item.toJSON(); // Produces { value: 5 } instead of 5
|
168
|
-
*
|
169
|
-
* // `itemValueSerializeDisplayText` example
|
170
|
-
* settings.localization.itemValueSerializeDisplayText = true;
|
171
|
-
* const item = new ItemValue("item1");
|
172
|
-
* const itemString = item.toJSON(); // Produces { value: "item1", text: "item1" } instead of "item1"
|
173
|
-
* ```
|
174
|
-
*/
|
175
|
-
serialization: {
|
176
|
-
itemValueSerializeAsObject: boolean;
|
177
|
-
itemValueSerializeDisplayText: boolean;
|
178
|
-
localizableStringSerializeAsObject: boolean;
|
179
|
-
};
|
180
|
-
/**
|
181
|
-
* This property is obsolete. Use the [`settings.serialization.itemValueSerializeAsObject`](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization) property instead.
|
182
|
-
*/
|
183
|
-
itemValueAlwaysSerializeAsObject: boolean;
|
184
|
-
/**
|
185
|
-
* This property is obsolete. Use the [`settings.serialization.itemValueSerializeDisplayText`](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization) property instead.
|
186
|
-
*/
|
187
|
-
itemValueAlwaysSerializeText: boolean;
|
188
|
-
/**
|
189
|
-
* This property is obsolete. Use the [`settings.serialization.localizableStringSerializeAsObject`](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization) property instead.
|
190
|
-
*/
|
191
|
-
serializeLocalizableStringAsObject: boolean;
|
192
|
-
/**
|
193
|
-
* An object that configures lazy rendering.
|
194
|
-
*
|
195
|
-
* Nested properties:
|
196
|
-
*
|
197
|
-
* - `enabled`: `Boolean`\
|
198
|
-
* Specifies whether to add questions to the DOM only when they get into the viewport. Default value: `false`.
|
199
|
-
*
|
200
|
-
* > Lazy rendering is an experimental feature that may not work as expected in all use cases.
|
201
|
-
*/
|
202
|
-
lazyRender: {
|
203
|
-
enabled: boolean;
|
204
|
-
firstBatchSize: number;
|
205
|
-
};
|
206
|
-
/**
|
207
|
-
* This property is obsolete. Use the [`settings.lazyRender.enabled`](https://surveyjs.io/form-library/documentation/api-reference/settings#lazyRender) property instead.
|
208
|
-
*/
|
209
|
-
lazyRowsRendering: boolean;
|
210
|
-
lazyRowsRenderingStartRow: number;
|
211
|
-
/**
|
212
|
-
* An object with properties that apply to [Single-Choice](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-question-model), [Multiple-Choice](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-with-dropdown-list), and [Dynamic Matrix](https://surveyjs.io/form-library/documentation/api-reference/dynamic-matrix-table-question-model) questions.
|
213
|
-
*
|
214
|
-
* Nested properties:
|
215
|
-
*
|
216
|
-
* - `defaultRowName`: `String`\
|
217
|
-
* A property key that stores an object with default cell values. Default value: "default".
|
218
|
-
*
|
219
|
-
* - `defaultCellType`: `String`\
|
220
|
-
* The default type of matrix cells. Default value: `"dropdown"`.\
|
221
|
-
* You can specify this setting for individual questions or matrix columns: [`cellType`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-matrix-table-question-model#cellType). Refer to the `cellType` property description for information on possible values.
|
222
|
-
*
|
223
|
-
* - `totalsSuffix`: `String`\
|
224
|
-
* A suffix added to the name of the property that stores total values. The resulting property name consists of the matrix name and the suffix. Default value: `"-total"`.
|
225
|
-
*
|
226
|
-
* - `maxRowCount`: `Number`\
|
227
|
-
* A maximum number of rows in a Dynamic Matrix. Default value: 1000.\
|
228
|
-
* You can specify this setting for an individual Dynamic Matrix: [`maxRowCount`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-matrix-table-question-model#maxRowCount).
|
229
|
-
*
|
230
|
-
* - `maxRowCountInCondition`: `Number`\
|
231
|
-
* A maximum number of matrix rows included in the Condition drop-down menu in Survey Creator. This menu is used to configure conditional survey logic. Default value: 1.\
|
232
|
-
* If you set this property to 0, the Condition menu does not include any matrix rows. Users still can specify conditions that use matrix rows but only with Manual Entry.
|
233
|
-
*
|
234
|
-
* - `renderRemoveAsIcon`: `Boolean`\
|
235
|
-
* Disable this property if you want to render the Remove action in Dynamic Matrix as a button. Otherwise, the action is rendered as an icon. Default value: `true`.
|
236
|
-
*
|
237
|
-
* - `columnWidthsByType`: `Object`\
|
238
|
-
* An object that specifies fixed and minimum column width based on the column type.\
|
239
|
-
* Example: `settings.matrix.columnWidthsByType = { "tagbox": { minWidth: "240px", width: "300px" } }`
|
240
|
-
*
|
241
|
-
* - `rateSize`: `"small"` (default) | `"normal"`\
|
242
|
-
* Specifies the size of rate values. Applies to [Rating Scale](https://surveyjs.io/form-library/examples/rating-scale/) questions within matrixes.
|
243
|
-
*/
|
244
|
-
matrix: {
|
245
|
-
defaultCellType: string;
|
246
|
-
defaultRowName: string;
|
247
|
-
totalsSuffix: string;
|
248
|
-
maxRowCount: number;
|
249
|
-
maxRowCountInCondition: number;
|
250
|
-
renderRemoveAsIcon: boolean;
|
251
|
-
columnWidthsByType: {
|
252
|
-
[index: string]: {
|
253
|
-
minWidth?: string;
|
254
|
-
width?: string;
|
255
|
-
};
|
256
|
-
};
|
257
|
-
rateSize: "small" | "normal";
|
258
|
-
};
|
259
|
-
/**
|
260
|
-
* This property is obsolete. Use the [`settings.matrix.defaultRowName`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
261
|
-
*/
|
262
|
-
matrixDefaultRowName: string;
|
263
|
-
/**
|
264
|
-
* This property is obsolete. Use the [`settings.matrix.defaultCellType`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
265
|
-
*/
|
266
|
-
matrixDefaultCellType: string;
|
267
|
-
/**
|
268
|
-
* This property is obsolete. Use the [`settings.matrix.totalsSuffix`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
269
|
-
*/
|
270
|
-
matrixTotalValuePostFix: string;
|
271
|
-
/**
|
272
|
-
* This property is obsolete. Use the [`settings.matrix.maxRowCount`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
273
|
-
*/
|
274
|
-
matrixMaximumRowCount: number;
|
275
|
-
/**
|
276
|
-
* This property is obsolete. Use the [`settings.matrix.maxRowCountInCondition`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
277
|
-
*/
|
278
|
-
matrixMaxRowCountInCondition: number;
|
279
|
-
/**
|
280
|
-
* This property is obsolete. Use the [`settings.matrix.renderRemoveAsIcon`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
281
|
-
*/
|
282
|
-
matrixRenderRemoveAsIcon: boolean;
|
283
|
-
/**
|
284
|
-
* An object with properties that apply to [Dynamic Panel](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model) questions.
|
285
|
-
*
|
286
|
-
* Nested properties:
|
287
|
-
*
|
288
|
-
* - `maxPanelCount`: `Number`\
|
289
|
-
* A maximum number of panels in Dynamic Panel. Default value: 100.\
|
290
|
-
* You can specify this setting for an individual Dynamic Panel: [`maxPanelCount`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#maxPanelCount).
|
291
|
-
*
|
292
|
-
* - `maxPanelCountInCondition`: `Number`\
|
293
|
-
* A maximum number of Dynamic Panel panels included in the Condition drop-down menu in Survey Creator. This menu is used to configure conditional survey logic. Default value: 1.\
|
294
|
-
* If you set this property to 0, the Condition menu does not include any panel questions. Users still can specify conditions that use panel questions but only with Manual Entry.
|
295
|
-
*/
|
296
|
-
panel: {
|
297
|
-
maxPanelCount: number;
|
298
|
-
maxPanelCountInCondition: number;
|
299
|
-
};
|
300
|
-
/**
|
301
|
-
* This property is obsolete. Use the [`settings.panel.maxPanelCountInCondition`](https://surveyjs.io/form-library/documentation/api-reference/settings#panel) property instead.
|
302
|
-
*/
|
303
|
-
panelDynamicMaxPanelCountInCondition: number;
|
304
|
-
/**
|
305
|
-
* This property is obsolete. Use the [`settings.panel.maxPanelCount`](https://surveyjs.io/form-library/documentation/api-reference/settings#panel) property instead.
|
306
|
-
*/
|
307
|
-
panelMaximumPanelCount: number;
|
308
|
-
/**
|
309
|
-
* An object with properties that configure questions in read-only mode.
|
310
|
-
*
|
311
|
-
* Nested properties:
|
312
|
-
*
|
313
|
-
* - `commentRenderMode`: `"textarea"` (default) | `"div"`\
|
314
|
-
* Specifies how to render the input field of [Comment](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model) questions in [read-only](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model#readOnly) mode: as a disabled `<textarea>` element or as a `<div>` element with a non-editable question value within it.
|
315
|
-
*
|
316
|
-
* - `textRenderMode`: `"input"` (default) | `"div"`\
|
317
|
-
* Specifies how to render the input field of [Text](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model) questions in [read-only](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#readOnly) mode: as a disabled `<input>` element or as a `<div>` element with a non-editable question value within it.
|
318
|
-
*/
|
319
|
-
readOnly: {
|
320
|
-
commentRenderMode: string;
|
321
|
-
textRenderMode: string;
|
322
|
-
};
|
323
|
-
/**
|
324
|
-
* This property is obsolete. Use the [`settings.readOnly.commentRenderMode`](https://surveyjs.io/form-library/documentation/api-reference/settings#readOnly) property instead.
|
325
|
-
*/
|
326
|
-
readOnlyCommentRenderMode: string;
|
327
|
-
/**
|
328
|
-
* This property is obsolete. Use the [`settings.readOnly.textRenderMode`](https://surveyjs.io/form-library/documentation/api-reference/settings#readOnly) property instead.
|
329
|
-
*/
|
330
|
-
readOnlyTextRenderMode: string;
|
331
|
-
/**
|
332
|
-
* An object with properties that configure question numbering.
|
333
|
-
*
|
334
|
-
* Nested properties:
|
335
|
-
*
|
336
|
-
* - `includeQuestionsWithHiddenNumber`: `Boolean`\
|
337
|
-
* Specifies whether to number questions whose [`hideNumber`](https://surveyjs.io/form-library/documentation/api-reference/question#hideNumber) property is enabled. Default value: `false`.
|
338
|
-
*
|
339
|
-
* - `includeQuestionsWithHiddenTitle`: `Boolean`\
|
340
|
-
* Specifies whether to number questions whose [`titleLocation`](https://surveyjs.io/form-library/documentation/api-reference/question#titleLocation) property is set to `"hidden"`. Default value: `false`.
|
341
|
-
*/
|
342
|
-
numbering: {
|
343
|
-
includeQuestionsWithHiddenNumber: boolean;
|
344
|
-
includeQuestionsWithHiddenTitle: boolean;
|
345
|
-
};
|
346
|
-
/**
|
347
|
-
* This property is obsolete. Use the [`settings.numbering.includeQuestionsWithHiddenTitle`](https://surveyjs.io/form-library/documentation/api-reference/settings#numbering) property instead.
|
348
|
-
*/
|
349
|
-
setQuestionVisibleIndexForHiddenTitle: boolean;
|
350
|
-
/**
|
351
|
-
* This property is obsolete. Use the [`settings.numbering.includeQuestionsWithHiddenNumber`](https://surveyjs.io/form-library/documentation/api-reference/settings#numbering) property instead.
|
352
|
-
*/
|
353
|
-
setQuestionVisibleIndexForHiddenNumber: boolean;
|
354
|
-
/**
|
355
|
-
* Specifies an action to perform when users press the Enter key within a survey.
|
356
|
-
*
|
357
|
-
* Possible values:
|
358
|
-
*
|
359
|
-
* - `"moveToNextEditor"` - Moves focus to the next editor.
|
360
|
-
* - `"loseFocus"` - Removes focus from the current editor.
|
361
|
-
* - `"default"` - Behaves as a standard `<input>` element.
|
362
|
-
*/
|
363
|
-
enterKeyAction: "default" | "moveToNextEditor" | "loseFocus";
|
364
|
-
/**
|
365
|
-
* An object that configures string comparison.
|
366
|
-
*
|
367
|
-
* Nested properties:
|
368
|
-
*
|
369
|
-
* - `trimStrings`: `Boolean`\
|
370
|
-
* Specifies whether to remove whitespace from both ends of a string before the comparison. Default value: `true`.
|
371
|
-
*
|
372
|
-
* - `caseSensitive`: `Boolean`\
|
373
|
-
* Specifies whether to differentiate between capital and lower-case letters. Default value: `false`.
|
374
|
-
*/
|
375
|
-
comparator: {
|
376
|
-
trimStrings: boolean;
|
377
|
-
caseSensitive: boolean;
|
378
|
-
};
|
379
|
-
expressionDisableConversionChar: string;
|
380
|
-
commentPrefix: string;
|
381
|
-
/**
|
382
|
-
* A suffix added to the name of the property that stores comments.
|
383
|
-
*
|
384
|
-
* Default value: "-Comment"
|
385
|
-
*
|
386
|
-
* You can specify this setting for an individual survey: [`commentSuffix`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#commentSuffix).
|
387
|
-
*/
|
388
|
-
commentSuffix: string;
|
389
|
-
/**
|
390
|
-
* A separator used in a shorthand notation that specifies a value and display text for an [`ItemValue`](https://surveyjs.io/form-library/documentation/api-reference/itemvalue) object: `"value|text"`.
|
391
|
-
*
|
392
|
-
* Default value: `"|"`
|
393
|
-
*/
|
394
|
-
itemValueSeparator: string;
|
395
|
-
/**
|
396
|
-
* A maximum number of rate values in a [Rating](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model) question.
|
397
|
-
*
|
398
|
-
* Default value: 20
|
399
|
-
*/
|
400
|
-
ratingMaximumRateValueCount: number;
|
401
|
-
/**
|
402
|
-
* Specifies whether to close the drop-down menu of a [TagBox](https://surveyjs.io/form-library/examples/how-to-create-multiselect-tag-box/) question after a user selects a value.
|
403
|
-
*
|
404
|
-
* This setting applies to all TagBox questions on a page. You can use the [closeOnSelect](https://surveyjs.io/form-library/documentation/api-reference/dropdown-tag-box-model#closeOnSelect) property to specify the same setting for an individual TagBox question.
|
405
|
-
*/
|
406
|
-
tagboxCloseOnSelect: boolean;
|
407
|
-
/**
|
408
|
-
* A property that allows you to display a custom confirm dialog instead of the standard browser dialog. Set this property to a function that renders your custom dialog window.
|
409
|
-
* @param message A message to be displayed in the confirm dialog window.
|
410
|
-
*/
|
411
|
-
confirmActionFunc: (message: string) => boolean;
|
412
|
-
/**
|
413
|
-
* A minimum width value for all survey elements.
|
414
|
-
*
|
415
|
-
* Default value: `"300px"`
|
416
|
-
*
|
417
|
-
* You can override this setting for individual elements: [`minWidth`](https://surveyjs.io/form-library/documentation/api-reference/surveyelement#minWidth).
|
418
|
-
*/
|
419
|
-
minWidth: string;
|
420
|
-
/**
|
421
|
-
* A maximum width value for all survey elements.
|
422
|
-
*
|
423
|
-
* Default value: `"100%"`
|
424
|
-
*
|
425
|
-
* You can override this setting for individual elements: [`maxWidth`](https://surveyjs.io/form-library/documentation/api-reference/surveyelement#maxWidth).
|
426
|
-
*/
|
427
|
-
maxWidth: string;
|
428
|
-
/**
|
429
|
-
* Specifies how many times surveys can re-evaluate expressions when a question value changes. This limit helps avoid recursions in expressions.
|
430
|
-
*
|
431
|
-
* Default value: 10
|
432
|
-
*/
|
433
|
-
maxConditionRunCountOnValueChanged: number;
|
434
|
-
/**
|
435
|
-
* An object that configures notifications.
|
436
|
-
*
|
437
|
-
* Nested properties:
|
438
|
-
*
|
439
|
-
* - `lifetime`: `Number`\
|
440
|
-
* Specifies a time period during which a notification is displayed; measured in milliseconds.
|
441
|
-
*/
|
442
|
-
notifications: {
|
443
|
-
lifetime: number;
|
444
|
-
};
|
445
|
-
/**
|
446
|
-
* Specifies the direction in which to lay out Checkbox and Radiogroup items. This setting affects the resulting UI when items are arranged in [more than one column](https://surveyjs.io/form-library/documentation/api-reference/checkbox-question-model#colCount).
|
447
|
-
*
|
448
|
-
* Possible values:
|
449
|
-
*
|
450
|
-
* - `"row"` (default) - Items fill the current row, then move on to the next row.
|
451
|
-
* - `"column"` - Items fill the current column, then move on to the next column.
|
452
|
-
*/
|
453
|
-
showItemsInOrder: string;
|
454
|
-
/**
|
455
|
-
* A value to save in survey results when respondents select the None choice item.
|
456
|
-
*
|
457
|
-
* Default value: `"none"`
|
458
|
-
*/
|
459
|
-
noneItemValue: string;
|
460
|
-
/**
|
461
|
-
* A list of supported validators by question type.
|
462
|
-
*/
|
463
|
-
supportedValidators: {
|
464
|
-
question: string[];
|
465
|
-
comment: string[];
|
466
|
-
text: string[];
|
467
|
-
checkbox: string[];
|
468
|
-
imagepicker: string[];
|
469
|
-
};
|
470
|
-
/**
|
471
|
-
* Specifies a minimum date that users can enter into a [Text](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model) question with [`inputType`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#inputType) set to `"date"` or `"datetime-local"`. Set this property to a string with the folllowing format: `"yyyy-mm-dd"`.
|
472
|
-
*/
|
473
|
-
minDate: string;
|
474
|
-
/**
|
475
|
-
* Specifies a maximum date that users can enter into a [Text](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model) question with [`inputType`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#inputType) set to `"date"` or `"datetime-local"`. Set this property to a string with the folllowing format: `"yyyy-mm-dd"`.
|
476
|
-
*/
|
477
|
-
maxDate: string;
|
478
|
-
showModal: (componentName: string, data: any, onApply: () => boolean, onCancel?: () => void, cssClass?: string, title?: string, displayMode?: "popup" | "overlay") => any;
|
479
|
-
supportCreatorV2: boolean;
|
480
|
-
showDefaultItemsInCreatorV2: boolean;
|
481
|
-
/**
|
482
|
-
* An object that specifies icon replacements. Object keys are built-in icon names. To use a custom icon, assign its name to the key of the icon you want to replace:
|
483
|
-
*
|
484
|
-
* ```js
|
485
|
-
* import { settings } from "survey-core";
|
486
|
-
*
|
487
|
-
* settings.customIcons["icon-redo"] = "custom-redo-icon";
|
488
|
-
* ```
|
489
|
-
*
|
490
|
-
* For more information about icons in SurveyJS, refer to the following help topic: [UI Icons](https://surveyjs.io/form-library/documentation/icons).
|
491
|
-
*/
|
492
|
-
customIcons: {};
|
493
|
-
/**
|
494
|
-
* Specifies which part of a choice item responds to a drag gesture in Ranking questions.
|
495
|
-
*
|
496
|
-
* Possible values:
|
497
|
-
*
|
498
|
-
* - `"entireItem"` (default) - Users can use the entire choice item as a drag handle.
|
499
|
-
* - `"icon"` - Users can only use the choice item icon as a drag handle.
|
500
|
-
*/
|
501
|
-
rankingDragHandleArea: string;
|
502
|
-
/**
|
503
|
-
* Specifies environment in which SurveyJS will exist
|
504
|
-
*/
|
505
|
-
environment: ISurveyEnvironment;
|
506
|
-
showMaxLengthIndicator: boolean;
|
507
|
-
titleTags: {
|
508
|
-
survey: string;
|
509
|
-
page: string;
|
510
|
-
panel: string;
|
511
|
-
question: string;
|
512
|
-
};
|
513
|
-
questions: {
|
514
|
-
inputTypes: string[];
|
515
|
-
dataList: string[];
|
516
|
-
};
|
517
|
-
};
|
518
|
-
}
|
519
|
-
declare module "helpers" {
|
520
|
-
export interface HashTable<T = any> {
|
521
|
-
[key: string]: T;
|
522
|
-
}
|
523
|
-
export class Helpers {
|
524
|
-
/**
|
525
|
-
* A static methods that returns true if a value undefined, null, empty string or empty array.
|
526
|
-
* @param value
|
527
|
-
*/
|
528
|
-
static isValueEmpty(value: any): boolean;
|
529
|
-
static isArrayContainsEqual(x: any, y: any): boolean;
|
530
|
-
static isArraysEqual(x: any, y: any, ignoreOrder?: boolean, caseSensitive?: boolean, trimStrings?: boolean): boolean;
|
531
|
-
static compareStrings(x: string, y: string): number;
|
532
|
-
static isTwoValueEquals(x: any, y: any, ignoreOrder?: boolean, caseSensitive?: boolean, trimStrings?: boolean): boolean;
|
533
|
-
static randomizeArray<T>(array: Array<T>): Array<T>;
|
534
|
-
static getUnbindValue(value: any): any;
|
535
|
-
static createCopy(obj: any): any;
|
536
|
-
static isConvertibleToNumber(value: any): boolean;
|
537
|
-
static isNumber(value: any): boolean;
|
538
|
-
static getNumber(value: any): number;
|
539
|
-
private static prepareStringToNumber;
|
540
|
-
static getMaxLength(maxLength: number, surveyLength: number): any;
|
541
|
-
static getRemainingCharacterCounterText(newValue: string | undefined, maxLength: number | null): string;
|
542
|
-
static getNumberByIndex(index: number, startIndexStr: string): string;
|
543
|
-
static isCharNotLetterAndDigit(ch: string): boolean;
|
544
|
-
static isCharDigit(ch: string): boolean;
|
545
|
-
private static getNumberFromStr;
|
546
|
-
private static countDecimals;
|
547
|
-
static correctAfterPlusMinis(a: number, b: number, res: number): number;
|
548
|
-
static sumAnyValues(a: any, b: any): any;
|
549
|
-
static correctAfterMultiple(a: number, b: number, res: number): number;
|
550
|
-
static convertArrayValueToObject(src: Array<any>, propName: string, dest?: Array<any>): Array<any>;
|
551
|
-
private static findObjByPropValue;
|
552
|
-
static convertArrayObjectToValue(src: Array<any>, propName: string): Array<any>;
|
553
|
-
static convertDateToString(date: Date): string;
|
554
|
-
static convertDateTimeToString(date: Date): string;
|
555
|
-
static convertValToQuestionVal(val: any, inputType?: string): any;
|
556
|
-
}
|
557
|
-
}
|
558
|
-
declare module "localization/english" {
|
559
|
-
export var englishStrings: {
|
560
|
-
pagePrevText: string;
|
561
|
-
pageNextText: string;
|
562
|
-
completeText: string;
|
563
|
-
previewText: string;
|
564
|
-
editText: string;
|
565
|
-
startSurveyText: string;
|
566
|
-
otherItemText: string;
|
567
|
-
noneItemText: string;
|
568
|
-
selectAllItemText: string;
|
569
|
-
progressText: string;
|
570
|
-
indexText: string;
|
571
|
-
panelDynamicProgressText: string;
|
572
|
-
panelDynamicTabTextFormat: string;
|
573
|
-
questionsProgressText: string;
|
574
|
-
emptySurvey: string;
|
575
|
-
completingSurvey: string;
|
576
|
-
completingSurveyBefore: string;
|
577
|
-
loadingSurvey: string;
|
578
|
-
placeholder: string;
|
579
|
-
ratingOptionsCaption: string;
|
580
|
-
value: string;
|
581
|
-
requiredError: string;
|
582
|
-
requiredErrorInPanel: string;
|
583
|
-
requiredInAllRowsError: string;
|
584
|
-
numericError: string;
|
585
|
-
minError: string;
|
586
|
-
maxError: string;
|
587
|
-
textMinLength: string;
|
588
|
-
textMaxLength: string;
|
589
|
-
textMinMaxLength: string;
|
590
|
-
minRowCountError: string;
|
591
|
-
minSelectError: string;
|
592
|
-
maxSelectError: string;
|
593
|
-
numericMinMax: string;
|
594
|
-
numericMin: string;
|
595
|
-
numericMax: string;
|
596
|
-
invalidEmail: string;
|
597
|
-
invalidExpression: string;
|
598
|
-
urlRequestError: string;
|
599
|
-
urlGetChoicesError: string;
|
600
|
-
exceedMaxSize: string;
|
601
|
-
otherRequiredError: string;
|
602
|
-
uploadingFile: string;
|
603
|
-
loadingFile: string;
|
604
|
-
chooseFile: string;
|
605
|
-
noFileChosen: string;
|
606
|
-
fileDragAreaPlaceholder: string;
|
607
|
-
confirmDelete: string;
|
608
|
-
keyDuplicationError: string;
|
609
|
-
addColumn: string;
|
610
|
-
addRow: string;
|
611
|
-
removeRow: string;
|
612
|
-
emptyRowsText: string;
|
613
|
-
addPanel: string;
|
614
|
-
removePanel: string;
|
615
|
-
choices_Item: string;
|
616
|
-
matrix_column: string;
|
617
|
-
matrix_row: string;
|
618
|
-
multipletext_itemname: string;
|
619
|
-
savingData: string;
|
620
|
-
savingDataError: string;
|
621
|
-
savingDataSuccess: string;
|
622
|
-
saveAgainButton: string;
|
623
|
-
timerMin: string;
|
624
|
-
timerSec: string;
|
625
|
-
timerSpentAll: string;
|
626
|
-
timerSpentPage: string;
|
627
|
-
timerSpentSurvey: string;
|
628
|
-
timerLimitAll: string;
|
629
|
-
timerLimitPage: string;
|
630
|
-
timerLimitSurvey: string;
|
631
|
-
clearCaption: string;
|
632
|
-
signaturePlaceHolder: string;
|
633
|
-
chooseFileCaption: string;
|
634
|
-
removeFileCaption: string;
|
635
|
-
booleanCheckedLabel: string;
|
636
|
-
booleanUncheckedLabel: string;
|
637
|
-
confirmRemoveFile: string;
|
638
|
-
confirmRemoveAllFiles: string;
|
639
|
-
questionTitlePatternText: string;
|
640
|
-
modalCancelButtonText: string;
|
641
|
-
modalApplyButtonText: string;
|
642
|
-
filterStringPlaceholder: string;
|
643
|
-
emptyMessage: string;
|
644
|
-
noEntriesText: string;
|
645
|
-
noEntriesReadonlyText: string;
|
646
|
-
more: string;
|
647
|
-
tagboxDoneButtonCaption: string;
|
648
|
-
selectToRankEmptyRankedAreaText: string;
|
649
|
-
selectToRankEmptyUnrankedAreaText: string;
|
650
|
-
};
|
651
|
-
}
|
652
|
-
declare module "surveyStrings" {
|
653
|
-
export var surveyLocalization: {
|
654
|
-
currentLocaleValue: string;
|
655
|
-
defaultLocaleValue: string;
|
656
|
-
locales: {
|
657
|
-
[index: string]: any;
|
658
|
-
};
|
659
|
-
localeNames: {
|
660
|
-
[index: string]: any;
|
142
|
+
localeNames: {
|
143
|
+
[index: string]: any;
|
661
144
|
};
|
662
145
|
supportedLocales: any[];
|
663
146
|
currentLocale: string;
|
@@ -1517,7 +1000,8 @@ declare module "utils/utils" {
|
|
1517
1000
|
function getIconNameFromProxy(iconName: string): string;
|
1518
1001
|
function createSvg(size: number | string, width: number, height: number, iconName: string, svgElem: any, title: string): void;
|
1519
1002
|
export function unwrap<T>(value: T | (() => T)): T;
|
1520
|
-
export function
|
1003
|
+
export function getRenderedSize(val: string | number): number;
|
1004
|
+
export function getRenderedStyleSize(val: string | number): string;
|
1521
1005
|
export interface IAttachKey2clickOptions {
|
1522
1006
|
processEsc?: boolean;
|
1523
1007
|
disableTabStop?: boolean;
|
@@ -1721,96 +1205,6 @@ declare module "list" {
|
|
1721
1205
|
dispose(): void;
|
1722
1206
|
}
|
1723
1207
|
}
|
1724
|
-
declare module "utils/popup" {
|
1725
|
-
export type VerticalPosition = "top" | "bottom" | "middle";
|
1726
|
-
export type HorizontalPosition = "left" | "right" | "center";
|
1727
|
-
export type PositionMode = "flex" | "fixed";
|
1728
|
-
export interface IPosition {
|
1729
|
-
left?: number | string;
|
1730
|
-
top?: number | string;
|
1731
|
-
}
|
1732
|
-
export interface INumberPosition extends IPosition {
|
1733
|
-
left?: number;
|
1734
|
-
top?: number;
|
1735
|
-
}
|
1736
|
-
export interface ISize {
|
1737
|
-
width: number;
|
1738
|
-
height: number;
|
1739
|
-
}
|
1740
|
-
export class PopupUtils {
|
1741
|
-
static bottomIndent: number;
|
1742
|
-
static calculatePosition(targetRect: ClientRect, height: number, width: number, verticalPosition: VerticalPosition, horizontalPosition: HorizontalPosition, showPointer: boolean, positionMode?: PositionMode): INumberPosition;
|
1743
|
-
static updateVerticalDimensions(top: number, height: number, windowHeight: number): any;
|
1744
|
-
static updateHorizontalDimensions(left: number, width: number, windowWidth: number, horizontalPosition: HorizontalPosition, positionMode?: PositionMode, margins?: {
|
1745
|
-
left: number;
|
1746
|
-
right: number;
|
1747
|
-
}): {
|
1748
|
-
width: number;
|
1749
|
-
left: number;
|
1750
|
-
};
|
1751
|
-
static updateVerticalPosition(targetRect: ClientRect, height: number, verticalPosition: VerticalPosition, showPointer: boolean, windowHeight: number): VerticalPosition;
|
1752
|
-
static calculatePopupDirection(verticalPosition: VerticalPosition, horizontalPosition: HorizontalPosition): string;
|
1753
|
-
static calculatePointerTarget(targetRect: ClientRect, top: number, left: number, verticalPosition: VerticalPosition, horizontalPosition: HorizontalPosition, marginLeft?: number, marginRight?: number): INumberPosition;
|
1754
|
-
}
|
1755
|
-
}
|
1756
|
-
declare module "popup" {
|
1757
|
-
import { Base, EventBase } from "base";
|
1758
|
-
import { IAction } from "actions/action";
|
1759
|
-
import { VerticalPosition, HorizontalPosition, PositionMode } from "utils/popup";
|
1760
|
-
export interface IPopupOptionsBase {
|
1761
|
-
onHide?: () => void;
|
1762
|
-
onShow?: () => void;
|
1763
|
-
onApply?: () => boolean;
|
1764
|
-
onCancel?: () => void;
|
1765
|
-
cssClass?: string;
|
1766
|
-
title?: string;
|
1767
|
-
verticalPosition?: VerticalPosition;
|
1768
|
-
horizontalPosition?: HorizontalPosition;
|
1769
|
-
showPointer?: boolean;
|
1770
|
-
isModal?: boolean;
|
1771
|
-
displayMode?: "popup" | "overlay";
|
1772
|
-
}
|
1773
|
-
export interface IDialogOptions extends IPopupOptionsBase {
|
1774
|
-
componentName: string;
|
1775
|
-
data: any;
|
1776
|
-
onApply: () => boolean;
|
1777
|
-
}
|
1778
|
-
export interface IPopupModel<T = any> extends IDialogOptions {
|
1779
|
-
contentComponentName: string;
|
1780
|
-
contentComponentData: T;
|
1781
|
-
}
|
1782
|
-
export class PopupModel<T = any> extends Base {
|
1783
|
-
setWidthByTarget: boolean;
|
1784
|
-
focusFirstInputSelector: string;
|
1785
|
-
contentComponentName: string;
|
1786
|
-
contentComponentData: T;
|
1787
|
-
verticalPosition: VerticalPosition;
|
1788
|
-
horizontalPosition: HorizontalPosition;
|
1789
|
-
showPointer: boolean;
|
1790
|
-
isModal: boolean;
|
1791
|
-
isFocusedContent: boolean;
|
1792
|
-
isFocusedContainer: boolean;
|
1793
|
-
onCancel: () => void;
|
1794
|
-
onApply: () => boolean;
|
1795
|
-
onHide: () => void;
|
1796
|
-
onShow: () => void;
|
1797
|
-
cssClass: string;
|
1798
|
-
title: string;
|
1799
|
-
displayMode: "popup" | "overlay";
|
1800
|
-
positionMode: PositionMode;
|
1801
|
-
onVisibilityChanged: EventBase<PopupModel>;
|
1802
|
-
onFooterActionsCreated: EventBase<Base>;
|
1803
|
-
onRecalculatePosition: EventBase<Base>;
|
1804
|
-
private refreshInnerModel;
|
1805
|
-
constructor(contentComponentName: string, contentComponentData: T, verticalPosition?: VerticalPosition, horizontalPosition?: HorizontalPosition, showPointer?: boolean, isModal?: boolean, onCancel?: () => void, onApply?: () => boolean, onHide?: () => void, onShow?: () => void, cssClass?: string, title?: string);
|
1806
|
-
get isVisible(): boolean;
|
1807
|
-
set isVisible(value: boolean);
|
1808
|
-
toggleVisibility(): void;
|
1809
|
-
recalculatePosition(isResetHeight: boolean): void;
|
1810
|
-
updateFooterActions(footerActions: Array<IAction>): Array<IAction>;
|
1811
|
-
}
|
1812
|
-
export function createDialogOptions(componentName: string, data: any, onApply: () => boolean, onCancel?: () => void, onHide?: () => void, onShow?: () => void, cssClass?: string, title?: string, displayMode?: "popup" | "overlay"): IDialogOptions;
|
1813
|
-
}
|
1814
1208
|
declare module "actions/action" {
|
1815
1209
|
import { ILocalizableOwner, LocalizableString } from "localizablestring";
|
1816
1210
|
import { Base } from "base";
|
@@ -2789,7 +2183,6 @@ declare module "defaultCss/defaultV2Css" {
|
|
2789
2183
|
};
|
2790
2184
|
variables: {
|
2791
2185
|
mobileWidth: string;
|
2792
|
-
imagepickerGapBetweenItems: string;
|
2793
2186
|
themeMark: string;
|
2794
2187
|
};
|
2795
2188
|
tagbox: {
|
@@ -4452,31 +3845,189 @@ declare module "question_baseselect" {
|
|
4452
3845
|
protected onValueChanged(): void;
|
4453
3846
|
protected getDefaultItemComponent(): string;
|
4454
3847
|
/**
|
4455
|
-
* The name of a component used to render items.
|
3848
|
+
* The name of a component used to render items.
|
3849
|
+
*/
|
3850
|
+
get itemComponent(): string;
|
3851
|
+
set itemComponent(value: string);
|
3852
|
+
protected updateCssClasses(res: any, css: any): void;
|
3853
|
+
protected calcCssClasses(css: any): any;
|
3854
|
+
}
|
3855
|
+
/**
|
3856
|
+
* A base class for multiple-selection question types that can display choice items in multiple columns ([Checkbox](https://surveyjs.io/form-library/documentation/questioncheckboxmodel), [Radiogroup](https://surveyjs.io/form-library/documentation/questionradiogroupmodel), [Image Picker](https://surveyjs.io/form-library/documentation/questionimagepickermodel)).
|
3857
|
+
*/
|
3858
|
+
export class QuestionCheckboxBase extends QuestionSelectBase {
|
3859
|
+
colCountChangedCallback: () => void;
|
3860
|
+
constructor(name: string);
|
3861
|
+
/**
|
3862
|
+
* Get or sets the number of columns used to arrange choice items.
|
3863
|
+
*
|
3864
|
+
* Set this property to 0 if you want to display all items in one line. The default value depends on the available width.
|
3865
|
+
* @see separateSpecialChoices
|
3866
|
+
*/
|
3867
|
+
get colCount(): number;
|
3868
|
+
set colCount(value: number);
|
3869
|
+
clickItemHandler(item: ItemValue, checked: boolean): void;
|
3870
|
+
protected onParentChanged(): void;
|
3871
|
+
protected onParentQuestionChanged(): void;
|
3872
|
+
protected getSearchableItemValueKeys(keys: Array<string>): void;
|
3873
|
+
}
|
3874
|
+
}
|
3875
|
+
declare module "validator" {
|
3876
|
+
import { Base } from "base";
|
3877
|
+
import { ISurveyErrorOwner, ISurvey } from "base-interfaces";
|
3878
|
+
import { SurveyError } from "survey-error";
|
3879
|
+
import { LocalizableString } from "localizablestring";
|
3880
|
+
export class ValidatorResult {
|
3881
|
+
value: any;
|
3882
|
+
error: SurveyError;
|
3883
|
+
constructor(value: any, error?: SurveyError);
|
3884
|
+
}
|
3885
|
+
/**
|
3886
|
+
* Base SurveyJS validator class.
|
3887
|
+
*/
|
3888
|
+
export class SurveyValidator extends Base {
|
3889
|
+
errorOwner: ISurveyErrorOwner;
|
3890
|
+
onAsyncCompleted: (result: ValidatorResult) => void;
|
3891
|
+
constructor();
|
3892
|
+
getSurvey(live?: boolean): ISurvey;
|
3893
|
+
get text(): string;
|
3894
|
+
set text(value: string);
|
3895
|
+
get isValidateAllValues(): boolean;
|
3896
|
+
get locText(): LocalizableString;
|
3897
|
+
protected getErrorText(name: string): string;
|
3898
|
+
protected getDefaultErrorText(name: string): string;
|
3899
|
+
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
|
3900
|
+
get isRunning(): boolean;
|
3901
|
+
get isAsync(): boolean;
|
3902
|
+
getLocale(): string;
|
3903
|
+
getMarkdownHtml(text: string, name: string): string;
|
3904
|
+
getRenderer(name: string): string;
|
3905
|
+
getRendererContext(locStr: LocalizableString): any;
|
3906
|
+
getProcessedText(text: string): string;
|
3907
|
+
protected createCustomError(name: string): SurveyError;
|
3908
|
+
toString(): string;
|
3909
|
+
}
|
3910
|
+
export interface IValidatorOwner {
|
3911
|
+
getValidators(): Array<SurveyValidator>;
|
3912
|
+
validatedValue: any;
|
3913
|
+
getValidatorTitle(): string;
|
3914
|
+
getDataFilteredValues(): any;
|
3915
|
+
getDataFilteredProperties(): any;
|
3916
|
+
}
|
3917
|
+
export class ValidatorRunner {
|
3918
|
+
private asyncValidators;
|
3919
|
+
onAsyncCompleted: (errors: Array<SurveyError>) => void;
|
3920
|
+
run(owner: IValidatorOwner): Array<SurveyError>;
|
3921
|
+
private prepareAsyncValidators;
|
3922
|
+
}
|
3923
|
+
/**
|
3924
|
+
* Validate numeric values.
|
3925
|
+
*/
|
3926
|
+
export class NumericValidator extends SurveyValidator {
|
3927
|
+
constructor(minValue?: number, maxValue?: number);
|
3928
|
+
getType(): string;
|
3929
|
+
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
|
3930
|
+
protected getDefaultErrorText(name: string): string;
|
3931
|
+
/**
|
3932
|
+
* The minValue property.
|
3933
|
+
*/
|
3934
|
+
get minValue(): number;
|
3935
|
+
set minValue(val: number);
|
3936
|
+
/**
|
3937
|
+
* The maxValue property.
|
3938
|
+
*/
|
3939
|
+
get maxValue(): number;
|
3940
|
+
set maxValue(val: number);
|
3941
|
+
}
|
3942
|
+
/**
|
3943
|
+
* Validate text values.
|
3944
|
+
*/
|
3945
|
+
export class TextValidator extends SurveyValidator {
|
3946
|
+
constructor();
|
3947
|
+
getType(): string;
|
3948
|
+
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
|
3949
|
+
protected getDefaultErrorText(name: string): string;
|
3950
|
+
/**
|
3951
|
+
* The minLength property.
|
3952
|
+
*/
|
3953
|
+
get minLength(): number;
|
3954
|
+
set minLength(val: number);
|
3955
|
+
/**
|
3956
|
+
* The maxLength property.
|
3957
|
+
*/
|
3958
|
+
get maxLength(): number;
|
3959
|
+
set maxLength(val: number);
|
3960
|
+
/**
|
3961
|
+
* The allowDigits property.
|
4456
3962
|
*/
|
4457
|
-
get
|
4458
|
-
set
|
4459
|
-
protected updateCssClasses(res: any, css: any): void;
|
4460
|
-
protected calcCssClasses(css: any): any;
|
3963
|
+
get allowDigits(): boolean;
|
3964
|
+
set allowDigits(val: boolean);
|
4461
3965
|
}
|
4462
3966
|
/**
|
4463
|
-
*
|
3967
|
+
* Validates the number of answers.
|
4464
3968
|
*/
|
4465
|
-
export class
|
4466
|
-
|
4467
|
-
|
3969
|
+
export class AnswerCountValidator extends SurveyValidator {
|
3970
|
+
constructor(minCount?: number, maxCount?: number);
|
3971
|
+
getType(): string;
|
3972
|
+
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
|
3973
|
+
protected getDefaultErrorText(name: string): string;
|
4468
3974
|
/**
|
4469
|
-
*
|
4470
|
-
*
|
4471
|
-
* Set this property to 0 if you want to display all items in one line. The default value depends on the available width.
|
4472
|
-
* @see separateSpecialChoices
|
3975
|
+
* The minCount property.
|
4473
3976
|
*/
|
4474
|
-
get
|
4475
|
-
set
|
4476
|
-
|
4477
|
-
|
4478
|
-
|
4479
|
-
|
3977
|
+
get minCount(): number;
|
3978
|
+
set minCount(val: number);
|
3979
|
+
/**
|
3980
|
+
* The maxCount property.
|
3981
|
+
*/
|
3982
|
+
get maxCount(): number;
|
3983
|
+
set maxCount(val: number);
|
3984
|
+
}
|
3985
|
+
/**
|
3986
|
+
* Use it to validate the text by regular expressions.
|
3987
|
+
*
|
3988
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
3989
|
+
*/
|
3990
|
+
export class RegexValidator extends SurveyValidator {
|
3991
|
+
constructor(regex?: string);
|
3992
|
+
getType(): string;
|
3993
|
+
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
|
3994
|
+
private hasError;
|
3995
|
+
/**
|
3996
|
+
* The regex property.
|
3997
|
+
*/
|
3998
|
+
get regex(): string;
|
3999
|
+
set regex(val: string);
|
4000
|
+
}
|
4001
|
+
/**
|
4002
|
+
* Validate e-mail address in the text input
|
4003
|
+
*/
|
4004
|
+
export class EmailValidator extends SurveyValidator {
|
4005
|
+
private re;
|
4006
|
+
constructor();
|
4007
|
+
getType(): string;
|
4008
|
+
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
|
4009
|
+
protected getDefaultErrorText(name: string): string;
|
4010
|
+
}
|
4011
|
+
/**
|
4012
|
+
* Show error if expression returns false
|
4013
|
+
*/
|
4014
|
+
export class ExpressionValidator extends SurveyValidator {
|
4015
|
+
private conditionRunner;
|
4016
|
+
private isRunningValue;
|
4017
|
+
constructor(expression?: string);
|
4018
|
+
getType(): string;
|
4019
|
+
get isValidateAllValues(): boolean;
|
4020
|
+
get isAsync(): boolean;
|
4021
|
+
get isRunning(): boolean;
|
4022
|
+
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
|
4023
|
+
protected generateError(res: boolean, value: any, name: string): ValidatorResult;
|
4024
|
+
protected getDefaultErrorText(name: string): string;
|
4025
|
+
protected ensureConditionRunner(): boolean;
|
4026
|
+
/**
|
4027
|
+
* The expression property.
|
4028
|
+
*/
|
4029
|
+
get expression(): string;
|
4030
|
+
set expression(val: string);
|
4480
4031
|
}
|
4481
4032
|
}
|
4482
4033
|
declare module "question_expression" {
|
@@ -4519,6 +4070,7 @@ declare module "question_expression" {
|
|
4519
4070
|
* Default value: -1
|
4520
4071
|
* @see displayStyle
|
4521
4072
|
* @see minimumFractionDigits
|
4073
|
+
* @see precision
|
4522
4074
|
*/
|
4523
4075
|
get maximumFractionDigits(): number;
|
4524
4076
|
set maximumFractionDigits(val: number);
|
@@ -4576,6 +4128,15 @@ declare module "question_expression" {
|
|
4576
4128
|
*/
|
4577
4129
|
get useGrouping(): boolean;
|
4578
4130
|
set useGrouping(val: boolean);
|
4131
|
+
/**
|
4132
|
+
* Specifies how many decimal digits to keep in the expression value.
|
4133
|
+
*
|
4134
|
+
* Default value: -1 (unlimited)
|
4135
|
+
* @see maximumFractionDigits
|
4136
|
+
*/
|
4137
|
+
get precision(): number;
|
4138
|
+
set precision(val: number);
|
4139
|
+
private roundValue;
|
4579
4140
|
protected getValueAsStr(val: any): string;
|
4580
4141
|
}
|
4581
4142
|
export function getCurrecyCodes(): Array<string>;
|
@@ -5073,6 +4634,7 @@ declare module "question_matrixdynamic" {
|
|
5073
4634
|
protected setDefaultValue(): void;
|
5074
4635
|
moveRowByIndex(fromIndex: number, toIndex: number): void;
|
5075
4636
|
clearOnDrop(): void;
|
4637
|
+
initDataUI(): void;
|
5076
4638
|
/**
|
5077
4639
|
* The number of rows in the matrix.
|
5078
4640
|
* @see minRowCount
|
@@ -5821,6 +5383,7 @@ declare module "question_paneldynamic" {
|
|
5821
5383
|
private iscorrectValueWithPostPrefix;
|
5822
5384
|
getSharedQuestionFromArray(name: string, panelIndex: number): Question;
|
5823
5385
|
addConditionObjectsByContext(objects: Array<IConditionObject>, context: any): void;
|
5386
|
+
protected collectNestedQuestionsCore(questions: Question[], visibleOnly: boolean): void;
|
5824
5387
|
getConditionJson(operator?: string, path?: string): any;
|
5825
5388
|
protected onReadOnlyChanged(): void;
|
5826
5389
|
private updateNoEntriesTextDefaultLoc;
|
@@ -5937,7 +5500,7 @@ declare module "survey-events-api" {
|
|
5937
5500
|
}
|
5938
5501
|
export interface FileQuestionEventMixin {
|
5939
5502
|
/**
|
5940
|
-
* A File question instance for which the event is raised.
|
5503
|
+
* A File Upload question instance for which the event is raised.
|
5941
5504
|
*/
|
5942
5505
|
question: QuestionFileModel;
|
5943
5506
|
}
|
@@ -6095,6 +5658,10 @@ declare module "survey-events-api" {
|
|
6095
5658
|
* Returns `true` if the respondent is going forward along the survey.
|
6096
5659
|
*/
|
6097
5660
|
isGoingForward: boolean;
|
5661
|
+
/**
|
5662
|
+
* Returns `true` if the respondent is switching from the [preview page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page).
|
5663
|
+
*/
|
5664
|
+
isAfterPreview: boolean;
|
6098
5665
|
/**
|
6099
5666
|
* The current page.
|
6100
5667
|
*/
|
@@ -6403,45 +5970,45 @@ declare module "survey-events-api" {
|
|
6403
5970
|
}
|
6404
5971
|
export interface LoadFilesEvent extends FileQuestionEventMixin {
|
6405
5972
|
/**
|
6406
|
-
*
|
5973
|
+
* A File Upload question's name.
|
6407
5974
|
*/
|
6408
5975
|
name: string;
|
6409
5976
|
}
|
6410
5977
|
export interface UploadFilesEvent extends LoadFilesEvent {
|
6411
5978
|
/**
|
6412
|
-
*
|
5979
|
+
* A callback function that you should call when a file is uploaded successfully or when file upload fails. Pass `"success"` or `"error"` to indicate the operation status and, optionally, the downloaded file's data.
|
6413
5980
|
*/
|
6414
5981
|
callback: (status: string, data?: any) => any;
|
6415
5982
|
/**
|
6416
|
-
*
|
5983
|
+
* An array of JavaScript <a href="https://developer.mozilla.org/en-US/docs/Web/API/File" target="_blank">File</a> objects that represent files to upload.
|
6417
5984
|
*/
|
6418
5985
|
files: Array<File>;
|
6419
5986
|
}
|
6420
5987
|
export interface DownloadFileEvent extends LoadFilesEvent {
|
6421
5988
|
/**
|
6422
|
-
*
|
5989
|
+
* A callback function that you should call when a file is downloaded successfully or when deletion fails. Pass `"success"` or `"error"` to indicate the operation status and, optionally, the downloaded file's data as a Base64 string.
|
6423
5990
|
*/
|
6424
5991
|
callback: (status: string, data?: any) => any;
|
6425
5992
|
/**
|
6426
|
-
*
|
5993
|
+
* The File Upload question's [`value`](https://surveyjs.io/form-library/documentation/api-reference/file-model#value) that contains metadata about uploaded files.
|
6427
5994
|
*/
|
6428
5995
|
fileValue: any;
|
6429
5996
|
/**
|
6430
|
-
*
|
5997
|
+
* A file identifier (URL, file name, etc.) stored in survey results.
|
6431
5998
|
*/
|
6432
5999
|
content: any;
|
6433
6000
|
}
|
6434
6001
|
export interface ClearFilesEvent extends LoadFilesEvent {
|
6435
6002
|
/**
|
6436
|
-
*
|
6003
|
+
* A callback function that you should call when files are deleted successfully or when deletion fails. Pass `"success"` or `"error"` to indicate the operation status and, optionally, deleted files' data (`options.value`).
|
6437
6004
|
*/
|
6438
6005
|
callback: (status: string, data?: any) => any;
|
6439
6006
|
/**
|
6440
|
-
* a
|
6007
|
+
* The name of a file to delete. When this parameter is `null`, all files should be deleted.
|
6441
6008
|
*/
|
6442
6009
|
fileName: string;
|
6443
6010
|
/**
|
6444
|
-
*
|
6011
|
+
* The File Upload question's [`value`](https://surveyjs.io/form-library/documentation/api-reference/file-model#value) that contains metadata about uploaded files.
|
6445
6012
|
*/
|
6446
6013
|
value: any;
|
6447
6014
|
}
|
@@ -7591,6 +7158,7 @@ declare module "question_multipletext" {
|
|
7591
7158
|
addItem(name: string, title?: string): MultipleTextItemModel;
|
7592
7159
|
getItemByName(name: string): MultipleTextItemModel;
|
7593
7160
|
addConditionObjectsByContext(objects: Array<IConditionObject>, context: any): void;
|
7161
|
+
protected collectNestedQuestionsCore(questions: Question[], visibleOnly: boolean): void;
|
7594
7162
|
getConditionJson(operator?: string, path?: string): any;
|
7595
7163
|
locStrsChanged(): void;
|
7596
7164
|
localeChanged(): void;
|
@@ -7653,7 +7221,7 @@ declare module "themes" {
|
|
7653
7221
|
backgroundImageFit?: ImageFit;
|
7654
7222
|
backgroundImageAttachment?: ImageAttachment;
|
7655
7223
|
backgroundOpacity?: number;
|
7656
|
-
|
7224
|
+
isPanelless?: boolean;
|
7657
7225
|
}
|
7658
7226
|
}
|
7659
7227
|
declare module "survey" {
|
@@ -7720,6 +7288,7 @@ declare module "survey" {
|
|
7720
7288
|
private textPreProcessor;
|
7721
7289
|
private timerModelValue;
|
7722
7290
|
private navigationBarValue;
|
7291
|
+
onThemeApplied: EventBase<SurveyModel>;
|
7723
7292
|
/**
|
7724
7293
|
* An event that is raised after a [trigger](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#triggers) is executed.
|
7725
7294
|
*
|
@@ -8008,34 +7577,34 @@ declare module "survey" {
|
|
8008
7577
|
*/
|
8009
7578
|
onGetResult: EventBase<SurveyModel, GetResultEvent>;
|
8010
7579
|
/**
|
8011
|
-
* An event that is raised
|
7580
|
+
* An event that is raised when a File Upload question starts to upload a file. Applies only if [`storeDataAsText`](https://surveyjs.io/form-library/documentation/api-reference/file-model#storeDataAsText) is `false`. Use this event to upload files to your server.
|
8012
7581
|
*
|
8013
7582
|
* For information on event handler parameters, refer to descriptions within the interface.
|
8014
7583
|
*
|
8015
7584
|
* [View Demo](https://surveyjs.io/form-library/examples/file-upload/ (linkStyle))
|
8016
7585
|
* @see uploadFiles
|
8017
|
-
* @see QuestionFileModel.storeDataAsText
|
8018
7586
|
* @see onDownloadFile
|
8019
7587
|
* @see onClearFiles
|
8020
7588
|
*/
|
8021
7589
|
onUploadFiles: EventBase<SurveyModel, UploadFilesEvent>;
|
8022
7590
|
/**
|
8023
|
-
* An event that is raised
|
7591
|
+
* An event that is raised when a File Upload question starts to download a file. Use this event to implement file preview when your server stores only file names.
|
8024
7592
|
*
|
8025
7593
|
* For information on event handler parameters, refer to descriptions within the interface.
|
8026
7594
|
*
|
8027
|
-
* [View Demo](https://surveyjs.io/form-library/examples/file-
|
7595
|
+
* [View Demo](https://surveyjs.io/form-library/examples/store-file-names-in-survey-results/ (linkStyle))
|
8028
7596
|
* @see downloadFile
|
8029
7597
|
* @see onClearFiles
|
8030
7598
|
* @see onUploadFiles
|
8031
7599
|
*/
|
8032
7600
|
onDownloadFile: EventBase<SurveyModel, DownloadFileEvent>;
|
8033
7601
|
/**
|
8034
|
-
*
|
7602
|
+
* An event that is raised when users clear files in a [File Upload](https://surveyjs.io/form-library/documentation/api-reference/file-model) question. Use this event to delete files from your server.
|
8035
7603
|
*
|
8036
7604
|
* For information on event handler parameters, refer to descriptions within the interface.
|
8037
7605
|
*
|
8038
7606
|
* [View Demo](https://surveyjs.io/form-library/examples/file-delayed-upload/ (linkStyle))
|
7607
|
+
* @see clearFiles
|
8039
7608
|
* @see onDownloadFile
|
8040
7609
|
* @see onUploadFiles
|
8041
7610
|
*/
|
@@ -8385,6 +7954,7 @@ declare module "survey" {
|
|
8385
7954
|
private getNavigationCss;
|
8386
7955
|
private lazyRenderingValue;
|
8387
7956
|
showBrandInfo: boolean;
|
7957
|
+
enterKeyAction: "moveToNextEditor" | "loseFocus" | "default";
|
8388
7958
|
/**
|
8389
7959
|
* By default all rows are rendered no matters if they are visible or not.
|
8390
7960
|
* Set it true, and survey markup rows will be rendered only if they are visible in viewport.
|
@@ -8447,7 +8017,7 @@ declare module "survey" {
|
|
8447
8017
|
/**
|
8448
8018
|
* Specifies whether to save survey results when respondents switch between pages. Handle the [`onPartialSend`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onPartialSend) event to implement the save operation.
|
8449
8019
|
*
|
8450
|
-
* [Continue an Incomplete Survey](https://surveyjs.io/form-library/documentation/handle-survey-results-continue-incomplete (linkStyle))
|
8020
|
+
* [Continue an Incomplete Survey](https://surveyjs.io/form-library/documentation/handle-survey-results-continue-incomplete (linkStyle))
|
8451
8021
|
*/
|
8452
8022
|
get sendResultOnPageNext(): boolean;
|
8453
8023
|
set sendResultOnPageNext(val: boolean);
|
@@ -8477,16 +8047,21 @@ declare module "survey" {
|
|
8477
8047
|
get focusOnFirstError(): boolean;
|
8478
8048
|
set focusOnFirstError(val: boolean);
|
8479
8049
|
/**
|
8480
|
-
* Gets or sets the navigation buttons
|
8481
|
-
*
|
8482
|
-
*
|
8050
|
+
* Gets or sets the position of the Start, Next, Previous, and Complete navigation buttons and controls their visibility.
|
8051
|
+
*
|
8052
|
+
* Possible values:
|
8053
|
+
*
|
8054
|
+
* - `"bottom"` (default) - Displays the navigation buttons below survey content.
|
8055
|
+
* - `"top"` - Displays the navigation buttons above survey content.
|
8056
|
+
* - `"both"` - Displays the navigation buttons above and below survey content.
|
8057
|
+
* - `"none"` - Hides the navigation buttons. This setting may be useful if you [implement custom external navigation](https://surveyjs.io/form-library/examples/external-form-navigation-system/).
|
8483
8058
|
* @see goNextPageAutomatic
|
8484
8059
|
* @see showPrevButton
|
8485
8060
|
*/
|
8486
8061
|
get showNavigationButtons(): string | any;
|
8487
8062
|
set showNavigationButtons(val: string | any);
|
8488
8063
|
/**
|
8489
|
-
*
|
8064
|
+
* Specifies whether to display the Previous button. Set this property to `false` if respondents should not move backward along the survey.
|
8490
8065
|
* @see showNavigationButtons
|
8491
8066
|
*/
|
8492
8067
|
get showPrevButton(): boolean;
|
@@ -8515,28 +8090,22 @@ declare module "survey" {
|
|
8515
8090
|
get tocLocation(): "left" | "right";
|
8516
8091
|
set tocLocation(val: "left" | "right");
|
8517
8092
|
/**
|
8518
|
-
*
|
8519
|
-
* @see title
|
8093
|
+
* Specifies whether to display the [survey title](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#title).
|
8520
8094
|
*
|
8521
|
-
* [View Demo](https://surveyjs.io/form-library/examples/survey-
|
8095
|
+
* [View Demo](https://surveyjs.io/form-library/examples/brand-your-survey-header/ (linkStyle))
|
8096
|
+
* @see title
|
8522
8097
|
*/
|
8523
8098
|
get showTitle(): boolean;
|
8524
8099
|
set showTitle(val: boolean);
|
8525
8100
|
/**
|
8526
|
-
*
|
8527
|
-
* @see PageModel.title
|
8528
|
-
*
|
8529
|
-
* [View Demo](https://surveyjs.io/form-library/examples/survey-options/ (linkStyle))
|
8101
|
+
* Specifies whether to display [page titles](https://surveyjs.io/form-library/documentation/api-reference/page-model#title).
|
8530
8102
|
*/
|
8531
8103
|
get showPageTitles(): boolean;
|
8532
8104
|
set showPageTitles(val: boolean);
|
8533
8105
|
/**
|
8534
|
-
*
|
8535
|
-
* @see data
|
8106
|
+
* Specifies whether to show the [complete page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#complete-page).
|
8536
8107
|
* @see onComplete
|
8537
8108
|
* @see navigateToUrl
|
8538
|
-
*
|
8539
|
-
* [View Demo](https://surveyjs.io/form-library/examples/survey-options/ (linkStyle))
|
8540
8109
|
*/
|
8541
8110
|
get showCompletedPage(): boolean;
|
8542
8111
|
set showCompletedPage(val: boolean);
|
@@ -8745,7 +8314,8 @@ declare module "survey" {
|
|
8745
8314
|
getSurveyErrorCustomText(obj: PanelModel | Question | SurveyModel, text: string, error: SurveyError): string;
|
8746
8315
|
getQuestionDisplayValue(question: Question, displayValue: any): any;
|
8747
8316
|
/**
|
8748
|
-
* Returns
|
8317
|
+
* Returns a message that is displayed when a survey does not contain visible pages or questions.
|
8318
|
+
* @see [Localization & Globalization](https://surveyjs.io/form-library/documentation/survey-localization)
|
8749
8319
|
*/
|
8750
8320
|
get emptySurveyText(): string;
|
8751
8321
|
/**
|
@@ -8771,6 +8341,8 @@ declare module "survey" {
|
|
8771
8341
|
*/
|
8772
8342
|
get logoWidth(): any;
|
8773
8343
|
set logoWidth(value: any);
|
8344
|
+
get renderedLogoWidth(): number;
|
8345
|
+
get renderedStyleLogoWidth(): string;
|
8774
8346
|
/**
|
8775
8347
|
* A logo height in CSS-accepted values.
|
8776
8348
|
*
|
@@ -8784,6 +8356,8 @@ declare module "survey" {
|
|
8784
8356
|
*/
|
8785
8357
|
get logoHeight(): any;
|
8786
8358
|
set logoHeight(value: any);
|
8359
|
+
get renderedLogoHeight(): number;
|
8360
|
+
get renderedStyleLogoHeight(): string;
|
8787
8361
|
/**
|
8788
8362
|
* A logo position relative to the [survey title](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#title).
|
8789
8363
|
*
|
@@ -8926,31 +8500,30 @@ declare module "survey" {
|
|
8926
8500
|
*/
|
8927
8501
|
addNavigationItem(val: IAction): Action;
|
8928
8502
|
/**
|
8929
|
-
* Gets or sets the
|
8930
|
-
* The 'Start' button is shown on the started page. Set the `firstPageIsStarted` property to `true`, to display the started page.
|
8503
|
+
* Gets or sets a caption for the Start button.
|
8931
8504
|
* @see firstPageIsStarted
|
8932
|
-
* @see
|
8505
|
+
* @see [Localization & Globalization](https://surveyjs.io/form-library/documentation/survey-localization)
|
8933
8506
|
*/
|
8934
8507
|
get startSurveyText(): string;
|
8935
8508
|
set startSurveyText(newValue: string);
|
8936
8509
|
get locStartSurveyText(): LocalizableString;
|
8937
8510
|
/**
|
8938
|
-
* Gets or sets the
|
8939
|
-
* @see
|
8511
|
+
* Gets or sets a caption for the Previous button.
|
8512
|
+
* @see [Localization & Globalization](https://surveyjs.io/form-library/documentation/survey-localization)
|
8940
8513
|
*/
|
8941
8514
|
get pagePrevText(): string;
|
8942
8515
|
set pagePrevText(newValue: string);
|
8943
8516
|
get locPagePrevText(): LocalizableString;
|
8944
8517
|
/**
|
8945
|
-
* Gets or sets the
|
8946
|
-
* @see
|
8518
|
+
* Gets or sets a caption for the Next button.
|
8519
|
+
* @see [Localization & Globalization](https://surveyjs.io/form-library/documentation/survey-localization)
|
8947
8520
|
*/
|
8948
8521
|
get pageNextText(): string;
|
8949
8522
|
set pageNextText(newValue: string);
|
8950
8523
|
get locPageNextText(): LocalizableString;
|
8951
8524
|
/**
|
8952
|
-
*
|
8953
|
-
* @see
|
8525
|
+
* Gets or sets a caption for the Complete button.
|
8526
|
+
* @see [Localization & Globalization](https://surveyjs.io/form-library/documentation/survey-localization)
|
8954
8527
|
*/
|
8955
8528
|
get completeText(): string;
|
8956
8529
|
set completeText(newValue: string);
|
@@ -8975,13 +8548,9 @@ declare module "survey" {
|
|
8975
8548
|
get locEditText(): LocalizableString;
|
8976
8549
|
getElementTitleTagName(element: Base, tagName: string): string;
|
8977
8550
|
/**
|
8978
|
-
*
|
8979
|
-
* You can set it to numRequireTitle: 1. * What is your name?
|
8980
|
-
* You can set it to requireNumTitle: * 1. What is your name?
|
8981
|
-
* You can set it to numTitle (remove require symbol completely): 1. What is your name?
|
8982
|
-
* @see QuestionModel.title
|
8551
|
+
* Specifies a pattern for question titles.
|
8983
8552
|
*
|
8984
|
-
* [
|
8553
|
+
* Refer to the following help topic for more information: [Title Pattern](https://surveyjs.io/form-library/documentation/design-survey/configure-question-titles#title-pattern).
|
8985
8554
|
*/
|
8986
8555
|
get questionTitlePattern(): string;
|
8987
8556
|
set questionTitlePattern(val: string);
|
@@ -9224,7 +8793,7 @@ declare module "survey" {
|
|
9224
8793
|
*/
|
9225
8794
|
get activePage(): any;
|
9226
8795
|
/**
|
9227
|
-
*
|
8796
|
+
* A Boolean value that indicates whether the [start page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#start-page) is currently displayed.
|
9228
8797
|
*/
|
9229
8798
|
get isShowStartingPage(): boolean;
|
9230
8799
|
/**
|
@@ -9373,23 +8942,19 @@ declare module "survey" {
|
|
9373
8942
|
get areEmptyElementsHidden(): boolean;
|
9374
8943
|
private get isAnyQuestionAnswered();
|
9375
8944
|
/**
|
9376
|
-
*
|
9377
|
-
* @see cookieName
|
8945
|
+
* Indicates whether the browser has a cookie with a specified [`cookieName`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#cookieName). If this property's value is `true`, the respondent has passed the survey previously.
|
9378
8946
|
* @see setCookie
|
9379
8947
|
* @see deleteCookie
|
9380
|
-
* @see state
|
9381
8948
|
*/
|
9382
8949
|
get hasCookie(): boolean;
|
9383
8950
|
/**
|
9384
|
-
*
|
9385
|
-
* @see cookieName
|
8951
|
+
* Sets a cookie with a specified [`cookieName`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#cookieName) in the browser. If the `cookieName` property value is defined, this method is automatically called on survey completion.
|
9386
8952
|
* @see hasCookie
|
9387
8953
|
* @see deleteCookie
|
9388
8954
|
*/
|
9389
8955
|
setCookie(): void;
|
9390
8956
|
/**
|
9391
|
-
* Deletes
|
9392
|
-
* @see cookieName
|
8957
|
+
* Deletes a cookie with a specified [`cookieName`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#cookieName) from the browser.
|
9393
8958
|
* @see hasCookie
|
9394
8959
|
* @see setCookie
|
9395
8960
|
*/
|
@@ -9503,13 +9068,14 @@ declare module "survey" {
|
|
9503
9068
|
showPreview(): boolean;
|
9504
9069
|
private showPreviewCore;
|
9505
9070
|
/**
|
9506
|
-
* Cancels a [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page) and switches the survey to the page specified by the `
|
9507
|
-
* @param
|
9071
|
+
* Cancels a [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page) and switches the survey to the page specified by the `currentPage` parameter.
|
9072
|
+
* @param currentPage A new current page. If you do not specify this parameter, the survey displays the last page.
|
9508
9073
|
* @see showPreview
|
9509
9074
|
* @see showPreviewBeforeComplete
|
9510
9075
|
* @see state
|
9511
9076
|
*/
|
9512
|
-
cancelPreview(
|
9077
|
+
cancelPreview(currentPage?: any): void;
|
9078
|
+
private gotoPageFromPreview;
|
9513
9079
|
cancelPreviewByPage(panel: IPanel): any;
|
9514
9080
|
protected doCurrentPageComplete(doComplete: boolean): boolean;
|
9515
9081
|
private doCurrentPageCompleteCore;
|
@@ -9555,6 +9121,7 @@ declare module "survey" {
|
|
9555
9121
|
protected onFirstPageIsStartedChanged(): void;
|
9556
9122
|
private runningPages;
|
9557
9123
|
private onShowingPreviewChanged;
|
9124
|
+
private changeCurrentPageFromPreview;
|
9558
9125
|
private origionalPages;
|
9559
9126
|
protected onQuestionsOnPageModeChanged(oldValue: string): void;
|
9560
9127
|
private restoreOrigionalPages;
|
@@ -9656,6 +9223,7 @@ declare module "survey" {
|
|
9656
9223
|
private resizeObserver;
|
9657
9224
|
afterRenderSurvey(htmlElement: any): void;
|
9658
9225
|
private processResponsiveness;
|
9226
|
+
triggerResponsiveness(hard: boolean): void;
|
9659
9227
|
destroyResizeObserver(): void;
|
9660
9228
|
updateQuestionCssClasses(question: Question, cssClasses: any): void;
|
9661
9229
|
updatePanelCssClasses(panel: PanelModel, cssClasses: any): void;
|
@@ -9716,17 +9284,62 @@ declare module "survey" {
|
|
9716
9284
|
scrollElementToTop(element: ISurveyElement, question: Question, page: PageModel, id: string): any;
|
9717
9285
|
/**
|
9718
9286
|
* Uploads a file to server.
|
9719
|
-
*
|
9720
|
-
*
|
9721
|
-
*
|
9722
|
-
*
|
9287
|
+
*
|
9288
|
+
* The following code shows how to call this method:
|
9289
|
+
*
|
9290
|
+
* ```js
|
9291
|
+
* const question = survey.getQuestionByName("myFileQuestion");
|
9292
|
+
* survey.uploadFiles(
|
9293
|
+
* question,
|
9294
|
+
* question.name,
|
9295
|
+
* question.value,
|
9296
|
+
* (status, data) => {
|
9297
|
+
* if (status === "success") {
|
9298
|
+
* // Handle success
|
9299
|
+
* }
|
9300
|
+
* if (status === "error") {
|
9301
|
+
* // Handle error
|
9302
|
+
* }
|
9303
|
+
* }
|
9304
|
+
* );
|
9305
|
+
* ```
|
9306
|
+
* @param question A [File Upload question instance](https://surveyjs.io/form-library/documentation/api-reference/file-model).
|
9307
|
+
* @param name The File Upload question's [`name`](https://surveyjs.io/form-library/documentation/api-reference/file-model#name).
|
9308
|
+
* @param files An array of JavaScript <a href="https://developer.mozilla.org/en-US/docs/Web/API/File" target="_blank">File</a> objects that represent files to upload.
|
9309
|
+
* @param callback A callback function that allows you to get the upload status (`"success"` or `"error"`) and file data.
|
9310
|
+
* @see onUploadFiles
|
9311
|
+
* @see downloadFile
|
9723
9312
|
*/
|
9724
|
-
uploadFiles(question: QuestionFileModel, name: string, files: File[],
|
9313
|
+
uploadFiles(question: QuestionFileModel, name: string, files: File[], callback: (status: string, data: any) => any): void;
|
9725
9314
|
/**
|
9726
|
-
* Downloads a file from server
|
9727
|
-
*
|
9728
|
-
*
|
9729
|
-
*
|
9315
|
+
* Downloads a file from a server.
|
9316
|
+
*
|
9317
|
+
* The following code shows how to call this method:
|
9318
|
+
*
|
9319
|
+
* ```js
|
9320
|
+
* const question = survey.getQuestionByName("myFileQuestion");
|
9321
|
+
* survey.downloadFile(
|
9322
|
+
* question,
|
9323
|
+
* question.name,
|
9324
|
+
* // Download the first uploaded file
|
9325
|
+
* question.value[0],
|
9326
|
+
* (status, data) => {
|
9327
|
+
* if (status === "success") {
|
9328
|
+
* // Use `data` to retrieve the file
|
9329
|
+
* }
|
9330
|
+
* if (status === "error") {
|
9331
|
+
* // Handle error
|
9332
|
+
* }
|
9333
|
+
* }
|
9334
|
+
* );
|
9335
|
+
* ```
|
9336
|
+
*
|
9337
|
+
* @param question A [File Upload question instance](https://surveyjs.io/form-library/documentation/api-reference/file-model).
|
9338
|
+
* @param questionName The File Upload question's [`name`](https://surveyjs.io/form-library/documentation/api-reference/file-model#name).
|
9339
|
+
* @param fileValue An object from File Upload's [`value`](https://surveyjs.io/form-library/documentation/api-reference/file-model#value) array. This object contains metadata about the file you want to download.
|
9340
|
+
* @param callback A callback function that allows you to get the download status (`"success"` or `"error"`) and the file identifier (URL, file name, etc.) that you can use to retrieve the file.
|
9341
|
+
* @see onDownloadFile
|
9342
|
+
* @see uploadFiles
|
9730
9343
|
*/
|
9731
9344
|
downloadFile(question: QuestionFileModel, questionName: string, fileValue: any, callback: (status: string, data: any) => any): void;
|
9732
9345
|
clearFiles(question: QuestionFileModel, name: string, value: any, fileName: string, callback: (status: string, data: any) => any): void;
|
@@ -9794,30 +9407,32 @@ declare module "survey" {
|
|
9794
9407
|
*/
|
9795
9408
|
getQuestionsByNames(names: string[], caseInsensitive?: boolean): IQuestion[];
|
9796
9409
|
/**
|
9797
|
-
* Returns a page
|
9798
|
-
* @param element
|
9410
|
+
* Returns a page to which a specified survey element (question or panel) belongs.
|
9411
|
+
* @param element A question or panel instance.
|
9799
9412
|
*/
|
9800
9413
|
getPageByElement(element: IElement): PageModel;
|
9801
9414
|
/**
|
9802
|
-
* Returns a page
|
9803
|
-
* @param question
|
9415
|
+
* Returns a page to which a specified question belongs.
|
9416
|
+
* @param question A question instance.
|
9804
9417
|
*/
|
9805
9418
|
getPageByQuestion(question: IQuestion): PageModel;
|
9806
9419
|
/**
|
9807
|
-
* Returns a page
|
9808
|
-
* @param name
|
9420
|
+
* Returns a page with a specified name.
|
9421
|
+
* @param name A page [name](https://surveyjs.io/form-library/documentation/api-reference/page-model#name).
|
9809
9422
|
*/
|
9810
9423
|
getPageByName(name: string): PageModel;
|
9811
9424
|
/**
|
9812
|
-
* Returns
|
9813
|
-
* @param names
|
9425
|
+
* Returns an array of pages with specified names.
|
9426
|
+
* @param names An array of page names.
|
9814
9427
|
*/
|
9815
9428
|
getPagesByNames(names: string[]): PageModel[];
|
9816
9429
|
/**
|
9817
|
-
* Returns a list of all questions in
|
9818
|
-
* @param visibleOnly
|
9430
|
+
* Returns a list of all questions in the survey.
|
9431
|
+
* @param visibleOnly A Boolean value that specifies whether to include only visible questions.
|
9432
|
+
* @param includeDesignTime For internal use.
|
9433
|
+
* @param includeNested A Boolean value that specifies whether to include nested questions, such as questions within matrix cells.
|
9819
9434
|
*/
|
9820
|
-
getAllQuestions(visibleOnly?: boolean,
|
9435
|
+
getAllQuestions(visibleOnly?: boolean, includeDesignTime?: boolean, includeNested?: boolean): Array<Question>;
|
9821
9436
|
/**
|
9822
9437
|
* Returns quiz questions. All visible questions that has input(s) widgets.
|
9823
9438
|
* @see getQuizQuestionCount
|
@@ -9833,7 +9448,7 @@ declare module "survey" {
|
|
9833
9448
|
/**
|
9834
9449
|
* Returns a list of all survey's panels.
|
9835
9450
|
*/
|
9836
|
-
getAllPanels(visibleOnly?: boolean,
|
9451
|
+
getAllPanels(visibleOnly?: boolean, includeDesignTime?: boolean): Array<IPanel>;
|
9837
9452
|
/**
|
9838
9453
|
* Creates and returns a new page but does not add it to the survey.
|
9839
9454
|
*
|
@@ -11188,6 +10803,7 @@ declare module "question" {
|
|
11188
10803
|
clearValue(): void;
|
11189
10804
|
unbindValue(): void;
|
11190
10805
|
createValueCopy(): any;
|
10806
|
+
initDataUI(): void;
|
11191
10807
|
protected getUnbindValue(value: any): any;
|
11192
10808
|
protected isValueSurveyElement(val: any): boolean;
|
11193
10809
|
private canClearValueAsInvisible;
|
@@ -11332,8 +10948,15 @@ declare module "question" {
|
|
11332
10948
|
set validators(val: Array<SurveyValidator>);
|
11333
10949
|
getValidators(): Array<SurveyValidator>;
|
11334
10950
|
getSupportedValidators(): Array<string>;
|
11335
|
-
private addSupportedValidators;
|
11336
10951
|
addConditionObjectsByContext(objects: Array<IConditionObject>, context: any): void;
|
10952
|
+
/**
|
10953
|
+
* Returns an array of questions nested within the current question. Use this method to obtain questions within [Multiple Text](https://surveyjs.io/form-library/documentation/api-reference/multiple-text-entry-question-model), [Dynamic Panel](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model), and [Matrix](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-question-model)-like questions.
|
10954
|
+
* @param visibleOnly A Boolean value that specifies whether to include only visible nested questions.
|
10955
|
+
* @returns An array of nested questions.
|
10956
|
+
*/
|
10957
|
+
getNestedQuestions(visibleOnly?: boolean): Array<Question>;
|
10958
|
+
collectNestedQuestions(questions: Array<Question>, visibleOnly?: boolean): void;
|
10959
|
+
protected collectNestedQuestionsCore(questions: Array<Question>, visibleOnly: boolean): void;
|
11337
10960
|
getConditionJson(operator?: string, path?: string): any;
|
11338
10961
|
hasErrors(fireCallback?: boolean, rec?: any): boolean;
|
11339
10962
|
/**
|
@@ -11434,6 +11057,8 @@ declare module "question" {
|
|
11434
11057
|
protected getObservedElementSelector(): string;
|
11435
11058
|
private onMobileChanged;
|
11436
11059
|
private onMobileChangedCallback;
|
11060
|
+
triggerResponsiveness(hard?: boolean): void;
|
11061
|
+
private triggerResponsivenessCallback;
|
11437
11062
|
private initResponsiveness;
|
11438
11063
|
protected getCompactRenderAs(): string;
|
11439
11064
|
protected getDesktopRenderAs(): string;
|
@@ -11968,6 +11593,7 @@ declare module "question_matrixdropdownbase" {
|
|
11968
11593
|
}>;
|
11969
11594
|
}): import("question").IQuestionPlainData;
|
11970
11595
|
addConditionObjectsByContext(objects: Array<IConditionObject>, context: any): void;
|
11596
|
+
protected collectNestedQuestionsCore(questions: Question[], visibleOnly: boolean): void;
|
11971
11597
|
protected getConditionObjectRowName(index: number): string;
|
11972
11598
|
protected getConditionObjectRowText(index: number): string;
|
11973
11599
|
protected getConditionObjectsRowIndeces(): Array<number>;
|
@@ -12189,125 +11815,626 @@ declare module "base-interfaces" {
|
|
12189
11815
|
onCorrectQuestionAnswer(question: IQuestion, options: any): void;
|
12190
11816
|
processPopupVisiblityChanged(question: IQuestion, popupModel: PopupModel, visible: boolean): void;
|
12191
11817
|
}
|
12192
|
-
export interface ISurveyImpl {
|
12193
|
-
getSurveyData(): ISurveyData;
|
12194
|
-
getSurvey(): ISurvey;
|
12195
|
-
getTextProcessor(): ITextProcessor;
|
11818
|
+
export interface ISurveyImpl {
|
11819
|
+
getSurveyData(): ISurveyData;
|
11820
|
+
getSurvey(): ISurvey;
|
11821
|
+
getTextProcessor(): ITextProcessor;
|
11822
|
+
}
|
11823
|
+
export interface IConditionRunner {
|
11824
|
+
runCondition(values: HashTable<any>, properties: HashTable<any>): any;
|
11825
|
+
}
|
11826
|
+
export interface IShortcutText {
|
11827
|
+
shortcutText: string;
|
11828
|
+
}
|
11829
|
+
export interface ISurveyElement extends IShortcutText {
|
11830
|
+
name: string;
|
11831
|
+
isVisible: boolean;
|
11832
|
+
isReadOnly: boolean;
|
11833
|
+
isPage: boolean;
|
11834
|
+
isPanel: boolean;
|
11835
|
+
containsErrors: boolean;
|
11836
|
+
parent: IPanel;
|
11837
|
+
skeletonComponentName: string;
|
11838
|
+
setSurveyImpl(value: ISurveyImpl, isLight?: boolean): any;
|
11839
|
+
onSurveyLoad(): any;
|
11840
|
+
onFirstRendering(): any;
|
11841
|
+
getType(): string;
|
11842
|
+
setVisibleIndex(value: number): number;
|
11843
|
+
locStrsChanged(): any;
|
11844
|
+
delete(): any;
|
11845
|
+
toggleState(): void;
|
11846
|
+
stateChangedCallback(): void;
|
11847
|
+
getTitleToolbar(): AdaptiveActionContainer;
|
11848
|
+
isCollapsed: boolean;
|
11849
|
+
isExpanded: boolean;
|
11850
|
+
expand(): void;
|
11851
|
+
collapse(): void;
|
11852
|
+
}
|
11853
|
+
export interface IElement extends IConditionRunner, ISurveyElement {
|
11854
|
+
visible: boolean;
|
11855
|
+
renderWidth: string;
|
11856
|
+
width: string;
|
11857
|
+
minWidth?: string;
|
11858
|
+
maxWidth?: string;
|
11859
|
+
isExpanded: boolean;
|
11860
|
+
isCollapsed: boolean;
|
11861
|
+
rightIndent: number;
|
11862
|
+
startWithNewLine: boolean;
|
11863
|
+
registerPropertyChangedHandlers(propertyNames: Array<string>, handler: any, key: string): void;
|
11864
|
+
registerFunctionOnPropertyValueChanged(name: string, func: any, key: string): void;
|
11865
|
+
unRegisterFunctionOnPropertyValueChanged(name: string, key: string): void;
|
11866
|
+
getPanel(): IPanel;
|
11867
|
+
getLayoutType(): string;
|
11868
|
+
isLayoutTypeSupported(layoutType: string): boolean;
|
11869
|
+
removeElement(el: IElement): boolean;
|
11870
|
+
onAnyValueChanged(name: string): any;
|
11871
|
+
updateCustomWidgets(): any;
|
11872
|
+
clearIncorrectValues(): any;
|
11873
|
+
clearErrors(): any;
|
11874
|
+
dispose(): void;
|
11875
|
+
needResponsiveWidth(): boolean;
|
11876
|
+
}
|
11877
|
+
export interface IQuestion extends IElement, ISurveyErrorOwner {
|
11878
|
+
hasTitle: boolean;
|
11879
|
+
isEmpty(): boolean;
|
11880
|
+
onSurveyValueChanged(newValue: any): any;
|
11881
|
+
updateValueFromSurvey(newValue: any): any;
|
11882
|
+
updateCommentFromSurvey(newValue: any): any;
|
11883
|
+
supportGoNextPageAutomatic(): boolean;
|
11884
|
+
clearUnusedValues(): any;
|
11885
|
+
getDisplayValue(keysAsText: boolean, value: any): any;
|
11886
|
+
getValueName(): string;
|
11887
|
+
clearValue(): any;
|
11888
|
+
clearValueIfInvisible(): any;
|
11889
|
+
isAnswerCorrect(): boolean;
|
11890
|
+
updateValueWithDefaults(): any;
|
11891
|
+
getQuestionFromArray(name: string, index: number): IQuestion;
|
11892
|
+
value: any;
|
11893
|
+
survey: any;
|
11894
|
+
}
|
11895
|
+
export interface IParentElement {
|
11896
|
+
addElement(element: IElement, index: number): any;
|
11897
|
+
removeElement(element: IElement): boolean;
|
11898
|
+
isReadOnly: boolean;
|
11899
|
+
}
|
11900
|
+
export interface IPanel extends ISurveyElement, IParentElement {
|
11901
|
+
getChildrenLayoutType(): string;
|
11902
|
+
getQuestionTitleLocation(): string;
|
11903
|
+
getQuestionStartIndex(): string;
|
11904
|
+
parent: IPanel;
|
11905
|
+
elementWidthChanged(el: IElement): any;
|
11906
|
+
indexOf(el: IElement): number;
|
11907
|
+
elements: Array<IElement>;
|
11908
|
+
ensureRowsVisibility(): void;
|
11909
|
+
validateContainerOnly(): void;
|
11910
|
+
}
|
11911
|
+
export interface IPage extends IPanel, IConditionRunner {
|
11912
|
+
isStartPage: boolean;
|
11913
|
+
}
|
11914
|
+
export interface ITitleOwner {
|
11915
|
+
name: string;
|
11916
|
+
no: string;
|
11917
|
+
requiredText: string;
|
11918
|
+
isRequireTextOnStart: boolean;
|
11919
|
+
isRequireTextBeforeTitle: boolean;
|
11920
|
+
isRequireTextAfterTitle: boolean;
|
11921
|
+
locTitle: LocalizableString;
|
11922
|
+
}
|
11923
|
+
export interface IProgressInfo {
|
11924
|
+
questionCount: number;
|
11925
|
+
answeredQuestionCount: number;
|
11926
|
+
requiredQuestionCount: number;
|
11927
|
+
requiredAnsweredQuestionCount: number;
|
11928
|
+
}
|
11929
|
+
export interface IWrapperObject {
|
11930
|
+
getOriginalObj(): Base;
|
11931
|
+
getClassNameProperty(): string;
|
11932
|
+
}
|
11933
|
+
export interface IFindElement {
|
11934
|
+
element: Base;
|
11935
|
+
str: LocalizableString;
|
11936
|
+
}
|
11937
|
+
export type ISurveyEnvironment = {
|
11938
|
+
root: Document | ShadowRoot;
|
11939
|
+
rootElement: HTMLElement | ShadowRoot;
|
11940
|
+
popupMountContainer: HTMLElement | string;
|
11941
|
+
svgMountContainer: HTMLElement | string;
|
11942
|
+
stylesSheetsMountContainer: HTMLElement;
|
11943
|
+
};
|
11944
|
+
export type LayoutElementContainer = "header" | "footer" | "left" | "right" | "contentTop" | "contentBottom";
|
11945
|
+
export interface ISurveyLayoutElement {
|
11946
|
+
id: string;
|
11947
|
+
container?: LayoutElementContainer | Array<LayoutElementContainer>;
|
11948
|
+
component?: string;
|
11949
|
+
template?: string;
|
11950
|
+
data?: any;
|
11951
|
+
}
|
11952
|
+
}
|
11953
|
+
declare module "itemvalue" {
|
11954
|
+
import { ILocalizableOwner, LocalizableString } from "localizablestring";
|
11955
|
+
import { ConditionRunner } from "conditions";
|
11956
|
+
import { IShortcutText, ISurvey } from "base-interfaces";
|
11957
|
+
import { BaseAction } from "actions/action";
|
11958
|
+
/**
|
11959
|
+
* Array of ItemValue is used in checkbox, dropdown and radiogroup choices, matrix columns and rows.
|
11960
|
+
* It has two main properties: value and text. If text is empty, value is used for displaying.
|
11961
|
+
* The text property is localizable and support markdown.
|
11962
|
+
*/
|
11963
|
+
export class ItemValue extends BaseAction implements ILocalizableOwner, IShortcutText {
|
11964
|
+
protected typeName: string;
|
11965
|
+
[index: string]: any;
|
11966
|
+
getMarkdownHtml(text: string, name: string): string;
|
11967
|
+
getRenderer(name: string): string;
|
11968
|
+
getRendererContext(locStr: LocalizableString): any;
|
11969
|
+
getProcessedText(text: string): string;
|
11970
|
+
static get Separator(): string;
|
11971
|
+
static set Separator(val: string);
|
11972
|
+
/**
|
11973
|
+
* Resets the input array and fills it with values from the values array
|
11974
|
+
*/
|
11975
|
+
static setData(items: Array<ItemValue>, values: Array<any>, type?: string): void;
|
11976
|
+
static getData(items: Array<ItemValue>): any;
|
11977
|
+
static getItemByValue(items: Array<ItemValue>, val: any): ItemValue;
|
11978
|
+
static getTextOrHtmlByValue(items: Array<ItemValue>, val: any): string;
|
11979
|
+
static locStrsChanged(items: Array<ItemValue>): void;
|
11980
|
+
static runConditionsForItems(items: Array<ItemValue>, filteredItems: Array<ItemValue>, runner: ConditionRunner, values: any, properties: any, useItemExpression?: boolean, onItemCallBack?: (item: ItemValue, val: boolean) => boolean): boolean;
|
11981
|
+
static runEnabledConditionsForItems(items: Array<ItemValue>, runner: ConditionRunner, values: any, properties: any, onItemCallBack?: (item: ItemValue, val: boolean) => boolean): boolean;
|
11982
|
+
private static runConditionsForItemsCore;
|
11983
|
+
ownerPropertyName: string;
|
11984
|
+
private _visible;
|
11985
|
+
private locTextValue;
|
11986
|
+
private visibleConditionRunner;
|
11987
|
+
private enableConditionRunner;
|
11988
|
+
constructor(value: any, text?: string, typeName?: string);
|
11989
|
+
onCreating(): any;
|
11990
|
+
getType(): string;
|
11991
|
+
getSurvey(live?: boolean): ISurvey;
|
11992
|
+
getLocale(): string;
|
11993
|
+
isGhost: boolean;
|
11994
|
+
protected get isInternal(): boolean;
|
11995
|
+
get locText(): LocalizableString;
|
11996
|
+
setLocText(locText: LocalizableString): void;
|
11997
|
+
private _locOwner;
|
11998
|
+
get locOwner(): ILocalizableOwner;
|
11999
|
+
set locOwner(value: ILocalizableOwner);
|
12000
|
+
get value(): any;
|
12001
|
+
set value(newValue: any);
|
12002
|
+
get hasText(): boolean;
|
12003
|
+
get pureText(): string;
|
12004
|
+
set pureText(val: string);
|
12005
|
+
get text(): string;
|
12006
|
+
set text(newText: string);
|
12007
|
+
get calculatedText(): string;
|
12008
|
+
get shortcutText(): string;
|
12009
|
+
private canSerializeValue;
|
12010
|
+
getData(): any;
|
12011
|
+
toJSON(): any;
|
12012
|
+
setData(value: any): void;
|
12013
|
+
get visibleIf(): string;
|
12014
|
+
set visibleIf(val: string);
|
12015
|
+
get enableIf(): string;
|
12016
|
+
set enableIf(val: string);
|
12017
|
+
get isVisible(): any;
|
12018
|
+
setIsVisible(val: boolean): void;
|
12019
|
+
get isEnabled(): any;
|
12020
|
+
setIsEnabled(val: boolean): void;
|
12021
|
+
addUsedLocales(locales: Array<string>): void;
|
12022
|
+
locStrsChanged(): void;
|
12023
|
+
protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
|
12024
|
+
protected getConditionRunner(isVisible: boolean): ConditionRunner;
|
12025
|
+
private getVisibleConditionRunner;
|
12026
|
+
private getEnableConditionRunner;
|
12027
|
+
originalItem: any;
|
12028
|
+
selectedValue: boolean;
|
12029
|
+
get selected(): boolean;
|
12030
|
+
private componentValue;
|
12031
|
+
getComponent(): string;
|
12032
|
+
setComponent(val: string): void;
|
12033
|
+
protected getEnabled(): boolean;
|
12034
|
+
protected setEnabled(val: boolean): void;
|
12035
|
+
protected getVisible(): boolean;
|
12036
|
+
protected setVisible(val: boolean): void;
|
12037
|
+
protected getLocTitle(): LocalizableString;
|
12038
|
+
protected getTitle(): string;
|
12039
|
+
protected setLocTitle(val: LocalizableString): void;
|
12040
|
+
protected setTitle(val: string): void;
|
12041
|
+
icon: string;
|
12196
12042
|
}
|
12197
|
-
|
12198
|
-
|
12043
|
+
}
|
12044
|
+
declare module "base" {
|
12045
|
+
import { ILocalizableOwner, LocalizableString } from "localizablestring";
|
12046
|
+
import { HashTable } from "helpers";
|
12047
|
+
import { JsonObjectProperty } from "jsonobject";
|
12048
|
+
import { ItemValue } from "itemvalue";
|
12049
|
+
import { IElement, IFindElement, IProgressInfo, ISurvey } from "base-interfaces";
|
12050
|
+
export class Bindings {
|
12051
|
+
private obj;
|
12052
|
+
private properties;
|
12053
|
+
private values;
|
12054
|
+
constructor(obj: Base);
|
12055
|
+
getType(): string;
|
12056
|
+
getNames(): Array<string>;
|
12057
|
+
getProperties(): Array<JsonObjectProperty>;
|
12058
|
+
setBinding(propertyName: string, valueName: string): void;
|
12059
|
+
clearBinding(propertyName: string): void;
|
12060
|
+
isEmpty(): boolean;
|
12061
|
+
getValueNameByPropertyName(propertyName: string): string;
|
12062
|
+
getPropertiesByValueName(valueName: string): Array<string>;
|
12063
|
+
getJson(): any;
|
12064
|
+
setJson(value: any): void;
|
12065
|
+
private fillProperties;
|
12066
|
+
private onChangedJSON;
|
12199
12067
|
}
|
12200
|
-
export
|
12201
|
-
|
12068
|
+
export class Dependencies {
|
12069
|
+
currentDependency: () => void;
|
12070
|
+
target: Base;
|
12071
|
+
property: string;
|
12072
|
+
private static DependenciesCount;
|
12073
|
+
constructor(currentDependency: () => void, target: Base, property: string);
|
12074
|
+
dependencies: Array<{
|
12075
|
+
obj: Base;
|
12076
|
+
prop: string;
|
12077
|
+
id: string;
|
12078
|
+
}>;
|
12079
|
+
id: string;
|
12080
|
+
addDependency(target: Base, property: string): void;
|
12081
|
+
dispose(): void;
|
12082
|
+
}
|
12083
|
+
export class ComputedUpdater<T = any> {
|
12084
|
+
private _updater;
|
12085
|
+
static readonly ComputedUpdaterType = "__dependency_computed";
|
12086
|
+
private dependencies;
|
12087
|
+
constructor(_updater: () => T);
|
12088
|
+
readonly type = "__dependency_computed";
|
12089
|
+
get updater(): () => T;
|
12090
|
+
setDependencies(dependencies: Dependencies): void;
|
12091
|
+
protected getDependencies(): Dependencies;
|
12092
|
+
private clearDependencies;
|
12093
|
+
dispose(): any;
|
12094
|
+
}
|
12095
|
+
/**
|
12096
|
+
* A base class for all SurveyJS objects.
|
12097
|
+
*/
|
12098
|
+
export class Base {
|
12099
|
+
private static currentDependencis;
|
12100
|
+
static finishCollectDependencies(): Dependencies;
|
12101
|
+
static startCollectDependencies(updater: () => void, target: Base, property: string): void;
|
12102
|
+
private static collectDependency;
|
12103
|
+
static get commentSuffix(): string;
|
12104
|
+
static set commentSuffix(val: string);
|
12105
|
+
static get commentPrefix(): string;
|
12106
|
+
static set commentPrefix(val: string);
|
12107
|
+
static createItemValue: (item: any, type?: string) => any;
|
12108
|
+
static itemValueLocStrChanged: (arr: Array<any>) => void;
|
12109
|
+
/**
|
12110
|
+
* Returns `true` if a passed `value` is an empty string, array, or object or if it equals to `undefined` or `null`.
|
12111
|
+
*
|
12112
|
+
* @param value A value to be checked.
|
12113
|
+
* @param trimString (Optional) When this parameter is `true`, the method ignores whitespace characters at the beginning and end of a string value. Pass `false` to disable this functionality.
|
12114
|
+
*/
|
12115
|
+
isValueEmpty(value: any, trimString?: boolean): boolean;
|
12116
|
+
protected trimValue(value: any): any;
|
12117
|
+
protected isPropertyEmpty(value: any): boolean;
|
12118
|
+
static createPropertiesHash(): {};
|
12119
|
+
private propertyHash;
|
12120
|
+
private localizableStrings;
|
12121
|
+
private arraysInfo;
|
12122
|
+
private eventList;
|
12123
|
+
private expressionInfo;
|
12124
|
+
private bindingsValue;
|
12125
|
+
private isDisposedValue;
|
12126
|
+
private classMetaData;
|
12127
|
+
private onPropChangeFunctions;
|
12128
|
+
protected isLoadingFromJsonValue: boolean;
|
12129
|
+
loadingOwner: Base;
|
12130
|
+
/**
|
12131
|
+
* An event that is raised when a property of this SurveyJS object has changed.
|
12132
|
+
*
|
12133
|
+
* Parameters:
|
12134
|
+
*
|
12135
|
+
* - `sender`: `this`\
|
12136
|
+
* A SurveyJS object whose property has changed.
|
12137
|
+
* - `options.name`: `String`\
|
12138
|
+
* The name of the changed property.
|
12139
|
+
* - `options.newValue`: `any`\
|
12140
|
+
* A new value for the property.
|
12141
|
+
* - `options.oldValue`: `any`\
|
12142
|
+
* An old value of the property. If the property is an array, `oldValue` contains the same array as `newValue` does.
|
12143
|
+
*/
|
12144
|
+
onPropertyChanged: EventBase<Base>;
|
12145
|
+
/**
|
12146
|
+
* An event that is raised when an [`ItemValue`](https://surveyjs.io/form-library/documentation/itemvalue) property is changed.
|
12147
|
+
*
|
12148
|
+
* Parameters:
|
12149
|
+
*
|
12150
|
+
* - `sender`: `this`\
|
12151
|
+
* A SurveyJS object whose property contains an array of `ItemValue` objects.
|
12152
|
+
* - `options.obj`: [`ItemValue`](https://surveyjs.io/form-library/documentation/itemvalue)\
|
12153
|
+
* An `ItemValue` object.
|
12154
|
+
* - `options.propertyName`: `String`\
|
12155
|
+
* The name of the property to which an array of `ItemValue` objects is assigned (for example, `"choices"` or `"rows"`).
|
12156
|
+
* - `options.name`: `"text"` | `"value"`\
|
12157
|
+
* The name of the changed property.
|
12158
|
+
* - `options.newValue`: `any`\
|
12159
|
+
* A new value for the property.
|
12160
|
+
*/
|
12161
|
+
onItemValuePropertyChanged: Event<(sender: Base, options: any) => any, Base, any>;
|
12162
|
+
getPropertyValueCoreHandler: (propertiesHash: any, name: string) => any;
|
12163
|
+
setPropertyValueCoreHandler: (propertiesHash: any, name: string, val: any) => void;
|
12164
|
+
createArrayCoreHandler: (propertiesHash: any, name: string) => Array<any>;
|
12165
|
+
surveyChangedCallback: () => void;
|
12166
|
+
private isCreating;
|
12167
|
+
constructor();
|
12168
|
+
dispose(): void;
|
12169
|
+
get isDisposed(): boolean;
|
12170
|
+
protected addEvent<T, Options = any>(): EventBase<T, Options>;
|
12171
|
+
protected onBaseCreating(): void;
|
12172
|
+
/**
|
12173
|
+
* Returns the object type as it is used in the JSON schema.
|
12174
|
+
*/
|
12175
|
+
getType(): string;
|
12176
|
+
/**
|
12177
|
+
* Use this method to find out if the current object is of a given `typeName` or inherited from it.
|
12178
|
+
*
|
12179
|
+
* @param typeName One of the values listed in the [getType()](https://surveyjs.io/form-library/documentation/question#getType) description.
|
12180
|
+
* @returns `true` if the current object is of a given `typeName` or inherited from it.
|
12181
|
+
* @see getType
|
12182
|
+
*/
|
12183
|
+
isDescendantOf(typeName: string): boolean;
|
12184
|
+
getSurvey(isLive?: boolean): ISurvey;
|
12185
|
+
/**
|
12186
|
+
* Returns `true` if the survey is being designed in Survey Creator.
|
12187
|
+
*/
|
12188
|
+
get isDesignMode(): boolean;
|
12189
|
+
/**
|
12190
|
+
* Returns `true` if the object is included in a survey.
|
12191
|
+
*
|
12192
|
+
* This property may return `false`, for example, when you [create a survey model dynamically](https://surveyjs.io/form-library/documentation/design-survey-create-a-simple-survey#create-or-change-a-survey-model-dynamically).
|
12193
|
+
*/
|
12194
|
+
get inSurvey(): boolean;
|
12195
|
+
get bindings(): Bindings;
|
12196
|
+
checkBindings(valueName: string, value: any): void;
|
12197
|
+
protected updateBindings(propertyName: string, value: any): void;
|
12198
|
+
protected updateBindingValue(valueName: string, value: any): void;
|
12199
|
+
getTemplate(): string;
|
12200
|
+
/**
|
12201
|
+
* Returns `true` if the object configuration is being loaded from JSON.
|
12202
|
+
*/
|
12203
|
+
get isLoadingFromJson(): boolean;
|
12204
|
+
protected getIsLoadingFromJson(): boolean;
|
12205
|
+
startLoadingFromJson(json?: any): void;
|
12206
|
+
endLoadingFromJson(): void;
|
12207
|
+
/**
|
12208
|
+
* Returns a JSON object that corresponds to the current SurveyJS object.
|
12209
|
+
* @see fromJSON
|
12210
|
+
*/
|
12211
|
+
toJSON(): any;
|
12212
|
+
/**
|
12213
|
+
* Assigns a new configuration to the current SurveyJS object. This configuration is taken from a passed JSON object.
|
12214
|
+
*
|
12215
|
+
* The JSON object should contain only serializable properties of this SurveyJS object. Event handlers and properties that do not belong to the SurveyJS object are ignored.
|
12216
|
+
*
|
12217
|
+
* @param json A JSON object with properties that you want to apply to the current SurveyJS object.
|
12218
|
+
* @see toJSON
|
12219
|
+
*/
|
12220
|
+
fromJSON(json: any): void;
|
12221
|
+
onSurveyLoad(): void;
|
12222
|
+
/**
|
12223
|
+
* Creates a new object that has the same type and properties as the current SurveyJS object.
|
12224
|
+
*/
|
12225
|
+
clone(): Base;
|
12226
|
+
/**
|
12227
|
+
* Returns a `JsonObjectProperty` object with metadata about a serializable property that belongs to the current SurveyJS object.
|
12228
|
+
*
|
12229
|
+
* If the property is not found, this method returns `null`.
|
12230
|
+
* @param propName A property name.
|
12231
|
+
*/
|
12232
|
+
getPropertyByName(propName: string): JsonObjectProperty;
|
12233
|
+
isPropertyVisible(propName: string): boolean;
|
12234
|
+
static createProgressInfo(): IProgressInfo;
|
12235
|
+
getProgressInfo(): IProgressInfo;
|
12236
|
+
localeChanged(): void;
|
12237
|
+
locStrsChanged(): void;
|
12238
|
+
/**
|
12239
|
+
* Returns the value of a property with a specified name.
|
12240
|
+
*
|
12241
|
+
* If the property is not found or does not have a value, this method returns either `undefined`, `defaultValue` specified in the property configuration, or a value passed as the `defaultValue` parameter.
|
12242
|
+
*
|
12243
|
+
* @param name A property name.
|
12244
|
+
* @param defaultValue (Optional) A value to return if the property is not found or does not have a value.
|
12245
|
+
*/
|
12246
|
+
getPropertyValue(name: string, defaultValue?: any): any;
|
12247
|
+
private getDefaultValueFromProperty;
|
12248
|
+
protected getPropertyValueWithoutDefault(name: string): any;
|
12249
|
+
protected getPropertyValueCore(propertiesHash: any, name: string): any;
|
12250
|
+
geValueFromHash(): any;
|
12251
|
+
protected setPropertyValueCore(propertiesHash: any, name: string, val: any): void;
|
12252
|
+
get isEditingSurveyElement(): boolean;
|
12253
|
+
iteratePropertiesHash(func: (hash: any, key: any) => void): void;
|
12254
|
+
/**
|
12255
|
+
* Assigns a new value to a specified property.
|
12256
|
+
* @param name A property name.
|
12257
|
+
* @param val A new value for the property.
|
12258
|
+
*/
|
12259
|
+
setPropertyValue(name: string, val: any): void;
|
12260
|
+
protected setArrayPropertyDirectly(name: string, val: any, sendNotification?: boolean): void;
|
12261
|
+
protected setPropertyValueDirectly(name: string, val: any): void;
|
12262
|
+
protected clearPropertyValue(name: string): void;
|
12263
|
+
onPropertyValueChangedCallback(name: string, oldValue: any, newValue: any, sender: Base, arrayChanges: ArrayChanges): void;
|
12264
|
+
itemValuePropertyChanged(item: ItemValue, name: string, oldValue: any, newValue: any): void;
|
12265
|
+
protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
|
12266
|
+
protected propertyValueChanged(name: string, oldValue: any, newValue: any, arrayChanges?: ArrayChanges, target?: Base): void;
|
12267
|
+
onBindingChanged(oldValue: any, newValue: any): void;
|
12268
|
+
protected get isInternal(): boolean;
|
12269
|
+
private doPropertyValueChangedCallback;
|
12270
|
+
addExpressionProperty(name: string, onExecute: (obj: Base, res: any) => void, canRun?: (obj: Base) => boolean): void;
|
12271
|
+
getDataFilteredValues(): any;
|
12272
|
+
getDataFilteredProperties(): any;
|
12273
|
+
protected runConditionCore(values: HashTable<any>, properties: HashTable<any>): void;
|
12274
|
+
protected canRunConditions(): boolean;
|
12275
|
+
private checkConditionPropertyChanged;
|
12276
|
+
private runConditionItemCore;
|
12277
|
+
/**
|
12278
|
+
* Registers a function to call when a property value changes.
|
12279
|
+
* @param propertyNames An array of one or multiple property names.
|
12280
|
+
* @param handler A function to call when one of the listed properties change.
|
12281
|
+
* @param key (Optional) A key that identifies the current registration. If a function for one of the properties is already registered with the same key, the function will be overwritten. You can also use the key to subsequently unregister handlers.
|
12282
|
+
* @see unregisterPropertyChangedHandlers
|
12283
|
+
*/
|
12284
|
+
registerPropertyChangedHandlers(propertyNames: Array<string>, handler: any, key?: string): void;
|
12285
|
+
/**
|
12286
|
+
* Unregisters value change event handlers for the specified properties.
|
12287
|
+
* @param propertyNames An array of one or multiple property names.
|
12288
|
+
* @param key (Optional) A key of the registration that you want to cancel.
|
12289
|
+
* @see registerPropertyChangedHandlers
|
12290
|
+
*/
|
12291
|
+
unregisterPropertyChangedHandlers(propertyNames: Array<string>, key?: string): void;
|
12292
|
+
registerFunctionOnPropertyValueChanged(name: string, func: any, key?: string): void;
|
12293
|
+
registerFunctionOnPropertiesValueChanged(names: Array<string>, func: any, key?: string): void;
|
12294
|
+
unRegisterFunctionOnPropertyValueChanged(name: string, key?: string): void;
|
12295
|
+
unRegisterFunctionOnPropertiesValueChanged(names: Array<string>, key?: string): void;
|
12296
|
+
createCustomLocalizableObj(name: string): void;
|
12297
|
+
getLocale(): string;
|
12298
|
+
getLocalizationString(strName: string): string;
|
12299
|
+
getLocalizationFormatString(strName: string, ...args: any[]): string;
|
12300
|
+
protected createLocalizableString(name: string, owner: ILocalizableOwner, useMarkDown?: boolean, defaultStr?: boolean | string): LocalizableString;
|
12301
|
+
getLocalizableString(name: string): LocalizableString;
|
12302
|
+
getLocalizableStringText(name: string, defaultStr?: string): string;
|
12303
|
+
setLocalizableStringText(name: string, value: string): void;
|
12304
|
+
addUsedLocales(locales: Array<string>): void;
|
12305
|
+
searchText(text: string, founded: Array<IFindElement>): void;
|
12306
|
+
private getSearchableLocalizedStrings;
|
12307
|
+
protected getSearchableLocKeys(keys: Array<string>): void;
|
12308
|
+
protected getSearchableItemValueKeys(keys: Array<string>): void;
|
12309
|
+
protected AddLocStringToUsedLocales(locStr: LocalizableString, locales: Array<string>): void;
|
12310
|
+
protected createItemValues(name: string): Array<any>;
|
12311
|
+
private notifyArrayChanged;
|
12312
|
+
protected createNewArrayCore(name: string): Array<any>;
|
12313
|
+
protected ensureArray(name: string, onPush?: any, onRemove?: any): any[];
|
12314
|
+
protected createNewArray(name: string, onPush?: any, onRemove?: any): Array<any>;
|
12315
|
+
protected getItemValueType(): string;
|
12316
|
+
protected setArray(name: string, src: any[], dest: any[], isItemValues: boolean, onPush: any): void;
|
12317
|
+
protected isTwoValueEquals(x: any, y: any, caseInSensitive?: boolean, trimString?: boolean): boolean;
|
12318
|
+
private static copyObject;
|
12319
|
+
protected copyCssClasses(dest: any, source: any): void;
|
12320
|
+
private getValueInLowCase;
|
12321
|
+
getElementsInDesign(includeHidden?: boolean): Array<IElement>;
|
12202
12322
|
}
|
12203
|
-
export
|
12204
|
-
|
12205
|
-
|
12206
|
-
|
12207
|
-
|
12208
|
-
|
12209
|
-
containsErrors: boolean;
|
12210
|
-
parent: IPanel;
|
12211
|
-
skeletonComponentName: string;
|
12212
|
-
setSurveyImpl(value: ISurveyImpl, isLight?: boolean): any;
|
12213
|
-
onSurveyLoad(): any;
|
12214
|
-
onFirstRendering(): any;
|
12215
|
-
getType(): string;
|
12216
|
-
setVisibleIndex(value: number): number;
|
12217
|
-
locStrsChanged(): any;
|
12218
|
-
delete(): any;
|
12219
|
-
toggleState(): void;
|
12220
|
-
stateChangedCallback(): void;
|
12221
|
-
getTitleToolbar(): AdaptiveActionContainer;
|
12222
|
-
isCollapsed: boolean;
|
12223
|
-
isExpanded: boolean;
|
12224
|
-
expand(): void;
|
12225
|
-
collapse(): void;
|
12323
|
+
export class ArrayChanges {
|
12324
|
+
index: number;
|
12325
|
+
deleteCount: number;
|
12326
|
+
itemsToAdd: any[];
|
12327
|
+
deletedItems: any[];
|
12328
|
+
constructor(index: number, deleteCount: number, itemsToAdd: any[], deletedItems: any[]);
|
12226
12329
|
}
|
12227
|
-
export
|
12228
|
-
|
12229
|
-
|
12230
|
-
|
12231
|
-
|
12232
|
-
|
12233
|
-
|
12234
|
-
|
12235
|
-
|
12236
|
-
|
12237
|
-
|
12238
|
-
|
12239
|
-
unRegisterFunctionOnPropertyValueChanged(name: string, key: string): void;
|
12240
|
-
getPanel(): IPanel;
|
12241
|
-
getLayoutType(): string;
|
12242
|
-
isLayoutTypeSupported(layoutType: string): boolean;
|
12243
|
-
removeElement(el: IElement): boolean;
|
12244
|
-
onAnyValueChanged(name: string): any;
|
12245
|
-
updateCustomWidgets(): any;
|
12246
|
-
clearIncorrectValues(): any;
|
12247
|
-
clearErrors(): any;
|
12248
|
-
dispose(): void;
|
12249
|
-
needResponsiveWidth(): boolean;
|
12330
|
+
export class Event<CallbackFunction extends Function, Sender, Options> {
|
12331
|
+
onCallbacksChanged: () => void;
|
12332
|
+
protected callbacks: Array<CallbackFunction>;
|
12333
|
+
get isEmpty(): boolean;
|
12334
|
+
get length(): number;
|
12335
|
+
fireByCreatingOptions(sender: any, createOptions: () => Options): void;
|
12336
|
+
fire(sender: Sender, options: Options): void;
|
12337
|
+
clear(): void;
|
12338
|
+
add(func: CallbackFunction): void;
|
12339
|
+
remove(func: CallbackFunction): void;
|
12340
|
+
hasFunc(func: CallbackFunction): boolean;
|
12341
|
+
private fireCallbackChanged;
|
12250
12342
|
}
|
12251
|
-
export
|
12252
|
-
hasTitle: boolean;
|
12253
|
-
isEmpty(): boolean;
|
12254
|
-
onSurveyValueChanged(newValue: any): any;
|
12255
|
-
updateValueFromSurvey(newValue: any): any;
|
12256
|
-
updateCommentFromSurvey(newValue: any): any;
|
12257
|
-
supportGoNextPageAutomatic(): boolean;
|
12258
|
-
clearUnusedValues(): any;
|
12259
|
-
getDisplayValue(keysAsText: boolean, value: any): any;
|
12260
|
-
getValueName(): string;
|
12261
|
-
clearValue(): any;
|
12262
|
-
clearValueIfInvisible(): any;
|
12263
|
-
isAnswerCorrect(): boolean;
|
12264
|
-
updateValueWithDefaults(): any;
|
12265
|
-
getQuestionFromArray(name: string, index: number): IQuestion;
|
12266
|
-
value: any;
|
12267
|
-
survey: any;
|
12343
|
+
export class EventBase<Sender, Options = any> extends Event<(sender: Sender, options: Options) => any, Sender, Options> {
|
12268
12344
|
}
|
12269
|
-
|
12270
|
-
|
12271
|
-
|
12272
|
-
|
12345
|
+
}
|
12346
|
+
declare module "utils/popup" {
|
12347
|
+
export type VerticalPosition = "top" | "bottom" | "middle";
|
12348
|
+
export type HorizontalPosition = "left" | "right" | "center";
|
12349
|
+
export type PositionMode = "flex" | "fixed";
|
12350
|
+
export interface IPosition {
|
12351
|
+
left?: number | string;
|
12352
|
+
top?: number | string;
|
12273
12353
|
}
|
12274
|
-
export interface
|
12275
|
-
|
12276
|
-
|
12277
|
-
getQuestionStartIndex(): string;
|
12278
|
-
parent: IPanel;
|
12279
|
-
elementWidthChanged(el: IElement): any;
|
12280
|
-
indexOf(el: IElement): number;
|
12281
|
-
elements: Array<IElement>;
|
12282
|
-
ensureRowsVisibility(): void;
|
12283
|
-
validateContainerOnly(): void;
|
12354
|
+
export interface INumberPosition extends IPosition {
|
12355
|
+
left?: number;
|
12356
|
+
top?: number;
|
12284
12357
|
}
|
12285
|
-
export interface
|
12286
|
-
|
12358
|
+
export interface ISize {
|
12359
|
+
width: number;
|
12360
|
+
height: number;
|
12287
12361
|
}
|
12288
|
-
export
|
12289
|
-
|
12290
|
-
|
12291
|
-
|
12292
|
-
|
12293
|
-
|
12294
|
-
|
12295
|
-
|
12362
|
+
export class PopupUtils {
|
12363
|
+
static bottomIndent: number;
|
12364
|
+
static calculatePosition(targetRect: ClientRect, height: number, width: number, verticalPosition: VerticalPosition, horizontalPosition: HorizontalPosition, showPointer: boolean, positionMode?: PositionMode): INumberPosition;
|
12365
|
+
static updateVerticalDimensions(top: number, height: number, windowHeight: number): any;
|
12366
|
+
static updateHorizontalDimensions(left: number, width: number, windowWidth: number, horizontalPosition: HorizontalPosition, positionMode?: PositionMode, margins?: {
|
12367
|
+
left: number;
|
12368
|
+
right: number;
|
12369
|
+
}): {
|
12370
|
+
width: number;
|
12371
|
+
left: number;
|
12372
|
+
};
|
12373
|
+
static updateVerticalPosition(targetRect: ClientRect, height: number, verticalPosition: VerticalPosition, showPointer: boolean, windowHeight: number): VerticalPosition;
|
12374
|
+
static calculatePopupDirection(verticalPosition: VerticalPosition, horizontalPosition: HorizontalPosition): string;
|
12375
|
+
static calculatePointerTarget(targetRect: ClientRect, top: number, left: number, verticalPosition: VerticalPosition, horizontalPosition: HorizontalPosition, marginLeft?: number, marginRight?: number): INumberPosition;
|
12296
12376
|
}
|
12297
|
-
|
12298
|
-
|
12299
|
-
|
12300
|
-
|
12301
|
-
|
12377
|
+
}
|
12378
|
+
declare module "popup" {
|
12379
|
+
import { Base, EventBase } from "base";
|
12380
|
+
import { IAction } from "actions/action";
|
12381
|
+
import { VerticalPosition, HorizontalPosition, PositionMode } from "utils/popup";
|
12382
|
+
export interface IPopupOptionsBase {
|
12383
|
+
onHide?: () => void;
|
12384
|
+
onShow?: () => void;
|
12385
|
+
onApply?: () => boolean;
|
12386
|
+
onCancel?: () => void;
|
12387
|
+
cssClass?: string;
|
12388
|
+
title?: string;
|
12389
|
+
verticalPosition?: VerticalPosition;
|
12390
|
+
horizontalPosition?: HorizontalPosition;
|
12391
|
+
showPointer?: boolean;
|
12392
|
+
isModal?: boolean;
|
12393
|
+
displayMode?: "popup" | "overlay";
|
12302
12394
|
}
|
12303
|
-
export interface
|
12304
|
-
|
12305
|
-
|
12395
|
+
export interface IDialogOptions extends IPopupOptionsBase {
|
12396
|
+
componentName: string;
|
12397
|
+
data: any;
|
12398
|
+
onApply: () => boolean;
|
12306
12399
|
}
|
12307
|
-
export interface
|
12308
|
-
|
12309
|
-
|
12400
|
+
export interface IPopupModel<T = any> extends IDialogOptions {
|
12401
|
+
contentComponentName: string;
|
12402
|
+
contentComponentData: T;
|
12403
|
+
}
|
12404
|
+
export class PopupModel<T = any> extends Base {
|
12405
|
+
setWidthByTarget: boolean;
|
12406
|
+
focusFirstInputSelector: string;
|
12407
|
+
contentComponentName: string;
|
12408
|
+
contentComponentData: T;
|
12409
|
+
verticalPosition: VerticalPosition;
|
12410
|
+
horizontalPosition: HorizontalPosition;
|
12411
|
+
showPointer: boolean;
|
12412
|
+
isModal: boolean;
|
12413
|
+
isFocusedContent: boolean;
|
12414
|
+
isFocusedContainer: boolean;
|
12415
|
+
onCancel: () => void;
|
12416
|
+
onApply: () => boolean;
|
12417
|
+
onHide: () => void;
|
12418
|
+
onShow: () => void;
|
12419
|
+
cssClass: string;
|
12420
|
+
title: string;
|
12421
|
+
displayMode: "popup" | "overlay";
|
12422
|
+
positionMode: PositionMode;
|
12423
|
+
onVisibilityChanged: EventBase<PopupModel>;
|
12424
|
+
onFooterActionsCreated: EventBase<Base>;
|
12425
|
+
onRecalculatePosition: EventBase<Base>;
|
12426
|
+
private refreshInnerModel;
|
12427
|
+
constructor(contentComponentName: string, contentComponentData: T, verticalPosition?: VerticalPosition, horizontalPosition?: HorizontalPosition, showPointer?: boolean, isModal?: boolean, onCancel?: () => void, onApply?: () => boolean, onHide?: () => void, onShow?: () => void, cssClass?: string, title?: string);
|
12428
|
+
get isVisible(): boolean;
|
12429
|
+
set isVisible(value: boolean);
|
12430
|
+
toggleVisibility(): void;
|
12431
|
+
recalculatePosition(isResetHeight: boolean): void;
|
12432
|
+
updateFooterActions(footerActions: Array<IAction>): Array<IAction>;
|
12310
12433
|
}
|
12434
|
+
export function createDialogOptions(componentName: string, data: any, onApply: () => boolean, onCancel?: () => void, onHide?: () => void, onShow?: () => void, cssClass?: string, title?: string, displayMode?: "popup" | "overlay"): IDialogOptions;
|
12435
|
+
}
|
12436
|
+
declare module "settings" {
|
12437
|
+
import { IDialogOptions } from "popup";
|
12311
12438
|
export type ISurveyEnvironment = {
|
12312
12439
|
root: Document | ShadowRoot;
|
12313
12440
|
rootElement: HTMLElement | ShadowRoot;
|
@@ -12315,564 +12442,522 @@ declare module "base-interfaces" {
|
|
12315
12442
|
svgMountContainer: HTMLElement | string;
|
12316
12443
|
stylesSheetsMountContainer: HTMLElement;
|
12317
12444
|
};
|
12318
|
-
export type LayoutElementContainer = "header" | "footer" | "left" | "right" | "contentTop" | "contentBottom";
|
12319
|
-
export interface ISurveyLayoutElement {
|
12320
|
-
id: string;
|
12321
|
-
container?: LayoutElementContainer | Array<LayoutElementContainer>;
|
12322
|
-
component?: string;
|
12323
|
-
template?: string;
|
12324
|
-
data?: any;
|
12325
|
-
}
|
12326
|
-
}
|
12327
|
-
declare module "itemvalue" {
|
12328
|
-
import { ILocalizableOwner, LocalizableString } from "localizablestring";
|
12329
|
-
import { ConditionRunner } from "conditions";
|
12330
|
-
import { IShortcutText, ISurvey } from "base-interfaces";
|
12331
|
-
import { BaseAction } from "actions/action";
|
12332
12445
|
/**
|
12333
|
-
*
|
12334
|
-
*
|
12335
|
-
*
|
12446
|
+
* Global settings that apply to all surveys on the page. To specify one of the settings, use the code below:
|
12447
|
+
*
|
12448
|
+
* ```js
|
12449
|
+
* import { settings } from "survey-core";
|
12450
|
+
*
|
12451
|
+
* settings.settingName = "value";
|
12452
|
+
* ```
|
12336
12453
|
*/
|
12337
|
-
export
|
12338
|
-
|
12339
|
-
|
12340
|
-
|
12341
|
-
|
12342
|
-
|
12343
|
-
|
12344
|
-
|
12345
|
-
|
12454
|
+
export var settings: {
|
12455
|
+
/**
|
12456
|
+
* An object that configures survey appearance when the survey is being designed in Survey Creator.
|
12457
|
+
*
|
12458
|
+
* Nested properties:
|
12459
|
+
*
|
12460
|
+
* - `showEmptyDescriptions`: `Boolean`\
|
12461
|
+
* Specifies whether to display an empty description for pages and panels. Default value: `true`.
|
12462
|
+
*
|
12463
|
+
* - `showEmptyTitles`: `Boolean`\
|
12464
|
+
* Specifies whether to display an empty title for pages and panels. Default value: `true`.
|
12465
|
+
*/
|
12466
|
+
designMode: {
|
12467
|
+
showEmptyDescriptions: boolean;
|
12468
|
+
showEmptyTitles: boolean;
|
12469
|
+
};
|
12470
|
+
/**
|
12471
|
+
* This property is obsolete. Use the [`settings.designMode.showEmptyDescriptions`](https://surveyjs.io/form-library/documentation/api-reference/settings#designMode) property instead.
|
12472
|
+
*/
|
12473
|
+
allowShowEmptyDescriptionInDesignMode: boolean;
|
12474
|
+
/**
|
12475
|
+
* This property is obsolete. Use the [`settings.designMode.showEmptyTitles`](https://surveyjs.io/form-library/documentation/api-reference/settings#designMode) property instead.
|
12476
|
+
*/
|
12477
|
+
allowShowEmptyTitleInDesignMode: boolean;
|
12478
|
+
/**
|
12479
|
+
* An object that contains properties related to localization.
|
12480
|
+
*
|
12481
|
+
* Nested properties:
|
12482
|
+
*
|
12483
|
+
* - `useLocalTimeZone`: `Boolean`\
|
12484
|
+
* Disable this property if you want internal SurveyJS functions to use methods that work with UTC date and time (`setUTCDate()` `setUTCHours()`, etc.) instead of methods that work with local date and time (`setYear`, `setHours()`, etc.). Default value: `true`.
|
12485
|
+
*
|
12486
|
+
* - `defaultLocaleName`: `String`\
|
12487
|
+
* A property key that stores a translation for the default locale. Default value: `"default"`.
|
12488
|
+
*
|
12489
|
+
* - `storeDuplicatedTranslations`: `Boolean`\
|
12490
|
+
* Specifies whether surveys should store translation strings that equal the translation strings in the default locale. Default value: `false`.
|
12491
|
+
*/
|
12492
|
+
localization: {
|
12493
|
+
useLocalTimeZone: boolean;
|
12494
|
+
storeDuplicatedTranslations: boolean;
|
12495
|
+
defaultLocaleName: string;
|
12496
|
+
};
|
12497
|
+
/**
|
12498
|
+
* This property is obsolete. Use the [`settings.localization.useLocalTimeZone`](https://surveyjs.io/form-library/documentation/api-reference/settings#localization) property instead.
|
12499
|
+
*/
|
12500
|
+
useLocalTimeZone: boolean;
|
12501
|
+
/**
|
12502
|
+
* This property is obsolete. Use the [`settings.localization.storeDuplicatedTranslations`](https://surveyjs.io/form-library/documentation/api-reference/settings#localization) property instead.
|
12503
|
+
*/
|
12504
|
+
storeDuplicatedTranslations: boolean;
|
12505
|
+
/**
|
12506
|
+
* This property is obsolete. Use the [`settings.localization.defaultLocaleName`](https://surveyjs.io/form-library/documentation/api-reference/settings#localization) property instead.
|
12507
|
+
*/
|
12508
|
+
defaultLocaleName: string;
|
12509
|
+
/**
|
12510
|
+
* An object with properties that configure surveys when they work with a web service.
|
12511
|
+
*
|
12512
|
+
* Nested properties:
|
12513
|
+
*
|
12514
|
+
* - `encodeUrlParams`: `Boolean`\
|
12515
|
+
* Specifies whether to encode URL parameters when you access a web service. Default value: `true`.
|
12516
|
+
*
|
12517
|
+
* - `cacheLoadedChoices`: `Boolean`\
|
12518
|
+
* Specifies whether to cache [choices](https://surveyjs.io/form-library/documentation/api-reference/checkbox-question-model#choicesByUrl) loaded from a web service. Default value: `true`.
|
12519
|
+
*
|
12520
|
+
* - `disableQuestionWhileLoadingChoices`: `Boolean`\
|
12521
|
+
* Disables a question while its choices are being loaded from a web service. Default value: `false`.
|
12522
|
+
*
|
12523
|
+
* - `surveyServiceUrl`: `String`\
|
12524
|
+
* The URL of the SurveyJS Service API endpoint.
|
12525
|
+
*/
|
12526
|
+
web: {
|
12527
|
+
encodeUrlParams: boolean;
|
12528
|
+
cacheLoadedChoices: boolean;
|
12529
|
+
disableQuestionWhileLoadingChoices: boolean;
|
12530
|
+
surveyServiceUrl: string;
|
12531
|
+
};
|
12532
|
+
/**
|
12533
|
+
* This property is obsolete. Use the [`settings.web.encodeUrlParams`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
|
12534
|
+
*/
|
12535
|
+
webserviceEncodeParameters: boolean;
|
12536
|
+
/**
|
12537
|
+
* This property is obsolete. Use the [`settings.web.cacheLoadedChoices`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
|
12538
|
+
*/
|
12539
|
+
useCachingForChoicesRestful: boolean;
|
12540
|
+
useCachingForChoicesRestfull: boolean;
|
12541
|
+
/**
|
12542
|
+
* This property is obsolete. Use the [`settings.web.disableQuestionWhileLoadingChoices`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
|
12543
|
+
*/
|
12544
|
+
disableOnGettingChoicesFromWeb: boolean;
|
12545
|
+
/**
|
12546
|
+
* This property is obsolete. Use the [`settings.web.surveyServiceUrl`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
|
12547
|
+
*/
|
12548
|
+
surveyServiceUrl: string;
|
12549
|
+
/**
|
12550
|
+
* An object that contains properties related to [triggers](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-survey-logic-triggers).
|
12551
|
+
*
|
12552
|
+
* Nested properties:
|
12553
|
+
*
|
12554
|
+
* - `changeNavigationButtonsOnComplete`: `Boolean`\
|
12555
|
+
* Specifies whether to re-evaluate an expression associated with the [Complete trigger](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#complete) immediately when a question value changes. If the expression evaluates to `true`, the trigger is executed. Default value: `false`.\
|
12556
|
+
* Keep this property set to `false` if you want to re-evaluate the Complete trigger's expression only when the respondents navigate to another page.
|
12557
|
+
*
|
12558
|
+
* - `executeCompleteOnValueChanged`: `Boolean`\
|
12559
|
+
* Specifies whether to replace the Next button with the Complete button when the [Complete trigger](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#complete) is going to be executed. Default value: `true`.
|
12560
|
+
*
|
12561
|
+
* - `executeSkipOnValueChanged`: `Boolean`\
|
12562
|
+
* Specifies whether to re-evaluate an expression associated with the [Skip trigger](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#skip) immediately when a question value changes. If the expression evaluates to `true`, the trigger is executed. Default value: `true`.\
|
12563
|
+
* Disable this property if you want to re-evaluate the Skip trigger's expression only when respondents navigate to another page.
|
12564
|
+
*/
|
12565
|
+
triggers: {
|
12566
|
+
changeNavigationButtonsOnComplete: boolean;
|
12567
|
+
executeCompleteOnValueChanged: boolean;
|
12568
|
+
executeSkipOnValueChanged: boolean;
|
12569
|
+
};
|
12570
|
+
/**
|
12571
|
+
* This property is obsolete. Use the [`settings.triggers.executeCompleteOnValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/settings#triggers) property instead.
|
12572
|
+
*/
|
12573
|
+
executeCompleteTriggerOnValueChanged: boolean;
|
12574
|
+
/**
|
12575
|
+
* This property is obsolete. Use the [`settings.triggers.changeNavigationButtonsOnComplete`](https://surveyjs.io/form-library/documentation/api-reference/settings#triggers) property instead.
|
12576
|
+
*/
|
12577
|
+
changeNavigationButtonsOnCompleteTrigger: boolean;
|
12578
|
+
/**
|
12579
|
+
* This property is obsolete. Use the [`settings.triggers.executeSkipOnValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/settings#triggers) property instead.
|
12580
|
+
*/
|
12581
|
+
executeSkipTriggerOnValueChanged: boolean;
|
12582
|
+
/**
|
12583
|
+
* An object that contains properties related to JSON serialization.
|
12584
|
+
*
|
12585
|
+
* Nested properties:
|
12586
|
+
*
|
12587
|
+
* - `itemValueSerializeAsObject`: `Boolean`\
|
12588
|
+
* Enable this property if you want to serialize [`ItemValue`](https://surveyjs.io/form-library/documentation/api-reference/itemvalue) instances as objects even when they include only the `value` property. Default value: `false`. View an example below.
|
12589
|
+
*
|
12590
|
+
* - `itemValueSerializeDisplayText`: `Boolean`\
|
12591
|
+
* Enable this property if you want to serialize the `text` property of [`ItemValue`](https://surveyjs.io/form-library/documentation/api-reference/itemvalue) objects even when it is empty or equal to the `value` property. Default value: `false`. View an example below.
|
12592
|
+
*
|
12593
|
+
* - `localizableStringSerializeAsObject`: `Boolean`\
|
12594
|
+
* Enable this property if you want to serialize [`LocalizableString`](https://surveyjs.io/form-library/documentation/api-reference/localizablestring) instances as objects even when they include only a translation string for the default locale. For example, `"Custom String"` will be serialized as `{ default: "Custom String" }`. Default value: `false`.
|
12595
|
+
*
|
12596
|
+
* ```js
|
12597
|
+
* import { ItemValue, settings } from "survey-core";
|
12598
|
+
*
|
12599
|
+
* // `itemValueSerializeAsObject` example
|
12600
|
+
* settings.localization.itemValueSerializeAsObject = true;
|
12601
|
+
* const item = new ItemValue(5);
|
12602
|
+
* const itemString = item.toJSON(); // Produces { value: 5 } instead of 5
|
12603
|
+
*
|
12604
|
+
* // `itemValueSerializeDisplayText` example
|
12605
|
+
* settings.localization.itemValueSerializeDisplayText = true;
|
12606
|
+
* const item = new ItemValue("item1");
|
12607
|
+
* const itemString = item.toJSON(); // Produces { value: "item1", text: "item1" } instead of "item1"
|
12608
|
+
* ```
|
12609
|
+
*/
|
12610
|
+
serialization: {
|
12611
|
+
itemValueSerializeAsObject: boolean;
|
12612
|
+
itemValueSerializeDisplayText: boolean;
|
12613
|
+
localizableStringSerializeAsObject: boolean;
|
12614
|
+
};
|
12346
12615
|
/**
|
12347
|
-
*
|
12616
|
+
* This property is obsolete. Use the [`settings.serialization.itemValueSerializeAsObject`](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization) property instead.
|
12348
12617
|
*/
|
12349
|
-
|
12350
|
-
static getData(items: Array<ItemValue>): any;
|
12351
|
-
static getItemByValue(items: Array<ItemValue>, val: any): ItemValue;
|
12352
|
-
static getTextOrHtmlByValue(items: Array<ItemValue>, val: any): string;
|
12353
|
-
static locStrsChanged(items: Array<ItemValue>): void;
|
12354
|
-
static runConditionsForItems(items: Array<ItemValue>, filteredItems: Array<ItemValue>, runner: ConditionRunner, values: any, properties: any, useItemExpression?: boolean, onItemCallBack?: (item: ItemValue, val: boolean) => boolean): boolean;
|
12355
|
-
static runEnabledConditionsForItems(items: Array<ItemValue>, runner: ConditionRunner, values: any, properties: any, onItemCallBack?: (item: ItemValue, val: boolean) => boolean): boolean;
|
12356
|
-
private static runConditionsForItemsCore;
|
12357
|
-
ownerPropertyName: string;
|
12358
|
-
private _visible;
|
12359
|
-
private locTextValue;
|
12360
|
-
private visibleConditionRunner;
|
12361
|
-
private enableConditionRunner;
|
12362
|
-
constructor(value: any, text?: string, typeName?: string);
|
12363
|
-
onCreating(): any;
|
12364
|
-
getType(): string;
|
12365
|
-
getSurvey(live?: boolean): ISurvey;
|
12366
|
-
getLocale(): string;
|
12367
|
-
isGhost: boolean;
|
12368
|
-
protected get isInternal(): boolean;
|
12369
|
-
get locText(): LocalizableString;
|
12370
|
-
setLocText(locText: LocalizableString): void;
|
12371
|
-
private _locOwner;
|
12372
|
-
get locOwner(): ILocalizableOwner;
|
12373
|
-
set locOwner(value: ILocalizableOwner);
|
12374
|
-
get value(): any;
|
12375
|
-
set value(newValue: any);
|
12376
|
-
get hasText(): boolean;
|
12377
|
-
get pureText(): string;
|
12378
|
-
set pureText(val: string);
|
12379
|
-
get text(): string;
|
12380
|
-
set text(newText: string);
|
12381
|
-
get calculatedText(): string;
|
12382
|
-
get shortcutText(): string;
|
12383
|
-
private canSerializeValue;
|
12384
|
-
getData(): any;
|
12385
|
-
toJSON(): any;
|
12386
|
-
setData(value: any): void;
|
12387
|
-
get visibleIf(): string;
|
12388
|
-
set visibleIf(val: string);
|
12389
|
-
get enableIf(): string;
|
12390
|
-
set enableIf(val: string);
|
12391
|
-
get isVisible(): any;
|
12392
|
-
setIsVisible(val: boolean): void;
|
12393
|
-
get isEnabled(): any;
|
12394
|
-
setIsEnabled(val: boolean): void;
|
12395
|
-
addUsedLocales(locales: Array<string>): void;
|
12396
|
-
locStrsChanged(): void;
|
12397
|
-
protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
|
12398
|
-
protected getConditionRunner(isVisible: boolean): ConditionRunner;
|
12399
|
-
private getVisibleConditionRunner;
|
12400
|
-
private getEnableConditionRunner;
|
12401
|
-
originalItem: any;
|
12402
|
-
selectedValue: boolean;
|
12403
|
-
get selected(): boolean;
|
12404
|
-
private componentValue;
|
12405
|
-
getComponent(): string;
|
12406
|
-
setComponent(val: string): void;
|
12407
|
-
protected getEnabled(): boolean;
|
12408
|
-
protected setEnabled(val: boolean): void;
|
12409
|
-
protected getVisible(): boolean;
|
12410
|
-
protected setVisible(val: boolean): void;
|
12411
|
-
protected getLocTitle(): LocalizableString;
|
12412
|
-
protected getTitle(): string;
|
12413
|
-
protected setLocTitle(val: LocalizableString): void;
|
12414
|
-
protected setTitle(val: string): void;
|
12415
|
-
icon: string;
|
12416
|
-
}
|
12417
|
-
}
|
12418
|
-
declare module "base" {
|
12419
|
-
import { ILocalizableOwner, LocalizableString } from "localizablestring";
|
12420
|
-
import { HashTable } from "helpers";
|
12421
|
-
import { JsonObjectProperty } from "jsonobject";
|
12422
|
-
import { ItemValue } from "itemvalue";
|
12423
|
-
import { IElement, IFindElement, IProgressInfo, ISurvey } from "base-interfaces";
|
12424
|
-
export class Bindings {
|
12425
|
-
private obj;
|
12426
|
-
private properties;
|
12427
|
-
private values;
|
12428
|
-
constructor(obj: Base);
|
12429
|
-
getType(): string;
|
12430
|
-
getNames(): Array<string>;
|
12431
|
-
getProperties(): Array<JsonObjectProperty>;
|
12432
|
-
setBinding(propertyName: string, valueName: string): void;
|
12433
|
-
clearBinding(propertyName: string): void;
|
12434
|
-
isEmpty(): boolean;
|
12435
|
-
getValueNameByPropertyName(propertyName: string): string;
|
12436
|
-
getPropertiesByValueName(valueName: string): Array<string>;
|
12437
|
-
getJson(): any;
|
12438
|
-
setJson(value: any): void;
|
12439
|
-
private fillProperties;
|
12440
|
-
private onChangedJSON;
|
12441
|
-
}
|
12442
|
-
export class Dependencies {
|
12443
|
-
currentDependency: () => void;
|
12444
|
-
target: Base;
|
12445
|
-
property: string;
|
12446
|
-
private static DependenciesCount;
|
12447
|
-
constructor(currentDependency: () => void, target: Base, property: string);
|
12448
|
-
dependencies: Array<{
|
12449
|
-
obj: Base;
|
12450
|
-
prop: string;
|
12451
|
-
id: string;
|
12452
|
-
}>;
|
12453
|
-
id: string;
|
12454
|
-
addDependency(target: Base, property: string): void;
|
12455
|
-
dispose(): void;
|
12456
|
-
}
|
12457
|
-
export class ComputedUpdater<T = any> {
|
12458
|
-
private _updater;
|
12459
|
-
static readonly ComputedUpdaterType = "__dependency_computed";
|
12460
|
-
private dependencies;
|
12461
|
-
constructor(_updater: () => T);
|
12462
|
-
readonly type = "__dependency_computed";
|
12463
|
-
get updater(): () => T;
|
12464
|
-
setDependencies(dependencies: Dependencies): void;
|
12465
|
-
protected getDependencies(): Dependencies;
|
12466
|
-
private clearDependencies;
|
12467
|
-
dispose(): any;
|
12468
|
-
}
|
12469
|
-
/**
|
12470
|
-
* A base class for all SurveyJS objects.
|
12471
|
-
*/
|
12472
|
-
export class Base {
|
12473
|
-
private static currentDependencis;
|
12474
|
-
static finishCollectDependencies(): Dependencies;
|
12475
|
-
static startCollectDependencies(updater: () => void, target: Base, property: string): void;
|
12476
|
-
private static collectDependency;
|
12477
|
-
static get commentSuffix(): string;
|
12478
|
-
static set commentSuffix(val: string);
|
12479
|
-
static get commentPrefix(): string;
|
12480
|
-
static set commentPrefix(val: string);
|
12481
|
-
static createItemValue: (item: any, type?: string) => any;
|
12482
|
-
static itemValueLocStrChanged: (arr: Array<any>) => void;
|
12618
|
+
itemValueAlwaysSerializeAsObject: boolean;
|
12483
12619
|
/**
|
12484
|
-
*
|
12485
|
-
*
|
12486
|
-
* @param value A value to be checked.
|
12487
|
-
* @param trimString (Optional) When this parameter is `true`, the method ignores whitespace characters at the beginning and end of a string value. Pass `false` to disable this functionality.
|
12620
|
+
* This property is obsolete. Use the [`settings.serialization.itemValueSerializeDisplayText`](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization) property instead.
|
12488
12621
|
*/
|
12489
|
-
|
12490
|
-
protected trimValue(value: any): any;
|
12491
|
-
protected isPropertyEmpty(value: any): boolean;
|
12492
|
-
private propertyHash;
|
12493
|
-
private localizableStrings;
|
12494
|
-
private arraysInfo;
|
12495
|
-
private eventList;
|
12496
|
-
private expressionInfo;
|
12497
|
-
private bindingsValue;
|
12498
|
-
private isDisposedValue;
|
12499
|
-
private classMetaData;
|
12500
|
-
private onPropChangeFunctions;
|
12501
|
-
protected isLoadingFromJsonValue: boolean;
|
12502
|
-
loadingOwner: Base;
|
12622
|
+
itemValueAlwaysSerializeText: boolean;
|
12503
12623
|
/**
|
12504
|
-
*
|
12624
|
+
* This property is obsolete. Use the [`settings.serialization.localizableStringSerializeAsObject`](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization) property instead.
|
12625
|
+
*/
|
12626
|
+
serializeLocalizableStringAsObject: boolean;
|
12627
|
+
/**
|
12628
|
+
* An object that configures lazy rendering.
|
12505
12629
|
*
|
12506
|
-
*
|
12630
|
+
* Nested properties:
|
12507
12631
|
*
|
12508
|
-
* - `
|
12509
|
-
*
|
12510
|
-
*
|
12511
|
-
*
|
12512
|
-
* - `options.newValue`: `any`\
|
12513
|
-
* A new value for the property.
|
12514
|
-
* - `options.oldValue`: `any`\
|
12515
|
-
* An old value of the property. If the property is an array, `oldValue` contains the same array as `newValue` does.
|
12632
|
+
* - `enabled`: `Boolean`\
|
12633
|
+
* Specifies whether to add questions to the DOM only when they get into the viewport. Default value: `false`.
|
12634
|
+
*
|
12635
|
+
* > Lazy rendering is an experimental feature that may not work as expected in all use cases.
|
12516
12636
|
*/
|
12517
|
-
|
12637
|
+
lazyRender: {
|
12638
|
+
enabled: boolean;
|
12639
|
+
firstBatchSize: number;
|
12640
|
+
};
|
12518
12641
|
/**
|
12519
|
-
*
|
12642
|
+
* This property is obsolete. Use the [`settings.lazyRender.enabled`](https://surveyjs.io/form-library/documentation/api-reference/settings#lazyRender) property instead.
|
12643
|
+
*/
|
12644
|
+
lazyRowsRendering: boolean;
|
12645
|
+
lazyRowsRenderingStartRow: number;
|
12646
|
+
/**
|
12647
|
+
* An object with properties that apply to [Single-Choice](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-question-model), [Multiple-Choice](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-with-dropdown-list), and [Dynamic Matrix](https://surveyjs.io/form-library/documentation/api-reference/dynamic-matrix-table-question-model) questions.
|
12520
12648
|
*
|
12521
|
-
*
|
12649
|
+
* Nested properties:
|
12522
12650
|
*
|
12523
|
-
* - `
|
12524
|
-
* A
|
12525
|
-
*
|
12526
|
-
*
|
12527
|
-
*
|
12528
|
-
*
|
12529
|
-
*
|
12530
|
-
*
|
12531
|
-
*
|
12532
|
-
*
|
12651
|
+
* - `defaultRowName`: `String`\
|
12652
|
+
* A property key that stores an object with default cell values. Default value: "default".
|
12653
|
+
*
|
12654
|
+
* - `defaultCellType`: `String`\
|
12655
|
+
* The default type of matrix cells. Default value: `"dropdown"`.\
|
12656
|
+
* You can specify this setting for individual questions or matrix columns: [`cellType`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-matrix-table-question-model#cellType). Refer to the `cellType` property description for information on possible values.
|
12657
|
+
*
|
12658
|
+
* - `totalsSuffix`: `String`\
|
12659
|
+
* A suffix added to the name of the property that stores total values. The resulting property name consists of the matrix name and the suffix. Default value: `"-total"`.
|
12660
|
+
*
|
12661
|
+
* - `maxRowCount`: `Number`\
|
12662
|
+
* A maximum number of rows in a Dynamic Matrix. Default value: 1000.\
|
12663
|
+
* You can specify this setting for an individual Dynamic Matrix: [`maxRowCount`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-matrix-table-question-model#maxRowCount).
|
12664
|
+
*
|
12665
|
+
* - `maxRowCountInCondition`: `Number`\
|
12666
|
+
* A maximum number of matrix rows included in the Condition drop-down menu in Survey Creator. This menu is used to configure conditional survey logic. Default value: 1.\
|
12667
|
+
* If you set this property to 0, the Condition menu does not include any matrix rows. Users still can specify conditions that use matrix rows but only with Manual Entry.
|
12668
|
+
*
|
12669
|
+
* - `renderRemoveAsIcon`: `Boolean`\
|
12670
|
+
* Disable this property if you want to render the Remove action in Dynamic Matrix as a button. Otherwise, the action is rendered as an icon. Default value: `true`.
|
12671
|
+
*
|
12672
|
+
* - `columnWidthsByType`: `Object`\
|
12673
|
+
* An object that specifies fixed and minimum column width based on the column type.\
|
12674
|
+
* Example: `settings.matrix.columnWidthsByType = { "tagbox": { minWidth: "240px", width: "300px" } }`
|
12675
|
+
*
|
12676
|
+
* - `rateSize`: `"small"` (default) | `"normal"`\
|
12677
|
+
* Specifies the size of rate values. Applies to [Rating Scale](https://surveyjs.io/form-library/examples/rating-scale/) questions within matrixes.
|
12533
12678
|
*/
|
12534
|
-
|
12535
|
-
|
12536
|
-
|
12537
|
-
|
12538
|
-
|
12539
|
-
|
12540
|
-
|
12541
|
-
|
12542
|
-
|
12543
|
-
|
12544
|
-
|
12679
|
+
matrix: {
|
12680
|
+
defaultCellType: string;
|
12681
|
+
defaultRowName: string;
|
12682
|
+
totalsSuffix: string;
|
12683
|
+
maxRowCount: number;
|
12684
|
+
maxRowCountInCondition: number;
|
12685
|
+
renderRemoveAsIcon: boolean;
|
12686
|
+
columnWidthsByType: {
|
12687
|
+
[index: string]: {
|
12688
|
+
minWidth?: string;
|
12689
|
+
width?: string;
|
12690
|
+
};
|
12691
|
+
};
|
12692
|
+
rateSize: "small" | "normal";
|
12693
|
+
};
|
12545
12694
|
/**
|
12546
|
-
*
|
12695
|
+
* This property is obsolete. Use the [`settings.matrix.defaultRowName`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
12547
12696
|
*/
|
12548
|
-
|
12697
|
+
matrixDefaultRowName: string;
|
12549
12698
|
/**
|
12550
|
-
*
|
12551
|
-
*
|
12552
|
-
* @param typeName One of the values listed in the [getType()](https://surveyjs.io/form-library/documentation/question#getType) description.
|
12553
|
-
* @returns `true` if the current object is of a given `typeName` or inherited from it.
|
12554
|
-
* @see getType
|
12699
|
+
* This property is obsolete. Use the [`settings.matrix.defaultCellType`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
12555
12700
|
*/
|
12556
|
-
|
12557
|
-
getSurvey(isLive?: boolean): ISurvey;
|
12701
|
+
matrixDefaultCellType: string;
|
12558
12702
|
/**
|
12559
|
-
*
|
12703
|
+
* This property is obsolete. Use the [`settings.matrix.totalsSuffix`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
12560
12704
|
*/
|
12561
|
-
|
12705
|
+
matrixTotalValuePostFix: string;
|
12562
12706
|
/**
|
12563
|
-
*
|
12564
|
-
*
|
12565
|
-
* This property may return `false`, for example, when you [create a survey model dynamically](https://surveyjs.io/form-library/documentation/design-survey-create-a-simple-survey#create-or-change-a-survey-model-dynamically).
|
12707
|
+
* This property is obsolete. Use the [`settings.matrix.maxRowCount`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
12566
12708
|
*/
|
12567
|
-
|
12568
|
-
get bindings(): Bindings;
|
12569
|
-
checkBindings(valueName: string, value: any): void;
|
12570
|
-
protected updateBindings(propertyName: string, value: any): void;
|
12571
|
-
protected updateBindingValue(valueName: string, value: any): void;
|
12572
|
-
getTemplate(): string;
|
12709
|
+
matrixMaximumRowCount: number;
|
12573
12710
|
/**
|
12574
|
-
*
|
12711
|
+
* This property is obsolete. Use the [`settings.matrix.maxRowCountInCondition`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
12575
12712
|
*/
|
12576
|
-
|
12577
|
-
protected getIsLoadingFromJson(): boolean;
|
12578
|
-
startLoadingFromJson(json?: any): void;
|
12579
|
-
endLoadingFromJson(): void;
|
12713
|
+
matrixMaxRowCountInCondition: number;
|
12580
12714
|
/**
|
12581
|
-
*
|
12582
|
-
* @see fromJSON
|
12715
|
+
* This property is obsolete. Use the [`settings.matrix.renderRemoveAsIcon`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
12583
12716
|
*/
|
12584
|
-
|
12717
|
+
matrixRenderRemoveAsIcon: boolean;
|
12585
12718
|
/**
|
12586
|
-
*
|
12719
|
+
* An object with properties that apply to [Dynamic Panel](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model) questions.
|
12587
12720
|
*
|
12588
|
-
*
|
12721
|
+
* Nested properties:
|
12589
12722
|
*
|
12590
|
-
*
|
12591
|
-
*
|
12723
|
+
* - `maxPanelCount`: `Number`\
|
12724
|
+
* A maximum number of panels in Dynamic Panel. Default value: 100.\
|
12725
|
+
* You can specify this setting for an individual Dynamic Panel: [`maxPanelCount`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#maxPanelCount).
|
12726
|
+
*
|
12727
|
+
* - `maxPanelCountInCondition`: `Number`\
|
12728
|
+
* A maximum number of Dynamic Panel panels included in the Condition drop-down menu in Survey Creator. This menu is used to configure conditional survey logic. Default value: 1.\
|
12729
|
+
* If you set this property to 0, the Condition menu does not include any panel questions. Users still can specify conditions that use panel questions but only with Manual Entry.
|
12592
12730
|
*/
|
12593
|
-
|
12594
|
-
|
12731
|
+
panel: {
|
12732
|
+
maxPanelCount: number;
|
12733
|
+
maxPanelCountInCondition: number;
|
12734
|
+
};
|
12595
12735
|
/**
|
12596
|
-
*
|
12736
|
+
* This property is obsolete. Use the [`settings.panel.maxPanelCountInCondition`](https://surveyjs.io/form-library/documentation/api-reference/settings#panel) property instead.
|
12597
12737
|
*/
|
12598
|
-
|
12738
|
+
panelDynamicMaxPanelCountInCondition: number;
|
12599
12739
|
/**
|
12600
|
-
*
|
12601
|
-
*
|
12602
|
-
* If the property is not found, this method returns `null`.
|
12603
|
-
* @param propName A property name.
|
12740
|
+
* This property is obsolete. Use the [`settings.panel.maxPanelCount`](https://surveyjs.io/form-library/documentation/api-reference/settings#panel) property instead.
|
12604
12741
|
*/
|
12605
|
-
|
12606
|
-
isPropertyVisible(propName: string): boolean;
|
12607
|
-
static createProgressInfo(): IProgressInfo;
|
12608
|
-
getProgressInfo(): IProgressInfo;
|
12609
|
-
localeChanged(): void;
|
12610
|
-
locStrsChanged(): void;
|
12742
|
+
panelMaximumPanelCount: number;
|
12611
12743
|
/**
|
12612
|
-
*
|
12744
|
+
* An object with properties that configure questions in read-only mode.
|
12613
12745
|
*
|
12614
|
-
*
|
12746
|
+
* Nested properties:
|
12615
12747
|
*
|
12616
|
-
*
|
12617
|
-
*
|
12748
|
+
* - `commentRenderMode`: `"textarea"` (default) | `"div"`\
|
12749
|
+
* Specifies how to render the input field of [Comment](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model) questions in [read-only](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model#readOnly) mode: as a disabled `<textarea>` element or as a `<div>` element with a non-editable question value within it.
|
12750
|
+
*
|
12751
|
+
* - `textRenderMode`: `"input"` (default) | `"div"`\
|
12752
|
+
* Specifies how to render the input field of [Text](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model) questions in [read-only](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#readOnly) mode: as a disabled `<input>` element or as a `<div>` element with a non-editable question value within it.
|
12618
12753
|
*/
|
12619
|
-
|
12620
|
-
|
12621
|
-
|
12622
|
-
|
12623
|
-
geValueFromHash(): any;
|
12624
|
-
protected setPropertyValueCore(propertiesHash: any, name: string, val: any): void;
|
12625
|
-
get isEditingSurveyElement(): boolean;
|
12626
|
-
iteratePropertiesHash(func: (hash: any, key: any) => void): void;
|
12754
|
+
readOnly: {
|
12755
|
+
commentRenderMode: string;
|
12756
|
+
textRenderMode: string;
|
12757
|
+
};
|
12627
12758
|
/**
|
12628
|
-
*
|
12629
|
-
* @param name A property name.
|
12630
|
-
* @param val A new value for the property.
|
12759
|
+
* This property is obsolete. Use the [`settings.readOnly.commentRenderMode`](https://surveyjs.io/form-library/documentation/api-reference/settings#readOnly) property instead.
|
12631
12760
|
*/
|
12632
|
-
|
12633
|
-
protected setArrayPropertyDirectly(name: string, val: any, sendNotification?: boolean): void;
|
12634
|
-
protected setPropertyValueDirectly(name: string, val: any): void;
|
12635
|
-
protected clearPropertyValue(name: string): void;
|
12636
|
-
onPropertyValueChangedCallback(name: string, oldValue: any, newValue: any, sender: Base, arrayChanges: ArrayChanges): void;
|
12637
|
-
itemValuePropertyChanged(item: ItemValue, name: string, oldValue: any, newValue: any): void;
|
12638
|
-
protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
|
12639
|
-
protected propertyValueChanged(name: string, oldValue: any, newValue: any, arrayChanges?: ArrayChanges, target?: Base): void;
|
12640
|
-
onBindingChanged(oldValue: any, newValue: any): void;
|
12641
|
-
protected get isInternal(): boolean;
|
12642
|
-
private doPropertyValueChangedCallback;
|
12643
|
-
addExpressionProperty(name: string, onExecute: (obj: Base, res: any) => void, canRun?: (obj: Base) => boolean): void;
|
12644
|
-
getDataFilteredValues(): any;
|
12645
|
-
getDataFilteredProperties(): any;
|
12646
|
-
protected runConditionCore(values: HashTable<any>, properties: HashTable<any>): void;
|
12647
|
-
protected canRunConditions(): boolean;
|
12648
|
-
private checkConditionPropertyChanged;
|
12649
|
-
private runConditionItemCore;
|
12761
|
+
readOnlyCommentRenderMode: string;
|
12650
12762
|
/**
|
12651
|
-
*
|
12652
|
-
* @param propertyNames An array of one or multiple property names.
|
12653
|
-
* @param handler A function to call when one of the listed properties change.
|
12654
|
-
* @param key (Optional) A key that identifies the current registration. If a function for one of the properties is already registered with the same key, the function will be overwritten. You can also use the key to subsequently unregister handlers.
|
12655
|
-
* @see unregisterPropertyChangedHandlers
|
12763
|
+
* This property is obsolete. Use the [`settings.readOnly.textRenderMode`](https://surveyjs.io/form-library/documentation/api-reference/settings#readOnly) property instead.
|
12656
12764
|
*/
|
12657
|
-
|
12765
|
+
readOnlyTextRenderMode: string;
|
12658
12766
|
/**
|
12659
|
-
*
|
12660
|
-
*
|
12661
|
-
*
|
12662
|
-
*
|
12663
|
-
|
12664
|
-
|
12665
|
-
|
12666
|
-
|
12667
|
-
|
12668
|
-
|
12669
|
-
|
12670
|
-
|
12671
|
-
|
12672
|
-
|
12673
|
-
protected createLocalizableString(name: string, owner: ILocalizableOwner, useMarkDown?: boolean, defaultStr?: boolean | string): LocalizableString;
|
12674
|
-
getLocalizableString(name: string): LocalizableString;
|
12675
|
-
getLocalizableStringText(name: string, defaultStr?: string): string;
|
12676
|
-
setLocalizableStringText(name: string, value: string): void;
|
12677
|
-
addUsedLocales(locales: Array<string>): void;
|
12678
|
-
searchText(text: string, founded: Array<IFindElement>): void;
|
12679
|
-
private getSearchableLocalizedStrings;
|
12680
|
-
protected getSearchableLocKeys(keys: Array<string>): void;
|
12681
|
-
protected getSearchableItemValueKeys(keys: Array<string>): void;
|
12682
|
-
protected AddLocStringToUsedLocales(locStr: LocalizableString, locales: Array<string>): void;
|
12683
|
-
protected createItemValues(name: string): Array<any>;
|
12684
|
-
private notifyArrayChanged;
|
12685
|
-
protected createNewArrayCore(name: string): Array<any>;
|
12686
|
-
protected ensureArray(name: string, onPush?: any, onRemove?: any): any[];
|
12687
|
-
protected createNewArray(name: string, onPush?: any, onRemove?: any): Array<any>;
|
12688
|
-
protected getItemValueType(): string;
|
12689
|
-
protected setArray(name: string, src: any[], dest: any[], isItemValues: boolean, onPush: any): void;
|
12690
|
-
protected isTwoValueEquals(x: any, y: any, caseInSensitive?: boolean, trimString?: boolean): boolean;
|
12691
|
-
private static copyObject;
|
12692
|
-
protected copyCssClasses(dest: any, source: any): void;
|
12693
|
-
private getValueInLowCase;
|
12694
|
-
getElementsInDesign(includeHidden?: boolean): Array<IElement>;
|
12695
|
-
}
|
12696
|
-
export class ArrayChanges {
|
12697
|
-
index: number;
|
12698
|
-
deleteCount: number;
|
12699
|
-
itemsToAdd: any[];
|
12700
|
-
deletedItems: any[];
|
12701
|
-
constructor(index: number, deleteCount: number, itemsToAdd: any[], deletedItems: any[]);
|
12702
|
-
}
|
12703
|
-
export class Event<CallbackFunction extends Function, Sender, Options> {
|
12704
|
-
onCallbacksChanged: () => void;
|
12705
|
-
protected callbacks: Array<CallbackFunction>;
|
12706
|
-
get isEmpty(): boolean;
|
12707
|
-
get length(): number;
|
12708
|
-
fireByCreatingOptions(sender: any, createOptions: () => Options): void;
|
12709
|
-
fire(sender: Sender, options: Options): void;
|
12710
|
-
clear(): void;
|
12711
|
-
add(func: CallbackFunction): void;
|
12712
|
-
remove(func: CallbackFunction): void;
|
12713
|
-
hasFunc(func: CallbackFunction): boolean;
|
12714
|
-
private fireCallbackChanged;
|
12715
|
-
}
|
12716
|
-
export class EventBase<Sender, Options = any> extends Event<(sender: Sender, options: Options) => any, Sender, Options> {
|
12717
|
-
}
|
12718
|
-
}
|
12719
|
-
declare module "validator" {
|
12720
|
-
import { Base } from "base";
|
12721
|
-
import { ISurveyErrorOwner, ISurvey } from "base-interfaces";
|
12722
|
-
import { SurveyError } from "survey-error";
|
12723
|
-
import { LocalizableString } from "localizablestring";
|
12724
|
-
export class ValidatorResult {
|
12725
|
-
value: any;
|
12726
|
-
error: SurveyError;
|
12727
|
-
constructor(value: any, error?: SurveyError);
|
12728
|
-
}
|
12729
|
-
/**
|
12730
|
-
* Base SurveyJS validator class.
|
12731
|
-
*/
|
12732
|
-
export class SurveyValidator extends Base {
|
12733
|
-
errorOwner: ISurveyErrorOwner;
|
12734
|
-
onAsyncCompleted: (result: ValidatorResult) => void;
|
12735
|
-
constructor();
|
12736
|
-
getSurvey(live?: boolean): ISurvey;
|
12737
|
-
get text(): string;
|
12738
|
-
set text(value: string);
|
12739
|
-
get isValidateAllValues(): boolean;
|
12740
|
-
get locText(): LocalizableString;
|
12741
|
-
protected getErrorText(name: string): string;
|
12742
|
-
protected getDefaultErrorText(name: string): string;
|
12743
|
-
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
|
12744
|
-
get isRunning(): boolean;
|
12745
|
-
get isAsync(): boolean;
|
12746
|
-
getLocale(): string;
|
12747
|
-
getMarkdownHtml(text: string, name: string): string;
|
12748
|
-
getRenderer(name: string): string;
|
12749
|
-
getRendererContext(locStr: LocalizableString): any;
|
12750
|
-
getProcessedText(text: string): string;
|
12751
|
-
protected createCustomError(name: string): SurveyError;
|
12752
|
-
toString(): string;
|
12753
|
-
}
|
12754
|
-
export interface IValidatorOwner {
|
12755
|
-
getValidators(): Array<SurveyValidator>;
|
12756
|
-
validatedValue: any;
|
12757
|
-
getValidatorTitle(): string;
|
12758
|
-
getDataFilteredValues(): any;
|
12759
|
-
getDataFilteredProperties(): any;
|
12760
|
-
}
|
12761
|
-
export class ValidatorRunner {
|
12762
|
-
private asyncValidators;
|
12763
|
-
onAsyncCompleted: (errors: Array<SurveyError>) => void;
|
12764
|
-
run(owner: IValidatorOwner): Array<SurveyError>;
|
12765
|
-
private prepareAsyncValidators;
|
12766
|
-
}
|
12767
|
-
/**
|
12768
|
-
* Validate numeric values.
|
12769
|
-
*/
|
12770
|
-
export class NumericValidator extends SurveyValidator {
|
12771
|
-
constructor(minValue?: number, maxValue?: number);
|
12772
|
-
getType(): string;
|
12773
|
-
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
|
12774
|
-
protected getDefaultErrorText(name: string): string;
|
12767
|
+
* An object with properties that configure question numbering.
|
12768
|
+
*
|
12769
|
+
* Nested properties:
|
12770
|
+
*
|
12771
|
+
* - `includeQuestionsWithHiddenNumber`: `Boolean`\
|
12772
|
+
* Specifies whether to number questions whose [`hideNumber`](https://surveyjs.io/form-library/documentation/api-reference/question#hideNumber) property is enabled. Default value: `false`.
|
12773
|
+
*
|
12774
|
+
* - `includeQuestionsWithHiddenTitle`: `Boolean`\
|
12775
|
+
* Specifies whether to number questions whose [`titleLocation`](https://surveyjs.io/form-library/documentation/api-reference/question#titleLocation) property is set to `"hidden"`. Default value: `false`.
|
12776
|
+
*/
|
12777
|
+
numbering: {
|
12778
|
+
includeQuestionsWithHiddenNumber: boolean;
|
12779
|
+
includeQuestionsWithHiddenTitle: boolean;
|
12780
|
+
};
|
12775
12781
|
/**
|
12776
|
-
*
|
12782
|
+
* This property is obsolete. Use the [`settings.numbering.includeQuestionsWithHiddenTitle`](https://surveyjs.io/form-library/documentation/api-reference/settings#numbering) property instead.
|
12777
12783
|
*/
|
12778
|
-
|
12779
|
-
set minValue(val: number);
|
12784
|
+
setQuestionVisibleIndexForHiddenTitle: boolean;
|
12780
12785
|
/**
|
12781
|
-
*
|
12786
|
+
* This property is obsolete. Use the [`settings.numbering.includeQuestionsWithHiddenNumber`](https://surveyjs.io/form-library/documentation/api-reference/settings#numbering) property instead.
|
12782
12787
|
*/
|
12783
|
-
|
12784
|
-
set maxValue(val: number);
|
12785
|
-
}
|
12786
|
-
/**
|
12787
|
-
* Validate text values.
|
12788
|
-
*/
|
12789
|
-
export class TextValidator extends SurveyValidator {
|
12790
|
-
constructor();
|
12791
|
-
getType(): string;
|
12792
|
-
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
|
12793
|
-
protected getDefaultErrorText(name: string): string;
|
12788
|
+
setQuestionVisibleIndexForHiddenNumber: boolean;
|
12794
12789
|
/**
|
12795
|
-
*
|
12790
|
+
* Specifies an action to perform when users press the Enter key within a survey.
|
12791
|
+
*
|
12792
|
+
* Possible values:
|
12793
|
+
*
|
12794
|
+
* - `"moveToNextEditor"` - Moves focus to the next editor.
|
12795
|
+
* - `"loseFocus"` - Removes focus from the current editor.
|
12796
|
+
* - `"default"` - Behaves as a standard `<input>` element.
|
12796
12797
|
*/
|
12797
|
-
|
12798
|
-
set minLength(val: number);
|
12798
|
+
enterKeyAction: "default" | "moveToNextEditor" | "loseFocus";
|
12799
12799
|
/**
|
12800
|
-
*
|
12800
|
+
* An object that configures string comparison.
|
12801
|
+
*
|
12802
|
+
* Nested properties:
|
12803
|
+
*
|
12804
|
+
* - `trimStrings`: `Boolean`\
|
12805
|
+
* Specifies whether to remove whitespace from both ends of a string before the comparison. Default value: `true`.
|
12806
|
+
*
|
12807
|
+
* - `caseSensitive`: `Boolean`\
|
12808
|
+
* Specifies whether to differentiate between capital and lower-case letters. Default value: `false`.
|
12809
|
+
*
|
12810
|
+
* - `normalizedTextCallback`: `(str: string, reason: string) => string`
|
12811
|
+
* Use the following function { str.normalize("NFD").replace(/[\u0300-\u036f]/g, ""); }
|
12812
|
+
* If you want to 'Brouillé' to be equal to 'Brouille'.
|
12813
|
+
* Use the following function { return reason === "filter" ? str.normalize("NFD").replace(/[\u0300-\u036f]/g, ""): ""; }
|
12814
|
+
* If you want to use this functionality during filtering only, for example in list.
|
12801
12815
|
*/
|
12802
|
-
|
12803
|
-
|
12816
|
+
comparator: {
|
12817
|
+
trimStrings: boolean;
|
12818
|
+
caseSensitive: boolean;
|
12819
|
+
normalizeTextCallback: (str: string, reason: string) => string;
|
12820
|
+
};
|
12821
|
+
expressionDisableConversionChar: string;
|
12822
|
+
commentPrefix: string;
|
12804
12823
|
/**
|
12805
|
-
*
|
12824
|
+
* A suffix added to the name of the property that stores comments.
|
12825
|
+
*
|
12826
|
+
* Default value: "-Comment"
|
12827
|
+
*
|
12828
|
+
* You can specify this setting for an individual survey: [`commentSuffix`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#commentSuffix).
|
12806
12829
|
*/
|
12807
|
-
|
12808
|
-
set allowDigits(val: boolean);
|
12809
|
-
}
|
12810
|
-
/**
|
12811
|
-
* Validates the number of answers.
|
12812
|
-
*/
|
12813
|
-
export class AnswerCountValidator extends SurveyValidator {
|
12814
|
-
constructor(minCount?: number, maxCount?: number);
|
12815
|
-
getType(): string;
|
12816
|
-
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
|
12817
|
-
protected getDefaultErrorText(name: string): string;
|
12830
|
+
commentSuffix: string;
|
12818
12831
|
/**
|
12819
|
-
*
|
12832
|
+
* A separator used in a shorthand notation that specifies a value and display text for an [`ItemValue`](https://surveyjs.io/form-library/documentation/api-reference/itemvalue) object: `"value|text"`.
|
12833
|
+
*
|
12834
|
+
* Default value: `"|"`
|
12820
12835
|
*/
|
12821
|
-
|
12822
|
-
set minCount(val: number);
|
12836
|
+
itemValueSeparator: string;
|
12823
12837
|
/**
|
12824
|
-
*
|
12838
|
+
* A maximum number of rate values in a [Rating](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model) question.
|
12839
|
+
*
|
12840
|
+
* Default value: 20
|
12825
12841
|
*/
|
12826
|
-
|
12827
|
-
set maxCount(val: number);
|
12828
|
-
}
|
12829
|
-
/**
|
12830
|
-
* Use it to validate the text by regular expressions.
|
12831
|
-
*
|
12832
|
-
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
12833
|
-
*/
|
12834
|
-
export class RegexValidator extends SurveyValidator {
|
12835
|
-
constructor(regex?: string);
|
12836
|
-
getType(): string;
|
12837
|
-
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
|
12838
|
-
private hasError;
|
12842
|
+
ratingMaximumRateValueCount: number;
|
12839
12843
|
/**
|
12840
|
-
*
|
12844
|
+
* Specifies whether to close the drop-down menu of a [TagBox](https://surveyjs.io/form-library/examples/how-to-create-multiselect-tag-box/) question after a user selects a value.
|
12845
|
+
*
|
12846
|
+
* This setting applies to all TagBox questions on a page. You can use the [closeOnSelect](https://surveyjs.io/form-library/documentation/api-reference/dropdown-tag-box-model#closeOnSelect) property to specify the same setting for an individual TagBox question.
|
12841
12847
|
*/
|
12842
|
-
|
12843
|
-
set regex(val: string);
|
12844
|
-
}
|
12845
|
-
/**
|
12846
|
-
* Validate e-mail address in the text input
|
12847
|
-
*/
|
12848
|
-
export class EmailValidator extends SurveyValidator {
|
12849
|
-
private re;
|
12850
|
-
constructor();
|
12851
|
-
getType(): string;
|
12852
|
-
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
|
12853
|
-
protected getDefaultErrorText(name: string): string;
|
12854
|
-
}
|
12855
|
-
/**
|
12856
|
-
* Show error if expression returns false
|
12857
|
-
*/
|
12858
|
-
export class ExpressionValidator extends SurveyValidator {
|
12859
|
-
private conditionRunner;
|
12860
|
-
private isRunningValue;
|
12861
|
-
constructor(expression?: string);
|
12862
|
-
getType(): string;
|
12863
|
-
get isValidateAllValues(): boolean;
|
12864
|
-
get isAsync(): boolean;
|
12865
|
-
get isRunning(): boolean;
|
12866
|
-
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
|
12867
|
-
protected generateError(res: boolean, value: any, name: string): ValidatorResult;
|
12868
|
-
protected getDefaultErrorText(name: string): string;
|
12869
|
-
protected ensureConditionRunner(): boolean;
|
12848
|
+
tagboxCloseOnSelect: boolean;
|
12870
12849
|
/**
|
12871
|
-
*
|
12850
|
+
* A property that allows you to display a custom confirm dialog instead of the standard browser dialog. Set this property to a function that renders your custom dialog window.
|
12851
|
+
* @param message A message to be displayed in the confirm dialog window.
|
12872
12852
|
*/
|
12873
|
-
|
12874
|
-
|
12875
|
-
|
12853
|
+
confirmActionFunc: (message: string) => boolean;
|
12854
|
+
/**
|
12855
|
+
* A minimum width value for all survey elements.
|
12856
|
+
*
|
12857
|
+
* Default value: `"300px"`
|
12858
|
+
*
|
12859
|
+
* You can override this setting for individual elements: [`minWidth`](https://surveyjs.io/form-library/documentation/api-reference/surveyelement#minWidth).
|
12860
|
+
*/
|
12861
|
+
minWidth: string;
|
12862
|
+
/**
|
12863
|
+
* A maximum width value for all survey elements.
|
12864
|
+
*
|
12865
|
+
* Default value: `"100%"`
|
12866
|
+
*
|
12867
|
+
* You can override this setting for individual elements: [`maxWidth`](https://surveyjs.io/form-library/documentation/api-reference/surveyelement#maxWidth).
|
12868
|
+
*/
|
12869
|
+
maxWidth: string;
|
12870
|
+
/**
|
12871
|
+
* Specifies how many times surveys can re-evaluate expressions when a question value changes. This limit helps avoid recursions in expressions.
|
12872
|
+
*
|
12873
|
+
* Default value: 10
|
12874
|
+
*/
|
12875
|
+
maxConditionRunCountOnValueChanged: number;
|
12876
|
+
/**
|
12877
|
+
* An object that configures notifications.
|
12878
|
+
*
|
12879
|
+
* Nested properties:
|
12880
|
+
*
|
12881
|
+
* - `lifetime`: `Number`\
|
12882
|
+
* Specifies a time period during which a notification is displayed; measured in milliseconds.
|
12883
|
+
*/
|
12884
|
+
notifications: {
|
12885
|
+
lifetime: number;
|
12886
|
+
};
|
12887
|
+
/**
|
12888
|
+
* Specifies the direction in which to lay out Checkbox and Radiogroup items. This setting affects the resulting UI when items are arranged in [more than one column](https://surveyjs.io/form-library/documentation/api-reference/checkbox-question-model#colCount).
|
12889
|
+
*
|
12890
|
+
* Possible values:
|
12891
|
+
*
|
12892
|
+
* - `"row"` (default) - Items fill the current row, then move on to the next row.
|
12893
|
+
* - `"column"` - Items fill the current column, then move on to the next column.
|
12894
|
+
*/
|
12895
|
+
showItemsInOrder: string;
|
12896
|
+
/**
|
12897
|
+
* A value to save in survey results when respondents select the None choice item.
|
12898
|
+
*
|
12899
|
+
* Default value: `"none"`
|
12900
|
+
*/
|
12901
|
+
noneItemValue: string;
|
12902
|
+
/**
|
12903
|
+
* A list of supported validators by question type.
|
12904
|
+
*/
|
12905
|
+
supportedValidators: {
|
12906
|
+
question: string[];
|
12907
|
+
comment: string[];
|
12908
|
+
text: string[];
|
12909
|
+
checkbox: string[];
|
12910
|
+
imagepicker: string[];
|
12911
|
+
};
|
12912
|
+
/**
|
12913
|
+
* Specifies a minimum date that users can enter into a [Text](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model) question with [`inputType`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#inputType) set to `"date"` or `"datetime-local"`. Set this property to a string with the folllowing format: `"yyyy-mm-dd"`.
|
12914
|
+
*/
|
12915
|
+
minDate: string;
|
12916
|
+
/**
|
12917
|
+
* Specifies a maximum date that users can enter into a [Text](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model) question with [`inputType`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#inputType) set to `"date"` or `"datetime-local"`. Set this property to a string with the folllowing format: `"yyyy-mm-dd"`.
|
12918
|
+
*/
|
12919
|
+
maxDate: string;
|
12920
|
+
showModal: (componentName: string, data: any, onApply: () => boolean, onCancel?: () => void, cssClass?: string, title?: string, displayMode?: "popup" | "overlay") => any;
|
12921
|
+
showDialog: (options: IDialogOptions, rootElement?: HTMLElement) => any;
|
12922
|
+
supportCreatorV2: boolean;
|
12923
|
+
showDefaultItemsInCreatorV2: boolean;
|
12924
|
+
/**
|
12925
|
+
* An object that specifies icon replacements. Object keys are built-in icon names. To use a custom icon, assign its name to the key of the icon you want to replace:
|
12926
|
+
*
|
12927
|
+
* ```js
|
12928
|
+
* import { settings } from "survey-core";
|
12929
|
+
*
|
12930
|
+
* settings.customIcons["icon-redo"] = "custom-redo-icon";
|
12931
|
+
* ```
|
12932
|
+
*
|
12933
|
+
* For more information about icons in SurveyJS, refer to the following help topic: [UI Icons](https://surveyjs.io/form-library/documentation/icons).
|
12934
|
+
*/
|
12935
|
+
customIcons: {};
|
12936
|
+
/**
|
12937
|
+
* Specifies which part of a choice item responds to a drag gesture in Ranking questions.
|
12938
|
+
*
|
12939
|
+
* Possible values:
|
12940
|
+
*
|
12941
|
+
* - `"entireItem"` (default) - Users can use the entire choice item as a drag handle.
|
12942
|
+
* - `"icon"` - Users can only use the choice item icon as a drag handle.
|
12943
|
+
*/
|
12944
|
+
rankingDragHandleArea: string;
|
12945
|
+
/**
|
12946
|
+
* Specifies environment in which SurveyJS will exist
|
12947
|
+
*/
|
12948
|
+
environment: ISurveyEnvironment;
|
12949
|
+
showMaxLengthIndicator: boolean;
|
12950
|
+
titleTags: {
|
12951
|
+
survey: string;
|
12952
|
+
page: string;
|
12953
|
+
panel: string;
|
12954
|
+
question: string;
|
12955
|
+
};
|
12956
|
+
questions: {
|
12957
|
+
inputTypes: string[];
|
12958
|
+
dataList: string[];
|
12959
|
+
};
|
12960
|
+
};
|
12876
12961
|
}
|
12877
12962
|
declare module "question_matrixdropdown" {
|
12878
12963
|
import { QuestionMatrixDropdownModelBase, MatrixDropdownRowModelBase, IMatrixDropdownData } from "question_matrixdropdownbase";
|
@@ -13691,7 +13776,7 @@ declare module "question_imagepicker" {
|
|
13691
13776
|
get imageHeight(): number;
|
13692
13777
|
set imageHeight(val: number);
|
13693
13778
|
private responsiveImageHeight;
|
13694
|
-
get renderedImageHeight():
|
13779
|
+
get renderedImageHeight(): number;
|
13695
13780
|
/**
|
13696
13781
|
* Specifies the width of containers for images or videos. Accepts positive numbers and CSS values.
|
13697
13782
|
*
|
@@ -13704,7 +13789,7 @@ declare module "question_imagepicker" {
|
|
13704
13789
|
get imageWidth(): number;
|
13705
13790
|
set imageWidth(val: number);
|
13706
13791
|
private responsiveImageWidth;
|
13707
|
-
get renderedImageWidth():
|
13792
|
+
get renderedImageWidth(): number;
|
13708
13793
|
/**
|
13709
13794
|
* Specifies how to resize images or videos to fit them into their containers.
|
13710
13795
|
*
|
@@ -13746,7 +13831,9 @@ declare module "question_imagepicker" {
|
|
13746
13831
|
private responsiveColCount;
|
13747
13832
|
protected getCurrentColCount(): number;
|
13748
13833
|
protected processResponsiveness(_: number, availableWidth: number): boolean;
|
13834
|
+
triggerResponsiveness(hard?: boolean): void;
|
13749
13835
|
private gapBetweenItems;
|
13836
|
+
private reCalcGapBetweenItemsCallback;
|
13750
13837
|
afterRender(el: HTMLElement): void;
|
13751
13838
|
}
|
13752
13839
|
}
|
@@ -14417,8 +14504,8 @@ declare module "question_image" {
|
|
14417
14504
|
*/
|
14418
14505
|
get imageHeight(): string;
|
14419
14506
|
set imageHeight(val: string);
|
14420
|
-
|
14421
|
-
get renderedHeight():
|
14507
|
+
get renderedStyleHeight(): string;
|
14508
|
+
get renderedHeight(): number;
|
14422
14509
|
/**
|
14423
14510
|
* Specifies the width of a container for the image or video. Accepts positive numbers and CSS values.
|
14424
14511
|
*
|
@@ -14430,7 +14517,8 @@ declare module "question_image" {
|
|
14430
14517
|
*/
|
14431
14518
|
get imageWidth(): string;
|
14432
14519
|
set imageWidth(val: string);
|
14433
|
-
get
|
14520
|
+
get renderedStyleWidth(): string;
|
14521
|
+
get renderedWidth(): number;
|
14434
14522
|
/**
|
14435
14523
|
* Specifies how to resize the image or video to fit it into its container.
|
14436
14524
|
*
|
@@ -14537,9 +14625,11 @@ declare module "surveyToc" {
|
|
14537
14625
|
import { Action } from "actions/action";
|
14538
14626
|
import { ListModel } from "list";
|
14539
14627
|
import { PageModel } from "page";
|
14628
|
+
import { PanelModelBase } from "panel";
|
14540
14629
|
import { PopupModel } from "popup";
|
14541
14630
|
import { SurveyModel } from "survey";
|
14542
14631
|
export function tryNavigateToPage(survey: SurveyModel, page: PageModel): boolean;
|
14632
|
+
export function tryFocusPage(survey: SurveyModel, panel: PanelModelBase): boolean;
|
14543
14633
|
export function createTOCListModel(survey: SurveyModel, onAction?: () => void): ListModel<Action>;
|
14544
14634
|
export function getTocRootCss(survey: SurveyModel, isMobile?: boolean): string;
|
14545
14635
|
export class TOCModel {
|
@@ -14639,12 +14729,25 @@ declare module "popup-survey" {
|
|
14639
14729
|
*/
|
14640
14730
|
collapse(): void;
|
14641
14731
|
changeExpandCollapse(): void;
|
14732
|
+
/**
|
14733
|
+
* Specifies whether to display a button that closes the pop-up window.
|
14734
|
+
*
|
14735
|
+
* Default value: `false`
|
14736
|
+
*
|
14737
|
+
* If you allow users to close the pop-up window, make sure to implement a UI element that opens it. This element should call the [`show()`](https://surveyjs.io/form-library/documentation/api-reference/pop-up-survey-model#show) method.
|
14738
|
+
* @see expand
|
14739
|
+
* @see collapse
|
14740
|
+
* @see hide
|
14741
|
+
*/
|
14742
|
+
get allowClose(): boolean;
|
14743
|
+
set allowClose(val: boolean);
|
14642
14744
|
get css(): any;
|
14643
14745
|
get cssButton(): string;
|
14644
14746
|
get cssRoot(): string;
|
14645
14747
|
get cssBody(): string;
|
14646
14748
|
get cssHeaderRoot(): string;
|
14647
14749
|
get cssHeaderTitle(): string;
|
14750
|
+
get cssHeaderButton(): string;
|
14648
14751
|
get renderedWidth(): string;
|
14649
14752
|
width: string;
|
14650
14753
|
private updateCss;
|
@@ -14995,6 +15098,7 @@ declare module "question_custom" {
|
|
14995
15098
|
private getValueForContentPanel;
|
14996
15099
|
private setNewValueIntoQuestion;
|
14997
15100
|
addConditionObjectsByContext(objects: Array<IConditionObject>, context: any): void;
|
15101
|
+
protected collectNestedQuestionsCore(questions: Question[], visibleOnly: boolean): void;
|
14998
15102
|
protected convertDataValue(name: string, newValue: any): any;
|
14999
15103
|
protected setQuestionValue(newValue: any, updateIsAnswered?: boolean): void;
|
15000
15104
|
private setValuesIntoQuestions;
|
@@ -15118,7 +15222,7 @@ declare module "popup-modal-view-model" {
|
|
15118
15222
|
declare module "popup-utils" {
|
15119
15223
|
import { IDialogOptions, PopupModel } from "popup";
|
15120
15224
|
import { PopupBaseViewModel } from "popup-view-model";
|
15121
|
-
export function createPopupModalViewModel(options: IDialogOptions,
|
15225
|
+
export function createPopupModalViewModel(options: IDialogOptions, rootElement?: HTMLElement): PopupBaseViewModel;
|
15122
15226
|
export function createPopupViewModel(model: PopupModel, targetElement?: HTMLElement): PopupBaseViewModel;
|
15123
15227
|
}
|
15124
15228
|
declare module "question_buttongroup" {
|
@@ -21461,7 +21565,7 @@ declare module "react/components/popup/popup" {
|
|
21461
21565
|
protected renderHeaderPopup(popupModel: PopupBaseViewModel): JSX.Element | null;
|
21462
21566
|
}
|
21463
21567
|
export function showModal(componentName: string, data: any, onApply: () => boolean, onCancel?: () => void, cssClass?: string, title?: string, displayMode?: "popup" | "overlay"): PopupBaseViewModel;
|
21464
|
-
export function showDialog(dialogOptions: IDialogOptions,
|
21568
|
+
export function showDialog(dialogOptions: IDialogOptions, rootElement?: HTMLElement): PopupBaseViewModel;
|
21465
21569
|
}
|
21466
21570
|
declare module "react/components/action-bar/action-bar-item-dropdown" {
|
21467
21571
|
import { SurveyActionBarItem } from "react/components/action-bar/action-bar-item";
|
@@ -21759,6 +21863,7 @@ declare module "react/components/survey-header/survey-header" {
|
|
21759
21863
|
constructor(props: ISurveyHeaderProps);
|
21760
21864
|
private get survey();
|
21761
21865
|
private get css();
|
21866
|
+
private rootRef;
|
21762
21867
|
componentDidMount(): void;
|
21763
21868
|
componentWillUnmount(): void;
|
21764
21869
|
private renderTitle;
|