survey-react 1.9.97 → 1.9.99
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 +86 -55
- 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 +1592 -1459
- package/survey.react.js +700 -292
- 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: {
|
@@ -2886,7 +2279,7 @@ declare module "trigger" {
|
|
2886
2279
|
canBeCompleted(trigger: Trigger, isCompleted: boolean): void;
|
2887
2280
|
triggerExecuted(trigger: Trigger): void;
|
2888
2281
|
setTriggerValue(name: string, value: any, isVariable: boolean): any;
|
2889
|
-
copyTriggerValue(name: string, fromName: string):
|
2282
|
+
copyTriggerValue(name: string, fromName: string, copyDisplayValue: boolean): void;
|
2890
2283
|
focusQuestion(name: string): boolean;
|
2891
2284
|
}
|
2892
2285
|
/**
|
@@ -2976,6 +2369,8 @@ declare module "trigger" {
|
|
2976
2369
|
set setToName(val: string);
|
2977
2370
|
get fromName(): string;
|
2978
2371
|
set fromName(val: string);
|
2372
|
+
get copyDisplayValue(): boolean;
|
2373
|
+
set copyDisplayValue(val: boolean);
|
2979
2374
|
getType(): string;
|
2980
2375
|
protected onSuccess(values: HashTable<any>, properties: HashTable<any>): void;
|
2981
2376
|
}
|
@@ -4355,6 +3750,7 @@ declare module "question_baseselect" {
|
|
4355
3750
|
protected getDisplayValueEmpty(): string;
|
4356
3751
|
protected getChoicesDisplayValue(items: ItemValue[], val: any): any;
|
4357
3752
|
protected getDisplayArrayValue(keysAsText: boolean, value: any, onGetValueCallback?: (index: number) => any): string;
|
3753
|
+
private getItemDisplayValue;
|
4358
3754
|
private getFilteredChoices;
|
4359
3755
|
protected get activeChoices(): Array<ItemValue>;
|
4360
3756
|
private getQuestionWithChoices;
|
@@ -4449,31 +3845,189 @@ declare module "question_baseselect" {
|
|
4449
3845
|
protected onValueChanged(): void;
|
4450
3846
|
protected getDefaultItemComponent(): string;
|
4451
3847
|
/**
|
4452
|
-
* 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.
|
3962
|
+
*/
|
3963
|
+
get allowDigits(): boolean;
|
3964
|
+
set allowDigits(val: boolean);
|
3965
|
+
}
|
3966
|
+
/**
|
3967
|
+
* Validates the number of answers.
|
3968
|
+
*/
|
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;
|
3974
|
+
/**
|
3975
|
+
* The minCount property.
|
3976
|
+
*/
|
3977
|
+
get minCount(): number;
|
3978
|
+
set minCount(val: number);
|
3979
|
+
/**
|
3980
|
+
* The maxCount property.
|
4453
3981
|
*/
|
4454
|
-
get
|
4455
|
-
set
|
4456
|
-
protected updateCssClasses(res: any, css: any): void;
|
4457
|
-
protected calcCssClasses(css: any): any;
|
3982
|
+
get maxCount(): number;
|
3983
|
+
set maxCount(val: number);
|
4458
3984
|
}
|
4459
3985
|
/**
|
4460
|
-
*
|
3986
|
+
* Use it to validate the text by regular expressions.
|
3987
|
+
*
|
3988
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
4461
3989
|
*/
|
4462
|
-
export class
|
4463
|
-
|
4464
|
-
|
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;
|
4465
3995
|
/**
|
4466
|
-
*
|
4467
|
-
*
|
4468
|
-
* Set this property to 0 if you want to display all items in one line. The default value depends on the available width.
|
4469
|
-
* @see separateSpecialChoices
|
3996
|
+
* The regex property.
|
4470
3997
|
*/
|
4471
|
-
get
|
4472
|
-
set
|
4473
|
-
|
4474
|
-
|
4475
|
-
|
4476
|
-
|
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);
|
4477
4031
|
}
|
4478
4032
|
}
|
4479
4033
|
declare module "question_expression" {
|
@@ -4516,6 +4070,7 @@ declare module "question_expression" {
|
|
4516
4070
|
* Default value: -1
|
4517
4071
|
* @see displayStyle
|
4518
4072
|
* @see minimumFractionDigits
|
4073
|
+
* @see precision
|
4519
4074
|
*/
|
4520
4075
|
get maximumFractionDigits(): number;
|
4521
4076
|
set maximumFractionDigits(val: number);
|
@@ -4573,6 +4128,15 @@ declare module "question_expression" {
|
|
4573
4128
|
*/
|
4574
4129
|
get useGrouping(): boolean;
|
4575
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;
|
4576
4140
|
protected getValueAsStr(val: any): string;
|
4577
4141
|
}
|
4578
4142
|
export function getCurrecyCodes(): Array<string>;
|
@@ -4729,6 +4293,7 @@ declare module "dragdrop/dom-adapter" {
|
|
4729
4293
|
export interface IDragDropDOMAdapter {
|
4730
4294
|
startDrag(event: PointerEvent, draggedElement: any, parentElement: any, draggedElementNode: HTMLElement, preventSaveTargetNode: boolean): void;
|
4731
4295
|
draggedElementShortcut: HTMLElement;
|
4296
|
+
rootContainer: HTMLElement;
|
4732
4297
|
}
|
4733
4298
|
export class DragDropDOMAdapter implements IDragDropDOMAdapter {
|
4734
4299
|
private dd;
|
@@ -4742,6 +4307,7 @@ declare module "dragdrop/dom-adapter" {
|
|
4742
4307
|
private savedTargetNode;
|
4743
4308
|
private scrollIntervalId;
|
4744
4309
|
constructor(dd: IDragDropEngine, longTap?: boolean);
|
4310
|
+
private get rootElement();
|
4745
4311
|
private stopLongTapIfMoveEnough;
|
4746
4312
|
private get isMicroMovement();
|
4747
4313
|
private stopLongTap;
|
@@ -4758,6 +4324,7 @@ declare module "dragdrop/dom-adapter" {
|
|
4758
4324
|
private drop;
|
4759
4325
|
private doStartDrag;
|
4760
4326
|
draggedElementShortcut: any;
|
4327
|
+
rootContainer: HTMLElement;
|
4761
4328
|
startDrag(event: PointerEvent, draggedElement: any, parentElement?: any, draggedElementNode?: HTMLElement, preventSaveTargetNode?: boolean): void;
|
4762
4329
|
}
|
4763
4330
|
}
|
@@ -5067,6 +4634,7 @@ declare module "question_matrixdynamic" {
|
|
5067
4634
|
protected setDefaultValue(): void;
|
5068
4635
|
moveRowByIndex(fromIndex: number, toIndex: number): void;
|
5069
4636
|
clearOnDrop(): void;
|
4637
|
+
initDataUI(): void;
|
5070
4638
|
/**
|
5071
4639
|
* The number of rows in the matrix.
|
5072
4640
|
* @see minRowCount
|
@@ -5815,6 +5383,7 @@ declare module "question_paneldynamic" {
|
|
5815
5383
|
private iscorrectValueWithPostPrefix;
|
5816
5384
|
getSharedQuestionFromArray(name: string, panelIndex: number): Question;
|
5817
5385
|
addConditionObjectsByContext(objects: Array<IConditionObject>, context: any): void;
|
5386
|
+
protected collectNestedQuestionsCore(questions: Question[], visibleOnly: boolean): void;
|
5818
5387
|
getConditionJson(operator?: string, path?: string): any;
|
5819
5388
|
protected onReadOnlyChanged(): void;
|
5820
5389
|
private updateNoEntriesTextDefaultLoc;
|
@@ -5931,7 +5500,7 @@ declare module "survey-events-api" {
|
|
5931
5500
|
}
|
5932
5501
|
export interface FileQuestionEventMixin {
|
5933
5502
|
/**
|
5934
|
-
* A File question instance for which the event is raised.
|
5503
|
+
* A File Upload question instance for which the event is raised.
|
5935
5504
|
*/
|
5936
5505
|
question: QuestionFileModel;
|
5937
5506
|
}
|
@@ -6089,6 +5658,10 @@ declare module "survey-events-api" {
|
|
6089
5658
|
* Returns `true` if the respondent is going forward along the survey.
|
6090
5659
|
*/
|
6091
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;
|
6092
5665
|
/**
|
6093
5666
|
* The current page.
|
6094
5667
|
*/
|
@@ -6397,45 +5970,45 @@ declare module "survey-events-api" {
|
|
6397
5970
|
}
|
6398
5971
|
export interface LoadFilesEvent extends FileQuestionEventMixin {
|
6399
5972
|
/**
|
6400
|
-
*
|
5973
|
+
* A File Upload question's name.
|
6401
5974
|
*/
|
6402
5975
|
name: string;
|
6403
5976
|
}
|
6404
5977
|
export interface UploadFilesEvent extends LoadFilesEvent {
|
6405
5978
|
/**
|
6406
|
-
*
|
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.
|
6407
5980
|
*/
|
6408
5981
|
callback: (status: string, data?: any) => any;
|
6409
5982
|
/**
|
6410
|
-
*
|
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.
|
6411
5984
|
*/
|
6412
5985
|
files: Array<File>;
|
6413
5986
|
}
|
6414
5987
|
export interface DownloadFileEvent extends LoadFilesEvent {
|
6415
5988
|
/**
|
6416
|
-
*
|
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.
|
6417
5990
|
*/
|
6418
5991
|
callback: (status: string, data?: any) => any;
|
6419
5992
|
/**
|
6420
|
-
*
|
5993
|
+
* The File Upload question's [`value`](https://surveyjs.io/form-library/documentation/api-reference/file-model#value) that contains metadata about uploaded files.
|
6421
5994
|
*/
|
6422
5995
|
fileValue: any;
|
6423
5996
|
/**
|
6424
|
-
*
|
5997
|
+
* A file identifier (URL, file name, etc.) stored in survey results.
|
6425
5998
|
*/
|
6426
5999
|
content: any;
|
6427
6000
|
}
|
6428
6001
|
export interface ClearFilesEvent extends LoadFilesEvent {
|
6429
6002
|
/**
|
6430
|
-
*
|
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`).
|
6431
6004
|
*/
|
6432
6005
|
callback: (status: string, data?: any) => any;
|
6433
6006
|
/**
|
6434
|
-
* a
|
6007
|
+
* The name of a file to delete. When this parameter is `null`, all files should be deleted.
|
6435
6008
|
*/
|
6436
6009
|
fileName: string;
|
6437
6010
|
/**
|
6438
|
-
*
|
6011
|
+
* The File Upload question's [`value`](https://surveyjs.io/form-library/documentation/api-reference/file-model#value) that contains metadata about uploaded files.
|
6439
6012
|
*/
|
6440
6013
|
value: any;
|
6441
6014
|
}
|
@@ -7585,6 +7158,7 @@ declare module "question_multipletext" {
|
|
7585
7158
|
addItem(name: string, title?: string): MultipleTextItemModel;
|
7586
7159
|
getItemByName(name: string): MultipleTextItemModel;
|
7587
7160
|
addConditionObjectsByContext(objects: Array<IConditionObject>, context: any): void;
|
7161
|
+
protected collectNestedQuestionsCore(questions: Question[], visibleOnly: boolean): void;
|
7588
7162
|
getConditionJson(operator?: string, path?: string): any;
|
7589
7163
|
locStrsChanged(): void;
|
7590
7164
|
localeChanged(): void;
|
@@ -7647,7 +7221,7 @@ declare module "themes" {
|
|
7647
7221
|
backgroundImageFit?: ImageFit;
|
7648
7222
|
backgroundImageAttachment?: ImageAttachment;
|
7649
7223
|
backgroundOpacity?: number;
|
7650
|
-
|
7224
|
+
isPanelless?: boolean;
|
7651
7225
|
}
|
7652
7226
|
}
|
7653
7227
|
declare module "survey" {
|
@@ -7692,6 +7266,7 @@ declare module "survey" {
|
|
7692
7266
|
static platform: string;
|
7693
7267
|
get platformName(): string;
|
7694
7268
|
notifier: Notifier;
|
7269
|
+
rootElement: HTMLElement;
|
7695
7270
|
/**
|
7696
7271
|
* A suffix added to the name of the property that stores comments.
|
7697
7272
|
*
|
@@ -7713,6 +7288,7 @@ declare module "survey" {
|
|
7713
7288
|
private textPreProcessor;
|
7714
7289
|
private timerModelValue;
|
7715
7290
|
private navigationBarValue;
|
7291
|
+
onThemeApplied: EventBase<SurveyModel>;
|
7716
7292
|
/**
|
7717
7293
|
* An event that is raised after a [trigger](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#triggers) is executed.
|
7718
7294
|
*
|
@@ -8001,34 +7577,34 @@ declare module "survey" {
|
|
8001
7577
|
*/
|
8002
7578
|
onGetResult: EventBase<SurveyModel, GetResultEvent>;
|
8003
7579
|
/**
|
8004
|
-
* 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.
|
8005
7581
|
*
|
8006
7582
|
* For information on event handler parameters, refer to descriptions within the interface.
|
8007
7583
|
*
|
8008
7584
|
* [View Demo](https://surveyjs.io/form-library/examples/file-upload/ (linkStyle))
|
8009
7585
|
* @see uploadFiles
|
8010
|
-
* @see QuestionFileModel.storeDataAsText
|
8011
7586
|
* @see onDownloadFile
|
8012
7587
|
* @see onClearFiles
|
8013
7588
|
*/
|
8014
7589
|
onUploadFiles: EventBase<SurveyModel, UploadFilesEvent>;
|
8015
7590
|
/**
|
8016
|
-
* 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.
|
8017
7592
|
*
|
8018
7593
|
* For information on event handler parameters, refer to descriptions within the interface.
|
8019
7594
|
*
|
8020
|
-
* [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))
|
8021
7596
|
* @see downloadFile
|
8022
7597
|
* @see onClearFiles
|
8023
7598
|
* @see onUploadFiles
|
8024
7599
|
*/
|
8025
7600
|
onDownloadFile: EventBase<SurveyModel, DownloadFileEvent>;
|
8026
7601
|
/**
|
8027
|
-
*
|
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.
|
8028
7603
|
*
|
8029
7604
|
* For information on event handler parameters, refer to descriptions within the interface.
|
8030
7605
|
*
|
8031
7606
|
* [View Demo](https://surveyjs.io/form-library/examples/file-delayed-upload/ (linkStyle))
|
7607
|
+
* @see clearFiles
|
8032
7608
|
* @see onDownloadFile
|
8033
7609
|
* @see onUploadFiles
|
8034
7610
|
*/
|
@@ -8378,6 +7954,7 @@ declare module "survey" {
|
|
8378
7954
|
private getNavigationCss;
|
8379
7955
|
private lazyRenderingValue;
|
8380
7956
|
showBrandInfo: boolean;
|
7957
|
+
enterKeyAction: "moveToNextEditor" | "loseFocus" | "default";
|
8381
7958
|
/**
|
8382
7959
|
* By default all rows are rendered no matters if they are visible or not.
|
8383
7960
|
* Set it true, and survey markup rows will be rendered only if they are visible in viewport.
|
@@ -8440,7 +8017,7 @@ declare module "survey" {
|
|
8440
8017
|
/**
|
8441
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.
|
8442
8019
|
*
|
8443
|
-
* [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))
|
8444
8021
|
*/
|
8445
8022
|
get sendResultOnPageNext(): boolean;
|
8446
8023
|
set sendResultOnPageNext(val: boolean);
|
@@ -8470,16 +8047,21 @@ declare module "survey" {
|
|
8470
8047
|
get focusOnFirstError(): boolean;
|
8471
8048
|
set focusOnFirstError(val: boolean);
|
8472
8049
|
/**
|
8473
|
-
* Gets or sets the navigation buttons
|
8474
|
-
*
|
8475
|
-
*
|
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/).
|
8476
8058
|
* @see goNextPageAutomatic
|
8477
8059
|
* @see showPrevButton
|
8478
8060
|
*/
|
8479
8061
|
get showNavigationButtons(): string | any;
|
8480
8062
|
set showNavigationButtons(val: string | any);
|
8481
8063
|
/**
|
8482
|
-
*
|
8064
|
+
* Specifies whether to display the Previous button. Set this property to `false` if respondents should not move backward along the survey.
|
8483
8065
|
* @see showNavigationButtons
|
8484
8066
|
*/
|
8485
8067
|
get showPrevButton(): boolean;
|
@@ -8508,28 +8090,22 @@ declare module "survey" {
|
|
8508
8090
|
get tocLocation(): "left" | "right";
|
8509
8091
|
set tocLocation(val: "left" | "right");
|
8510
8092
|
/**
|
8511
|
-
*
|
8512
|
-
* @see title
|
8093
|
+
* Specifies whether to display the [survey title](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#title).
|
8513
8094
|
*
|
8514
|
-
* [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
|
8515
8097
|
*/
|
8516
8098
|
get showTitle(): boolean;
|
8517
8099
|
set showTitle(val: boolean);
|
8518
8100
|
/**
|
8519
|
-
*
|
8520
|
-
* @see PageModel.title
|
8521
|
-
*
|
8522
|
-
* [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).
|
8523
8102
|
*/
|
8524
8103
|
get showPageTitles(): boolean;
|
8525
8104
|
set showPageTitles(val: boolean);
|
8526
8105
|
/**
|
8527
|
-
*
|
8528
|
-
* @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).
|
8529
8107
|
* @see onComplete
|
8530
8108
|
* @see navigateToUrl
|
8531
|
-
*
|
8532
|
-
* [View Demo](https://surveyjs.io/form-library/examples/survey-options/ (linkStyle))
|
8533
8109
|
*/
|
8534
8110
|
get showCompletedPage(): boolean;
|
8535
8111
|
set showCompletedPage(val: boolean);
|
@@ -8738,7 +8314,8 @@ declare module "survey" {
|
|
8738
8314
|
getSurveyErrorCustomText(obj: PanelModel | Question | SurveyModel, text: string, error: SurveyError): string;
|
8739
8315
|
getQuestionDisplayValue(question: Question, displayValue: any): any;
|
8740
8316
|
/**
|
8741
|
-
* 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)
|
8742
8319
|
*/
|
8743
8320
|
get emptySurveyText(): string;
|
8744
8321
|
/**
|
@@ -8764,6 +8341,8 @@ declare module "survey" {
|
|
8764
8341
|
*/
|
8765
8342
|
get logoWidth(): any;
|
8766
8343
|
set logoWidth(value: any);
|
8344
|
+
get renderedLogoWidth(): number;
|
8345
|
+
get renderedStyleLogoWidth(): string;
|
8767
8346
|
/**
|
8768
8347
|
* A logo height in CSS-accepted values.
|
8769
8348
|
*
|
@@ -8777,6 +8356,8 @@ declare module "survey" {
|
|
8777
8356
|
*/
|
8778
8357
|
get logoHeight(): any;
|
8779
8358
|
set logoHeight(value: any);
|
8359
|
+
get renderedLogoHeight(): number;
|
8360
|
+
get renderedStyleLogoHeight(): string;
|
8780
8361
|
/**
|
8781
8362
|
* A logo position relative to the [survey title](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#title).
|
8782
8363
|
*
|
@@ -8919,31 +8500,30 @@ declare module "survey" {
|
|
8919
8500
|
*/
|
8920
8501
|
addNavigationItem(val: IAction): Action;
|
8921
8502
|
/**
|
8922
|
-
* Gets or sets the
|
8923
|
-
* 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.
|
8924
8504
|
* @see firstPageIsStarted
|
8925
|
-
* @see
|
8505
|
+
* @see [Localization & Globalization](https://surveyjs.io/form-library/documentation/survey-localization)
|
8926
8506
|
*/
|
8927
8507
|
get startSurveyText(): string;
|
8928
8508
|
set startSurveyText(newValue: string);
|
8929
8509
|
get locStartSurveyText(): LocalizableString;
|
8930
8510
|
/**
|
8931
|
-
* Gets or sets the
|
8932
|
-
* @see
|
8511
|
+
* Gets or sets a caption for the Previous button.
|
8512
|
+
* @see [Localization & Globalization](https://surveyjs.io/form-library/documentation/survey-localization)
|
8933
8513
|
*/
|
8934
8514
|
get pagePrevText(): string;
|
8935
8515
|
set pagePrevText(newValue: string);
|
8936
8516
|
get locPagePrevText(): LocalizableString;
|
8937
8517
|
/**
|
8938
|
-
* Gets or sets the
|
8939
|
-
* @see
|
8518
|
+
* Gets or sets a caption for the Next button.
|
8519
|
+
* @see [Localization & Globalization](https://surveyjs.io/form-library/documentation/survey-localization)
|
8940
8520
|
*/
|
8941
8521
|
get pageNextText(): string;
|
8942
8522
|
set pageNextText(newValue: string);
|
8943
8523
|
get locPageNextText(): LocalizableString;
|
8944
8524
|
/**
|
8945
|
-
*
|
8946
|
-
* @see
|
8525
|
+
* Gets or sets a caption for the Complete button.
|
8526
|
+
* @see [Localization & Globalization](https://surveyjs.io/form-library/documentation/survey-localization)
|
8947
8527
|
*/
|
8948
8528
|
get completeText(): string;
|
8949
8529
|
set completeText(newValue: string);
|
@@ -8968,13 +8548,9 @@ declare module "survey" {
|
|
8968
8548
|
get locEditText(): LocalizableString;
|
8969
8549
|
getElementTitleTagName(element: Base, tagName: string): string;
|
8970
8550
|
/**
|
8971
|
-
*
|
8972
|
-
* You can set it to numRequireTitle: 1. * What is your name?
|
8973
|
-
* You can set it to requireNumTitle: * 1. What is your name?
|
8974
|
-
* You can set it to numTitle (remove require symbol completely): 1. What is your name?
|
8975
|
-
* @see QuestionModel.title
|
8551
|
+
* Specifies a pattern for question titles.
|
8976
8552
|
*
|
8977
|
-
* [
|
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).
|
8978
8554
|
*/
|
8979
8555
|
get questionTitlePattern(): string;
|
8980
8556
|
set questionTitlePattern(val: string);
|
@@ -9217,7 +8793,7 @@ declare module "survey" {
|
|
9217
8793
|
*/
|
9218
8794
|
get activePage(): any;
|
9219
8795
|
/**
|
9220
|
-
*
|
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.
|
9221
8797
|
*/
|
9222
8798
|
get isShowStartingPage(): boolean;
|
9223
8799
|
/**
|
@@ -9366,23 +8942,19 @@ declare module "survey" {
|
|
9366
8942
|
get areEmptyElementsHidden(): boolean;
|
9367
8943
|
private get isAnyQuestionAnswered();
|
9368
8944
|
/**
|
9369
|
-
*
|
9370
|
-
* @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.
|
9371
8946
|
* @see setCookie
|
9372
8947
|
* @see deleteCookie
|
9373
|
-
* @see state
|
9374
8948
|
*/
|
9375
8949
|
get hasCookie(): boolean;
|
9376
8950
|
/**
|
9377
|
-
*
|
9378
|
-
* @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.
|
9379
8952
|
* @see hasCookie
|
9380
8953
|
* @see deleteCookie
|
9381
8954
|
*/
|
9382
8955
|
setCookie(): void;
|
9383
8956
|
/**
|
9384
|
-
* Deletes
|
9385
|
-
* @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.
|
9386
8958
|
* @see hasCookie
|
9387
8959
|
* @see setCookie
|
9388
8960
|
*/
|
@@ -9496,13 +9068,14 @@ declare module "survey" {
|
|
9496
9068
|
showPreview(): boolean;
|
9497
9069
|
private showPreviewCore;
|
9498
9070
|
/**
|
9499
|
-
* 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 `
|
9500
|
-
* @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.
|
9501
9073
|
* @see showPreview
|
9502
9074
|
* @see showPreviewBeforeComplete
|
9503
9075
|
* @see state
|
9504
9076
|
*/
|
9505
|
-
cancelPreview(
|
9077
|
+
cancelPreview(currentPage?: any): void;
|
9078
|
+
private gotoPageFromPreview;
|
9506
9079
|
cancelPreviewByPage(panel: IPanel): any;
|
9507
9080
|
protected doCurrentPageComplete(doComplete: boolean): boolean;
|
9508
9081
|
private doCurrentPageCompleteCore;
|
@@ -9548,6 +9121,7 @@ declare module "survey" {
|
|
9548
9121
|
protected onFirstPageIsStartedChanged(): void;
|
9549
9122
|
private runningPages;
|
9550
9123
|
private onShowingPreviewChanged;
|
9124
|
+
private changeCurrentPageFromPreview;
|
9551
9125
|
private origionalPages;
|
9552
9126
|
protected onQuestionsOnPageModeChanged(oldValue: string): void;
|
9553
9127
|
private restoreOrigionalPages;
|
@@ -9619,6 +9193,7 @@ declare module "survey" {
|
|
9619
9193
|
canBeCompleted(trigger: Trigger, isCompleted: boolean): void;
|
9620
9194
|
private completedByTriggers;
|
9621
9195
|
private get canBeCompletedByTrigger();
|
9196
|
+
private get completedTrigger();
|
9622
9197
|
/**
|
9623
9198
|
* Returns the HTML content for the complete page.
|
9624
9199
|
* @see completedHtml
|
@@ -9648,6 +9223,7 @@ declare module "survey" {
|
|
9648
9223
|
private resizeObserver;
|
9649
9224
|
afterRenderSurvey(htmlElement: any): void;
|
9650
9225
|
private processResponsiveness;
|
9226
|
+
triggerResponsiveness(hard: boolean): void;
|
9651
9227
|
destroyResizeObserver(): void;
|
9652
9228
|
updateQuestionCssClasses(question: Question, cssClasses: any): void;
|
9653
9229
|
updatePanelCssClasses(panel: PanelModel, cssClasses: any): void;
|
@@ -9708,17 +9284,62 @@ declare module "survey" {
|
|
9708
9284
|
scrollElementToTop(element: ISurveyElement, question: Question, page: PageModel, id: string): any;
|
9709
9285
|
/**
|
9710
9286
|
* Uploads a file to server.
|
9711
|
-
*
|
9712
|
-
*
|
9713
|
-
*
|
9714
|
-
*
|
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
|
9715
9312
|
*/
|
9716
|
-
uploadFiles(question: QuestionFileModel, name: string, files: File[],
|
9313
|
+
uploadFiles(question: QuestionFileModel, name: string, files: File[], callback: (status: string, data: any) => any): void;
|
9717
9314
|
/**
|
9718
|
-
* Downloads a file from server
|
9719
|
-
*
|
9720
|
-
*
|
9721
|
-
*
|
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
|
9722
9343
|
*/
|
9723
9344
|
downloadFile(question: QuestionFileModel, questionName: string, fileValue: any, callback: (status: string, data: any) => any): void;
|
9724
9345
|
clearFiles(question: QuestionFileModel, name: string, value: any, fileName: string, callback: (status: string, data: any) => any): void;
|
@@ -9786,30 +9407,32 @@ declare module "survey" {
|
|
9786
9407
|
*/
|
9787
9408
|
getQuestionsByNames(names: string[], caseInsensitive?: boolean): IQuestion[];
|
9788
9409
|
/**
|
9789
|
-
* Returns a page
|
9790
|
-
* @param element
|
9410
|
+
* Returns a page to which a specified survey element (question or panel) belongs.
|
9411
|
+
* @param element A question or panel instance.
|
9791
9412
|
*/
|
9792
9413
|
getPageByElement(element: IElement): PageModel;
|
9793
9414
|
/**
|
9794
|
-
* Returns a page
|
9795
|
-
* @param question
|
9415
|
+
* Returns a page to which a specified question belongs.
|
9416
|
+
* @param question A question instance.
|
9796
9417
|
*/
|
9797
9418
|
getPageByQuestion(question: IQuestion): PageModel;
|
9798
9419
|
/**
|
9799
|
-
* Returns a page
|
9800
|
-
* @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).
|
9801
9422
|
*/
|
9802
9423
|
getPageByName(name: string): PageModel;
|
9803
9424
|
/**
|
9804
|
-
* Returns
|
9805
|
-
* @param names
|
9425
|
+
* Returns an array of pages with specified names.
|
9426
|
+
* @param names An array of page names.
|
9806
9427
|
*/
|
9807
9428
|
getPagesByNames(names: string[]): PageModel[];
|
9808
9429
|
/**
|
9809
|
-
* Returns a list of all questions in
|
9810
|
-
* @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.
|
9811
9434
|
*/
|
9812
|
-
getAllQuestions(visibleOnly?: boolean,
|
9435
|
+
getAllQuestions(visibleOnly?: boolean, includeDesignTime?: boolean, includeNested?: boolean): Array<Question>;
|
9813
9436
|
/**
|
9814
9437
|
* Returns quiz questions. All visible questions that has input(s) widgets.
|
9815
9438
|
* @see getQuizQuestionCount
|
@@ -9825,7 +9448,7 @@ declare module "survey" {
|
|
9825
9448
|
/**
|
9826
9449
|
* Returns a list of all survey's panels.
|
9827
9450
|
*/
|
9828
|
-
getAllPanels(visibleOnly?: boolean,
|
9451
|
+
getAllPanels(visibleOnly?: boolean, includeDesignTime?: boolean): Array<IPanel>;
|
9829
9452
|
/**
|
9830
9453
|
* Creates and returns a new page but does not add it to the survey.
|
9831
9454
|
*
|
@@ -10168,7 +9791,7 @@ declare module "survey" {
|
|
10168
9791
|
getTextProcessor(): ITextProcessor;
|
10169
9792
|
getObjects(pages: string[], questions: string[]): any[];
|
10170
9793
|
setTriggerValue(name: string, value: any, isVariable: boolean): void;
|
10171
|
-
copyTriggerValue(name: string, fromName: string): void;
|
9794
|
+
copyTriggerValue(name: string, fromName: string, copyDisplayValue: boolean): void;
|
10172
9795
|
triggerExecuted(trigger: Trigger): void;
|
10173
9796
|
private isFocusingQuestion;
|
10174
9797
|
private afterRenderPageTasks;
|
@@ -11180,6 +10803,7 @@ declare module "question" {
|
|
11180
10803
|
clearValue(): void;
|
11181
10804
|
unbindValue(): void;
|
11182
10805
|
createValueCopy(): any;
|
10806
|
+
initDataUI(): void;
|
11183
10807
|
protected getUnbindValue(value: any): any;
|
11184
10808
|
protected isValueSurveyElement(val: any): boolean;
|
11185
10809
|
private canClearValueAsInvisible;
|
@@ -11324,8 +10948,15 @@ declare module "question" {
|
|
11324
10948
|
set validators(val: Array<SurveyValidator>);
|
11325
10949
|
getValidators(): Array<SurveyValidator>;
|
11326
10950
|
getSupportedValidators(): Array<string>;
|
11327
|
-
private addSupportedValidators;
|
11328
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;
|
11329
10960
|
getConditionJson(operator?: string, path?: string): any;
|
11330
10961
|
hasErrors(fireCallback?: boolean, rec?: any): boolean;
|
11331
10962
|
/**
|
@@ -11426,6 +11057,8 @@ declare module "question" {
|
|
11426
11057
|
protected getObservedElementSelector(): string;
|
11427
11058
|
private onMobileChanged;
|
11428
11059
|
private onMobileChangedCallback;
|
11060
|
+
triggerResponsiveness(hard?: boolean): void;
|
11061
|
+
private triggerResponsivenessCallback;
|
11429
11062
|
private initResponsiveness;
|
11430
11063
|
protected getCompactRenderAs(): string;
|
11431
11064
|
protected getDesktopRenderAs(): string;
|
@@ -11960,6 +11593,7 @@ declare module "question_matrixdropdownbase" {
|
|
11960
11593
|
}>;
|
11961
11594
|
}): import("question").IQuestionPlainData;
|
11962
11595
|
addConditionObjectsByContext(objects: Array<IConditionObject>, context: any): void;
|
11596
|
+
protected collectNestedQuestionsCore(questions: Question[], visibleOnly: boolean): void;
|
11963
11597
|
protected getConditionObjectRowName(index: number): string;
|
11964
11598
|
protected getConditionObjectRowText(index: number): string;
|
11965
11599
|
protected getConditionObjectsRowIndeces(): Array<number>;
|
@@ -12101,8 +11735,9 @@ declare module "base-interfaces" {
|
|
12101
11735
|
state: string;
|
12102
11736
|
isLazyRendering: boolean;
|
12103
11737
|
cancelPreviewByPage(panel: IPanel): any;
|
12104
|
-
|
11738
|
+
locEditText: LocalizableString;
|
12105
11739
|
cssNavigationEdit: string;
|
11740
|
+
rootElement?: HTMLElement;
|
12106
11741
|
requiredText: string;
|
12107
11742
|
beforeSettingQuestionErrors(question: IQuestion, errors: Array<SurveyError>): void;
|
12108
11743
|
beforeSettingPanelErrors(question: IPanel, errors: Array<SurveyError>): void;
|
@@ -12180,125 +11815,626 @@ declare module "base-interfaces" {
|
|
12180
11815
|
onCorrectQuestionAnswer(question: IQuestion, options: any): void;
|
12181
11816
|
processPopupVisiblityChanged(question: IQuestion, popupModel: PopupModel, visible: boolean): void;
|
12182
11817
|
}
|
12183
|
-
export interface ISurveyImpl {
|
12184
|
-
getSurveyData(): ISurveyData;
|
12185
|
-
getSurvey(): ISurvey;
|
12186
|
-
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;
|
12042
|
+
}
|
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;
|
12187
12067
|
}
|
12188
|
-
export
|
12189
|
-
|
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>;
|
12190
12322
|
}
|
12191
|
-
export
|
12192
|
-
|
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[]);
|
12193
12329
|
}
|
12194
|
-
export
|
12195
|
-
|
12196
|
-
|
12197
|
-
|
12198
|
-
|
12199
|
-
|
12200
|
-
|
12201
|
-
|
12202
|
-
|
12203
|
-
|
12204
|
-
|
12205
|
-
|
12206
|
-
getType(): string;
|
12207
|
-
setVisibleIndex(value: number): number;
|
12208
|
-
locStrsChanged(): any;
|
12209
|
-
delete(): any;
|
12210
|
-
toggleState(): void;
|
12211
|
-
stateChangedCallback(): void;
|
12212
|
-
getTitleToolbar(): AdaptiveActionContainer;
|
12213
|
-
isCollapsed: boolean;
|
12214
|
-
isExpanded: boolean;
|
12215
|
-
expand(): void;
|
12216
|
-
collapse(): void;
|
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;
|
12217
12342
|
}
|
12218
|
-
export
|
12219
|
-
visible: boolean;
|
12220
|
-
renderWidth: string;
|
12221
|
-
width: string;
|
12222
|
-
minWidth?: string;
|
12223
|
-
maxWidth?: string;
|
12224
|
-
isExpanded: boolean;
|
12225
|
-
isCollapsed: boolean;
|
12226
|
-
rightIndent: number;
|
12227
|
-
startWithNewLine: boolean;
|
12228
|
-
registerPropertyChangedHandlers(propertyNames: Array<string>, handler: any, key: string): void;
|
12229
|
-
registerFunctionOnPropertyValueChanged(name: string, func: any, key: string): void;
|
12230
|
-
unRegisterFunctionOnPropertyValueChanged(name: string, key: string): void;
|
12231
|
-
getPanel(): IPanel;
|
12232
|
-
getLayoutType(): string;
|
12233
|
-
isLayoutTypeSupported(layoutType: string): boolean;
|
12234
|
-
removeElement(el: IElement): boolean;
|
12235
|
-
onAnyValueChanged(name: string): any;
|
12236
|
-
updateCustomWidgets(): any;
|
12237
|
-
clearIncorrectValues(): any;
|
12238
|
-
clearErrors(): any;
|
12239
|
-
dispose(): void;
|
12240
|
-
needResponsiveWidth(): boolean;
|
12343
|
+
export class EventBase<Sender, Options = any> extends Event<(sender: Sender, options: Options) => any, Sender, Options> {
|
12241
12344
|
}
|
12242
|
-
|
12243
|
-
|
12244
|
-
|
12245
|
-
|
12246
|
-
|
12247
|
-
|
12248
|
-
|
12249
|
-
|
12250
|
-
getDisplayValue(keysAsText: boolean, value: any): any;
|
12251
|
-
getValueName(): string;
|
12252
|
-
clearValue(): any;
|
12253
|
-
clearValueIfInvisible(): any;
|
12254
|
-
isAnswerCorrect(): boolean;
|
12255
|
-
updateValueWithDefaults(): any;
|
12256
|
-
getQuestionFromArray(name: string, index: number): IQuestion;
|
12257
|
-
value: any;
|
12258
|
-
survey: any;
|
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;
|
12259
12353
|
}
|
12260
|
-
export interface
|
12261
|
-
|
12262
|
-
|
12263
|
-
isReadOnly: boolean;
|
12354
|
+
export interface INumberPosition extends IPosition {
|
12355
|
+
left?: number;
|
12356
|
+
top?: number;
|
12264
12357
|
}
|
12265
|
-
export interface
|
12266
|
-
|
12267
|
-
|
12268
|
-
getQuestionStartIndex(): string;
|
12269
|
-
parent: IPanel;
|
12270
|
-
elementWidthChanged(el: IElement): any;
|
12271
|
-
indexOf(el: IElement): number;
|
12272
|
-
elements: Array<IElement>;
|
12273
|
-
ensureRowsVisibility(): void;
|
12274
|
-
validateContainerOnly(): void;
|
12358
|
+
export interface ISize {
|
12359
|
+
width: number;
|
12360
|
+
height: number;
|
12275
12361
|
}
|
12276
|
-
export
|
12277
|
-
|
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;
|
12278
12376
|
}
|
12279
|
-
|
12280
|
-
|
12281
|
-
|
12282
|
-
|
12283
|
-
|
12284
|
-
|
12285
|
-
|
12286
|
-
|
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";
|
12287
12394
|
}
|
12288
|
-
export interface
|
12289
|
-
|
12290
|
-
|
12291
|
-
|
12292
|
-
requiredAnsweredQuestionCount: number;
|
12395
|
+
export interface IDialogOptions extends IPopupOptionsBase {
|
12396
|
+
componentName: string;
|
12397
|
+
data: any;
|
12398
|
+
onApply: () => boolean;
|
12293
12399
|
}
|
12294
|
-
export interface
|
12295
|
-
|
12296
|
-
|
12400
|
+
export interface IPopupModel<T = any> extends IDialogOptions {
|
12401
|
+
contentComponentName: string;
|
12402
|
+
contentComponentData: T;
|
12297
12403
|
}
|
12298
|
-
export
|
12299
|
-
|
12300
|
-
|
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>;
|
12301
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";
|
12302
12438
|
export type ISurveyEnvironment = {
|
12303
12439
|
root: Document | ShadowRoot;
|
12304
12440
|
rootElement: HTMLElement | ShadowRoot;
|
@@ -12306,564 +12442,522 @@ declare module "base-interfaces" {
|
|
12306
12442
|
svgMountContainer: HTMLElement | string;
|
12307
12443
|
stylesSheetsMountContainer: HTMLElement;
|
12308
12444
|
};
|
12309
|
-
export type LayoutElementContainer = "header" | "footer" | "left" | "right" | "contentTop" | "contentBottom";
|
12310
|
-
export interface ISurveyLayoutElement {
|
12311
|
-
id: string;
|
12312
|
-
container?: LayoutElementContainer | Array<LayoutElementContainer>;
|
12313
|
-
component?: string;
|
12314
|
-
template?: string;
|
12315
|
-
data?: any;
|
12316
|
-
}
|
12317
|
-
}
|
12318
|
-
declare module "itemvalue" {
|
12319
|
-
import { ILocalizableOwner, LocalizableString } from "localizablestring";
|
12320
|
-
import { ConditionRunner } from "conditions";
|
12321
|
-
import { IShortcutText, ISurvey } from "base-interfaces";
|
12322
|
-
import { BaseAction } from "actions/action";
|
12323
12445
|
/**
|
12324
|
-
*
|
12325
|
-
*
|
12326
|
-
*
|
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
|
+
* ```
|
12327
12453
|
*/
|
12328
|
-
export
|
12329
|
-
protected typeName: string;
|
12330
|
-
[index: string]: any;
|
12331
|
-
getMarkdownHtml(text: string, name: string): string;
|
12332
|
-
getRenderer(name: string): string;
|
12333
|
-
getRendererContext(locStr: LocalizableString): any;
|
12334
|
-
getProcessedText(text: string): string;
|
12335
|
-
static get Separator(): string;
|
12336
|
-
static set Separator(val: string);
|
12454
|
+
export var settings: {
|
12337
12455
|
/**
|
12338
|
-
*
|
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`.
|
12339
12465
|
*/
|
12340
|
-
|
12341
|
-
|
12342
|
-
|
12343
|
-
|
12344
|
-
|
12345
|
-
|
12346
|
-
|
12347
|
-
|
12348
|
-
|
12349
|
-
|
12350
|
-
|
12351
|
-
|
12352
|
-
|
12353
|
-
|
12354
|
-
|
12355
|
-
|
12356
|
-
|
12357
|
-
|
12358
|
-
|
12359
|
-
|
12360
|
-
|
12361
|
-
|
12362
|
-
|
12363
|
-
|
12364
|
-
|
12365
|
-
|
12366
|
-
|
12367
|
-
|
12368
|
-
|
12369
|
-
|
12370
|
-
|
12371
|
-
set text(newText: string);
|
12372
|
-
get calculatedText(): string;
|
12373
|
-
get shortcutText(): string;
|
12374
|
-
private canSerializeValue;
|
12375
|
-
getData(): any;
|
12376
|
-
toJSON(): any;
|
12377
|
-
setData(value: any): void;
|
12378
|
-
get visibleIf(): string;
|
12379
|
-
set visibleIf(val: string);
|
12380
|
-
get enableIf(): string;
|
12381
|
-
set enableIf(val: string);
|
12382
|
-
get isVisible(): any;
|
12383
|
-
setIsVisible(val: boolean): void;
|
12384
|
-
get isEnabled(): any;
|
12385
|
-
setIsEnabled(val: boolean): void;
|
12386
|
-
addUsedLocales(locales: Array<string>): void;
|
12387
|
-
locStrsChanged(): void;
|
12388
|
-
protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
|
12389
|
-
protected getConditionRunner(isVisible: boolean): ConditionRunner;
|
12390
|
-
private getVisibleConditionRunner;
|
12391
|
-
private getEnableConditionRunner;
|
12392
|
-
originalItem: any;
|
12393
|
-
selectedValue: boolean;
|
12394
|
-
get selected(): boolean;
|
12395
|
-
private componentValue;
|
12396
|
-
getComponent(): string;
|
12397
|
-
setComponent(val: string): void;
|
12398
|
-
protected getEnabled(): boolean;
|
12399
|
-
protected setEnabled(val: boolean): void;
|
12400
|
-
protected getVisible(): boolean;
|
12401
|
-
protected setVisible(val: boolean): void;
|
12402
|
-
protected getLocTitle(): LocalizableString;
|
12403
|
-
protected getTitle(): string;
|
12404
|
-
protected setLocTitle(val: LocalizableString): void;
|
12405
|
-
protected setTitle(val: string): void;
|
12406
|
-
icon: string;
|
12407
|
-
}
|
12408
|
-
}
|
12409
|
-
declare module "base" {
|
12410
|
-
import { ILocalizableOwner, LocalizableString } from "localizablestring";
|
12411
|
-
import { HashTable } from "helpers";
|
12412
|
-
import { JsonObjectProperty } from "jsonobject";
|
12413
|
-
import { ItemValue } from "itemvalue";
|
12414
|
-
import { IElement, IFindElement, IProgressInfo, ISurvey } from "base-interfaces";
|
12415
|
-
export class Bindings {
|
12416
|
-
private obj;
|
12417
|
-
private properties;
|
12418
|
-
private values;
|
12419
|
-
constructor(obj: Base);
|
12420
|
-
getType(): string;
|
12421
|
-
getNames(): Array<string>;
|
12422
|
-
getProperties(): Array<JsonObjectProperty>;
|
12423
|
-
setBinding(propertyName: string, valueName: string): void;
|
12424
|
-
clearBinding(propertyName: string): void;
|
12425
|
-
isEmpty(): boolean;
|
12426
|
-
getValueNameByPropertyName(propertyName: string): string;
|
12427
|
-
getPropertiesByValueName(valueName: string): Array<string>;
|
12428
|
-
getJson(): any;
|
12429
|
-
setJson(value: any): void;
|
12430
|
-
private fillProperties;
|
12431
|
-
private onChangedJSON;
|
12432
|
-
}
|
12433
|
-
export class Dependencies {
|
12434
|
-
currentDependency: () => void;
|
12435
|
-
target: Base;
|
12436
|
-
property: string;
|
12437
|
-
private static DependenciesCount;
|
12438
|
-
constructor(currentDependency: () => void, target: Base, property: string);
|
12439
|
-
dependencies: Array<{
|
12440
|
-
obj: Base;
|
12441
|
-
prop: string;
|
12442
|
-
id: string;
|
12443
|
-
}>;
|
12444
|
-
id: string;
|
12445
|
-
addDependency(target: Base, property: string): void;
|
12446
|
-
dispose(): void;
|
12447
|
-
}
|
12448
|
-
export class ComputedUpdater<T = any> {
|
12449
|
-
private _updater;
|
12450
|
-
static readonly ComputedUpdaterType = "__dependency_computed";
|
12451
|
-
private dependencies;
|
12452
|
-
constructor(_updater: () => T);
|
12453
|
-
readonly type = "__dependency_computed";
|
12454
|
-
get updater(): () => T;
|
12455
|
-
setDependencies(dependencies: Dependencies): void;
|
12456
|
-
protected getDependencies(): Dependencies;
|
12457
|
-
private clearDependencies;
|
12458
|
-
dispose(): any;
|
12459
|
-
}
|
12460
|
-
/**
|
12461
|
-
* A base class for all SurveyJS objects.
|
12462
|
-
*/
|
12463
|
-
export class Base {
|
12464
|
-
private static currentDependencis;
|
12465
|
-
static finishCollectDependencies(): Dependencies;
|
12466
|
-
static startCollectDependencies(updater: () => void, target: Base, property: string): void;
|
12467
|
-
private static collectDependency;
|
12468
|
-
static get commentSuffix(): string;
|
12469
|
-
static set commentSuffix(val: string);
|
12470
|
-
static get commentPrefix(): string;
|
12471
|
-
static set commentPrefix(val: string);
|
12472
|
-
static createItemValue: (item: any, type?: string) => any;
|
12473
|
-
static itemValueLocStrChanged: (arr: Array<any>) => void;
|
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
|
+
};
|
12474
12497
|
/**
|
12475
|
-
*
|
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.
|
12476
12511
|
*
|
12477
|
-
*
|
12478
|
-
*
|
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.
|
12479
12525
|
*/
|
12480
|
-
|
12481
|
-
|
12482
|
-
|
12483
|
-
|
12484
|
-
|
12485
|
-
|
12486
|
-
private eventList;
|
12487
|
-
private expressionInfo;
|
12488
|
-
private bindingsValue;
|
12489
|
-
private isDisposedValue;
|
12490
|
-
private classMetaData;
|
12491
|
-
private onPropChangeFunctions;
|
12492
|
-
protected isLoadingFromJsonValue: boolean;
|
12493
|
-
loadingOwner: Base;
|
12526
|
+
web: {
|
12527
|
+
encodeUrlParams: boolean;
|
12528
|
+
cacheLoadedChoices: boolean;
|
12529
|
+
disableQuestionWhileLoadingChoices: boolean;
|
12530
|
+
surveyServiceUrl: string;
|
12531
|
+
};
|
12494
12532
|
/**
|
12495
|
-
*
|
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).
|
12496
12551
|
*
|
12497
|
-
*
|
12552
|
+
* Nested properties:
|
12498
12553
|
*
|
12499
|
-
* - `
|
12500
|
-
*
|
12501
|
-
* -
|
12502
|
-
*
|
12503
|
-
* - `
|
12504
|
-
*
|
12505
|
-
*
|
12506
|
-
*
|
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.
|
12507
12564
|
*/
|
12508
|
-
|
12565
|
+
triggers: {
|
12566
|
+
changeNavigationButtonsOnComplete: boolean;
|
12567
|
+
executeCompleteOnValueChanged: boolean;
|
12568
|
+
executeSkipOnValueChanged: boolean;
|
12569
|
+
};
|
12509
12570
|
/**
|
12510
|
-
*
|
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.
|
12511
12584
|
*
|
12512
|
-
*
|
12585
|
+
* Nested properties:
|
12513
12586
|
*
|
12514
|
-
* - `
|
12515
|
-
*
|
12516
|
-
*
|
12517
|
-
*
|
12518
|
-
* - `
|
12519
|
-
*
|
12520
|
-
* - `
|
12521
|
-
*
|
12522
|
-
*
|
12523
|
-
*
|
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
|
+
* ```
|
12524
12609
|
*/
|
12525
|
-
|
12526
|
-
|
12527
|
-
|
12528
|
-
|
12529
|
-
|
12530
|
-
private isCreating;
|
12531
|
-
constructor();
|
12532
|
-
dispose(): void;
|
12533
|
-
get isDisposed(): boolean;
|
12534
|
-
protected addEvent<T, Options = any>(): EventBase<T, Options>;
|
12535
|
-
protected onBaseCreating(): void;
|
12610
|
+
serialization: {
|
12611
|
+
itemValueSerializeAsObject: boolean;
|
12612
|
+
itemValueSerializeDisplayText: boolean;
|
12613
|
+
localizableStringSerializeAsObject: boolean;
|
12614
|
+
};
|
12536
12615
|
/**
|
12537
|
-
*
|
12616
|
+
* This property is obsolete. Use the [`settings.serialization.itemValueSerializeAsObject`](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization) property instead.
|
12617
|
+
*/
|
12618
|
+
itemValueAlwaysSerializeAsObject: boolean;
|
12619
|
+
/**
|
12620
|
+
* This property is obsolete. Use the [`settings.serialization.itemValueSerializeDisplayText`](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization) property instead.
|
12621
|
+
*/
|
12622
|
+
itemValueAlwaysSerializeText: boolean;
|
12623
|
+
/**
|
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.
|
12629
|
+
*
|
12630
|
+
* Nested properties:
|
12631
|
+
*
|
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.
|
12636
|
+
*/
|
12637
|
+
lazyRender: {
|
12638
|
+
enabled: boolean;
|
12639
|
+
firstBatchSize: number;
|
12640
|
+
};
|
12641
|
+
/**
|
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.
|
12648
|
+
*
|
12649
|
+
* Nested properties:
|
12650
|
+
*
|
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.
|
12678
|
+
*/
|
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
|
+
};
|
12694
|
+
/**
|
12695
|
+
* This property is obsolete. Use the [`settings.matrix.defaultRowName`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
12696
|
+
*/
|
12697
|
+
matrixDefaultRowName: string;
|
12698
|
+
/**
|
12699
|
+
* This property is obsolete. Use the [`settings.matrix.defaultCellType`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
12700
|
+
*/
|
12701
|
+
matrixDefaultCellType: string;
|
12702
|
+
/**
|
12703
|
+
* This property is obsolete. Use the [`settings.matrix.totalsSuffix`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
12704
|
+
*/
|
12705
|
+
matrixTotalValuePostFix: string;
|
12706
|
+
/**
|
12707
|
+
* This property is obsolete. Use the [`settings.matrix.maxRowCount`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
12538
12708
|
*/
|
12539
|
-
|
12709
|
+
matrixMaximumRowCount: number;
|
12540
12710
|
/**
|
12541
|
-
*
|
12542
|
-
*
|
12543
|
-
* @param typeName One of the values listed in the [getType()](https://surveyjs.io/form-library/documentation/question#getType) description.
|
12544
|
-
* @returns `true` if the current object is of a given `typeName` or inherited from it.
|
12545
|
-
* @see getType
|
12711
|
+
* This property is obsolete. Use the [`settings.matrix.maxRowCountInCondition`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
12546
12712
|
*/
|
12547
|
-
|
12548
|
-
getSurvey(isLive?: boolean): ISurvey;
|
12713
|
+
matrixMaxRowCountInCondition: number;
|
12549
12714
|
/**
|
12550
|
-
*
|
12715
|
+
* This property is obsolete. Use the [`settings.matrix.renderRemoveAsIcon`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
12551
12716
|
*/
|
12552
|
-
|
12717
|
+
matrixRenderRemoveAsIcon: boolean;
|
12553
12718
|
/**
|
12554
|
-
*
|
12719
|
+
* An object with properties that apply to [Dynamic Panel](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model) questions.
|
12555
12720
|
*
|
12556
|
-
*
|
12721
|
+
* Nested properties:
|
12722
|
+
*
|
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.
|
12557
12730
|
*/
|
12558
|
-
|
12559
|
-
|
12560
|
-
|
12561
|
-
|
12562
|
-
protected updateBindingValue(valueName: string, value: any): void;
|
12563
|
-
getTemplate(): string;
|
12731
|
+
panel: {
|
12732
|
+
maxPanelCount: number;
|
12733
|
+
maxPanelCountInCondition: number;
|
12734
|
+
};
|
12564
12735
|
/**
|
12565
|
-
*
|
12736
|
+
* This property is obsolete. Use the [`settings.panel.maxPanelCountInCondition`](https://surveyjs.io/form-library/documentation/api-reference/settings#panel) property instead.
|
12566
12737
|
*/
|
12567
|
-
|
12568
|
-
protected getIsLoadingFromJson(): boolean;
|
12569
|
-
startLoadingFromJson(json?: any): void;
|
12570
|
-
endLoadingFromJson(): void;
|
12738
|
+
panelDynamicMaxPanelCountInCondition: number;
|
12571
12739
|
/**
|
12572
|
-
*
|
12573
|
-
* @see fromJSON
|
12740
|
+
* This property is obsolete. Use the [`settings.panel.maxPanelCount`](https://surveyjs.io/form-library/documentation/api-reference/settings#panel) property instead.
|
12574
12741
|
*/
|
12575
|
-
|
12742
|
+
panelMaximumPanelCount: number;
|
12576
12743
|
/**
|
12577
|
-
*
|
12744
|
+
* An object with properties that configure questions in read-only mode.
|
12578
12745
|
*
|
12579
|
-
*
|
12746
|
+
* Nested properties:
|
12580
12747
|
*
|
12581
|
-
*
|
12582
|
-
*
|
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.
|
12583
12753
|
*/
|
12584
|
-
|
12585
|
-
|
12754
|
+
readOnly: {
|
12755
|
+
commentRenderMode: string;
|
12756
|
+
textRenderMode: string;
|
12757
|
+
};
|
12586
12758
|
/**
|
12587
|
-
*
|
12759
|
+
* This property is obsolete. Use the [`settings.readOnly.commentRenderMode`](https://surveyjs.io/form-library/documentation/api-reference/settings#readOnly) property instead.
|
12588
12760
|
*/
|
12589
|
-
|
12761
|
+
readOnlyCommentRenderMode: string;
|
12590
12762
|
/**
|
12591
|
-
*
|
12592
|
-
*
|
12593
|
-
* If the property is not found, this method returns `null`.
|
12594
|
-
* @param propName A property name.
|
12763
|
+
* This property is obsolete. Use the [`settings.readOnly.textRenderMode`](https://surveyjs.io/form-library/documentation/api-reference/settings#readOnly) property instead.
|
12595
12764
|
*/
|
12596
|
-
|
12597
|
-
isPropertyVisible(propName: string): boolean;
|
12598
|
-
static createProgressInfo(): IProgressInfo;
|
12599
|
-
getProgressInfo(): IProgressInfo;
|
12600
|
-
localeChanged(): void;
|
12601
|
-
locStrsChanged(): void;
|
12765
|
+
readOnlyTextRenderMode: string;
|
12602
12766
|
/**
|
12603
|
-
*
|
12767
|
+
* An object with properties that configure question numbering.
|
12604
12768
|
*
|
12605
|
-
*
|
12769
|
+
* Nested properties:
|
12606
12770
|
*
|
12607
|
-
*
|
12608
|
-
*
|
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`.
|
12609
12776
|
*/
|
12610
|
-
|
12611
|
-
|
12612
|
-
|
12613
|
-
|
12614
|
-
geValueFromHash(): any;
|
12615
|
-
protected setPropertyValueCore(propertiesHash: any, name: string, val: any): void;
|
12616
|
-
get isEditingSurveyElement(): boolean;
|
12617
|
-
iteratePropertiesHash(func: (hash: any, key: any) => void): void;
|
12777
|
+
numbering: {
|
12778
|
+
includeQuestionsWithHiddenNumber: boolean;
|
12779
|
+
includeQuestionsWithHiddenTitle: boolean;
|
12780
|
+
};
|
12618
12781
|
/**
|
12619
|
-
*
|
12620
|
-
* @param name A property name.
|
12621
|
-
* @param val A new value for the property.
|
12782
|
+
* This property is obsolete. Use the [`settings.numbering.includeQuestionsWithHiddenTitle`](https://surveyjs.io/form-library/documentation/api-reference/settings#numbering) property instead.
|
12622
12783
|
*/
|
12623
|
-
|
12624
|
-
protected setArrayPropertyDirectly(name: string, val: any, sendNotification?: boolean): void;
|
12625
|
-
protected setPropertyValueDirectly(name: string, val: any): void;
|
12626
|
-
protected clearPropertyValue(name: string): void;
|
12627
|
-
onPropertyValueChangedCallback(name: string, oldValue: any, newValue: any, sender: Base, arrayChanges: ArrayChanges): void;
|
12628
|
-
itemValuePropertyChanged(item: ItemValue, name: string, oldValue: any, newValue: any): void;
|
12629
|
-
protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
|
12630
|
-
protected propertyValueChanged(name: string, oldValue: any, newValue: any, arrayChanges?: ArrayChanges, target?: Base): void;
|
12631
|
-
onBindingChanged(oldValue: any, newValue: any): void;
|
12632
|
-
protected get isInternal(): boolean;
|
12633
|
-
private doPropertyValueChangedCallback;
|
12634
|
-
addExpressionProperty(name: string, onExecute: (obj: Base, res: any) => void, canRun?: (obj: Base) => boolean): void;
|
12635
|
-
getDataFilteredValues(): any;
|
12636
|
-
getDataFilteredProperties(): any;
|
12637
|
-
protected runConditionCore(values: HashTable<any>, properties: HashTable<any>): void;
|
12638
|
-
protected canRunConditions(): boolean;
|
12639
|
-
private checkConditionPropertyChanged;
|
12640
|
-
private runConditionItemCore;
|
12784
|
+
setQuestionVisibleIndexForHiddenTitle: boolean;
|
12641
12785
|
/**
|
12642
|
-
*
|
12643
|
-
* @param propertyNames An array of one or multiple property names.
|
12644
|
-
* @param handler A function to call when one of the listed properties change.
|
12645
|
-
* @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.
|
12646
|
-
* @see unregisterPropertyChangedHandlers
|
12786
|
+
* This property is obsolete. Use the [`settings.numbering.includeQuestionsWithHiddenNumber`](https://surveyjs.io/form-library/documentation/api-reference/settings#numbering) property instead.
|
12647
12787
|
*/
|
12648
|
-
|
12788
|
+
setQuestionVisibleIndexForHiddenNumber: boolean;
|
12649
12789
|
/**
|
12650
|
-
*
|
12651
|
-
*
|
12652
|
-
*
|
12653
|
-
*
|
12654
|
-
|
12655
|
-
|
12656
|
-
|
12657
|
-
|
12658
|
-
|
12659
|
-
unRegisterFunctionOnPropertiesValueChanged(names: Array<string>, key?: string): void;
|
12660
|
-
createCustomLocalizableObj(name: string): void;
|
12661
|
-
getLocale(): string;
|
12662
|
-
getLocalizationString(strName: string): string;
|
12663
|
-
getLocalizationFormatString(strName: string, ...args: any[]): string;
|
12664
|
-
protected createLocalizableString(name: string, owner: ILocalizableOwner, useMarkDown?: boolean, defaultStr?: boolean | string): LocalizableString;
|
12665
|
-
getLocalizableString(name: string): LocalizableString;
|
12666
|
-
getLocalizableStringText(name: string, defaultStr?: string): string;
|
12667
|
-
setLocalizableStringText(name: string, value: string): void;
|
12668
|
-
addUsedLocales(locales: Array<string>): void;
|
12669
|
-
searchText(text: string, founded: Array<IFindElement>): void;
|
12670
|
-
private getSearchableLocalizedStrings;
|
12671
|
-
protected getSearchableLocKeys(keys: Array<string>): void;
|
12672
|
-
protected getSearchableItemValueKeys(keys: Array<string>): void;
|
12673
|
-
protected AddLocStringToUsedLocales(locStr: LocalizableString, locales: Array<string>): void;
|
12674
|
-
protected createItemValues(name: string): Array<any>;
|
12675
|
-
private notifyArrayChanged;
|
12676
|
-
protected createNewArrayCore(name: string): Array<any>;
|
12677
|
-
protected ensureArray(name: string, onPush?: any, onRemove?: any): any[];
|
12678
|
-
protected createNewArray(name: string, onPush?: any, onRemove?: any): Array<any>;
|
12679
|
-
protected getItemValueType(): string;
|
12680
|
-
protected setArray(name: string, src: any[], dest: any[], isItemValues: boolean, onPush: any): void;
|
12681
|
-
protected isTwoValueEquals(x: any, y: any, caseInSensitive?: boolean, trimString?: boolean): boolean;
|
12682
|
-
private static copyObject;
|
12683
|
-
protected copyCssClasses(dest: any, source: any): void;
|
12684
|
-
private getValueInLowCase;
|
12685
|
-
getElementsInDesign(includeHidden?: boolean): Array<IElement>;
|
12686
|
-
}
|
12687
|
-
export class ArrayChanges {
|
12688
|
-
index: number;
|
12689
|
-
deleteCount: number;
|
12690
|
-
itemsToAdd: any[];
|
12691
|
-
deletedItems: any[];
|
12692
|
-
constructor(index: number, deleteCount: number, itemsToAdd: any[], deletedItems: any[]);
|
12693
|
-
}
|
12694
|
-
export class Event<CallbackFunction extends Function, Sender, Options> {
|
12695
|
-
onCallbacksChanged: () => void;
|
12696
|
-
protected callbacks: Array<CallbackFunction>;
|
12697
|
-
get isEmpty(): boolean;
|
12698
|
-
get length(): number;
|
12699
|
-
fireByCreatingOptions(sender: any, createOptions: () => Options): void;
|
12700
|
-
fire(sender: Sender, options: Options): void;
|
12701
|
-
clear(): void;
|
12702
|
-
add(func: CallbackFunction): void;
|
12703
|
-
remove(func: CallbackFunction): void;
|
12704
|
-
hasFunc(func: CallbackFunction): boolean;
|
12705
|
-
private fireCallbackChanged;
|
12706
|
-
}
|
12707
|
-
export class EventBase<Sender, Options = any> extends Event<(sender: Sender, options: Options) => any, Sender, Options> {
|
12708
|
-
}
|
12709
|
-
}
|
12710
|
-
declare module "validator" {
|
12711
|
-
import { Base } from "base";
|
12712
|
-
import { ISurveyErrorOwner, ISurvey } from "base-interfaces";
|
12713
|
-
import { SurveyError } from "survey-error";
|
12714
|
-
import { LocalizableString } from "localizablestring";
|
12715
|
-
export class ValidatorResult {
|
12716
|
-
value: any;
|
12717
|
-
error: SurveyError;
|
12718
|
-
constructor(value: any, error?: SurveyError);
|
12719
|
-
}
|
12720
|
-
/**
|
12721
|
-
* Base SurveyJS validator class.
|
12722
|
-
*/
|
12723
|
-
export class SurveyValidator extends Base {
|
12724
|
-
errorOwner: ISurveyErrorOwner;
|
12725
|
-
onAsyncCompleted: (result: ValidatorResult) => void;
|
12726
|
-
constructor();
|
12727
|
-
getSurvey(live?: boolean): ISurvey;
|
12728
|
-
get text(): string;
|
12729
|
-
set text(value: string);
|
12730
|
-
get isValidateAllValues(): boolean;
|
12731
|
-
get locText(): LocalizableString;
|
12732
|
-
protected getErrorText(name: string): string;
|
12733
|
-
protected getDefaultErrorText(name: string): string;
|
12734
|
-
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
|
12735
|
-
get isRunning(): boolean;
|
12736
|
-
get isAsync(): boolean;
|
12737
|
-
getLocale(): string;
|
12738
|
-
getMarkdownHtml(text: string, name: string): string;
|
12739
|
-
getRenderer(name: string): string;
|
12740
|
-
getRendererContext(locStr: LocalizableString): any;
|
12741
|
-
getProcessedText(text: string): string;
|
12742
|
-
protected createCustomError(name: string): SurveyError;
|
12743
|
-
toString(): string;
|
12744
|
-
}
|
12745
|
-
export interface IValidatorOwner {
|
12746
|
-
getValidators(): Array<SurveyValidator>;
|
12747
|
-
validatedValue: any;
|
12748
|
-
getValidatorTitle(): string;
|
12749
|
-
getDataFilteredValues(): any;
|
12750
|
-
getDataFilteredProperties(): any;
|
12751
|
-
}
|
12752
|
-
export class ValidatorRunner {
|
12753
|
-
private asyncValidators;
|
12754
|
-
onAsyncCompleted: (errors: Array<SurveyError>) => void;
|
12755
|
-
run(owner: IValidatorOwner): Array<SurveyError>;
|
12756
|
-
private prepareAsyncValidators;
|
12757
|
-
}
|
12758
|
-
/**
|
12759
|
-
* Validate numeric values.
|
12760
|
-
*/
|
12761
|
-
export class NumericValidator extends SurveyValidator {
|
12762
|
-
constructor(minValue?: number, maxValue?: number);
|
12763
|
-
getType(): string;
|
12764
|
-
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
|
12765
|
-
protected getDefaultErrorText(name: string): string;
|
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.
|
12797
|
+
*/
|
12798
|
+
enterKeyAction: "default" | "moveToNextEditor" | "loseFocus";
|
12766
12799
|
/**
|
12767
|
-
*
|
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.
|
12768
12815
|
*/
|
12769
|
-
|
12770
|
-
|
12816
|
+
comparator: {
|
12817
|
+
trimStrings: boolean;
|
12818
|
+
caseSensitive: boolean;
|
12819
|
+
normalizeTextCallback: (str: string, reason: string) => string;
|
12820
|
+
};
|
12821
|
+
expressionDisableConversionChar: string;
|
12822
|
+
commentPrefix: string;
|
12771
12823
|
/**
|
12772
|
-
*
|
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).
|
12773
12829
|
*/
|
12774
|
-
|
12775
|
-
set maxValue(val: number);
|
12776
|
-
}
|
12777
|
-
/**
|
12778
|
-
* Validate text values.
|
12779
|
-
*/
|
12780
|
-
export class TextValidator extends SurveyValidator {
|
12781
|
-
constructor();
|
12782
|
-
getType(): string;
|
12783
|
-
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
|
12784
|
-
protected getDefaultErrorText(name: string): string;
|
12830
|
+
commentSuffix: string;
|
12785
12831
|
/**
|
12786
|
-
*
|
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: `"|"`
|
12787
12835
|
*/
|
12788
|
-
|
12789
|
-
set minLength(val: number);
|
12836
|
+
itemValueSeparator: string;
|
12790
12837
|
/**
|
12791
|
-
*
|
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
|
12792
12841
|
*/
|
12793
|
-
|
12794
|
-
set maxLength(val: number);
|
12842
|
+
ratingMaximumRateValueCount: number;
|
12795
12843
|
/**
|
12796
|
-
*
|
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.
|
12797
12847
|
*/
|
12798
|
-
|
12799
|
-
set allowDigits(val: boolean);
|
12800
|
-
}
|
12801
|
-
/**
|
12802
|
-
* Validates the number of answers.
|
12803
|
-
*/
|
12804
|
-
export class AnswerCountValidator extends SurveyValidator {
|
12805
|
-
constructor(minCount?: number, maxCount?: number);
|
12806
|
-
getType(): string;
|
12807
|
-
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
|
12808
|
-
protected getDefaultErrorText(name: string): string;
|
12848
|
+
tagboxCloseOnSelect: boolean;
|
12809
12849
|
/**
|
12810
|
-
*
|
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.
|
12811
12852
|
*/
|
12812
|
-
|
12813
|
-
set minCount(val: number);
|
12853
|
+
confirmActionFunc: (message: string) => boolean;
|
12814
12854
|
/**
|
12815
|
-
*
|
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).
|
12816
12860
|
*/
|
12817
|
-
|
12818
|
-
set maxCount(val: number);
|
12819
|
-
}
|
12820
|
-
/**
|
12821
|
-
* Use it to validate the text by regular expressions.
|
12822
|
-
*
|
12823
|
-
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
12824
|
-
*/
|
12825
|
-
export class RegexValidator extends SurveyValidator {
|
12826
|
-
constructor(regex?: string);
|
12827
|
-
getType(): string;
|
12828
|
-
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
|
12829
|
-
private hasError;
|
12861
|
+
minWidth: string;
|
12830
12862
|
/**
|
12831
|
-
*
|
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).
|
12832
12868
|
*/
|
12833
|
-
|
12834
|
-
set regex(val: string);
|
12835
|
-
}
|
12836
|
-
/**
|
12837
|
-
* Validate e-mail address in the text input
|
12838
|
-
*/
|
12839
|
-
export class EmailValidator extends SurveyValidator {
|
12840
|
-
private re;
|
12841
|
-
constructor();
|
12842
|
-
getType(): string;
|
12843
|
-
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
|
12844
|
-
protected getDefaultErrorText(name: string): string;
|
12845
|
-
}
|
12846
|
-
/**
|
12847
|
-
* Show error if expression returns false
|
12848
|
-
*/
|
12849
|
-
export class ExpressionValidator extends SurveyValidator {
|
12850
|
-
private conditionRunner;
|
12851
|
-
private isRunningValue;
|
12852
|
-
constructor(expression?: string);
|
12853
|
-
getType(): string;
|
12854
|
-
get isValidateAllValues(): boolean;
|
12855
|
-
get isAsync(): boolean;
|
12856
|
-
get isRunning(): boolean;
|
12857
|
-
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
|
12858
|
-
protected generateError(res: boolean, value: any, name: string): ValidatorResult;
|
12859
|
-
protected getDefaultErrorText(name: string): string;
|
12860
|
-
protected ensureConditionRunner(): boolean;
|
12869
|
+
maxWidth: string;
|
12861
12870
|
/**
|
12862
|
-
*
|
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
|
12863
12874
|
*/
|
12864
|
-
|
12865
|
-
|
12866
|
-
|
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
|
+
};
|
12867
12961
|
}
|
12868
12962
|
declare module "question_matrixdropdown" {
|
12869
12963
|
import { QuestionMatrixDropdownModelBase, MatrixDropdownRowModelBase, IMatrixDropdownData } from "question_matrixdropdownbase";
|
@@ -13682,7 +13776,7 @@ declare module "question_imagepicker" {
|
|
13682
13776
|
get imageHeight(): number;
|
13683
13777
|
set imageHeight(val: number);
|
13684
13778
|
private responsiveImageHeight;
|
13685
|
-
get renderedImageHeight():
|
13779
|
+
get renderedImageHeight(): number;
|
13686
13780
|
/**
|
13687
13781
|
* Specifies the width of containers for images or videos. Accepts positive numbers and CSS values.
|
13688
13782
|
*
|
@@ -13695,7 +13789,7 @@ declare module "question_imagepicker" {
|
|
13695
13789
|
get imageWidth(): number;
|
13696
13790
|
set imageWidth(val: number);
|
13697
13791
|
private responsiveImageWidth;
|
13698
|
-
get renderedImageWidth():
|
13792
|
+
get renderedImageWidth(): number;
|
13699
13793
|
/**
|
13700
13794
|
* Specifies how to resize images or videos to fit them into their containers.
|
13701
13795
|
*
|
@@ -13737,7 +13831,9 @@ declare module "question_imagepicker" {
|
|
13737
13831
|
private responsiveColCount;
|
13738
13832
|
protected getCurrentColCount(): number;
|
13739
13833
|
protected processResponsiveness(_: number, availableWidth: number): boolean;
|
13834
|
+
triggerResponsiveness(hard?: boolean): void;
|
13740
13835
|
private gapBetweenItems;
|
13836
|
+
private reCalcGapBetweenItemsCallback;
|
13741
13837
|
afterRender(el: HTMLElement): void;
|
13742
13838
|
}
|
13743
13839
|
}
|
@@ -14408,8 +14504,8 @@ declare module "question_image" {
|
|
14408
14504
|
*/
|
14409
14505
|
get imageHeight(): string;
|
14410
14506
|
set imageHeight(val: string);
|
14411
|
-
|
14412
|
-
get renderedHeight():
|
14507
|
+
get renderedStyleHeight(): string;
|
14508
|
+
get renderedHeight(): number;
|
14413
14509
|
/**
|
14414
14510
|
* Specifies the width of a container for the image or video. Accepts positive numbers and CSS values.
|
14415
14511
|
*
|
@@ -14421,7 +14517,8 @@ declare module "question_image" {
|
|
14421
14517
|
*/
|
14422
14518
|
get imageWidth(): string;
|
14423
14519
|
set imageWidth(val: string);
|
14424
|
-
get
|
14520
|
+
get renderedStyleWidth(): string;
|
14521
|
+
get renderedWidth(): number;
|
14425
14522
|
/**
|
14426
14523
|
* Specifies how to resize the image or video to fit it into its container.
|
14427
14524
|
*
|
@@ -14528,9 +14625,11 @@ declare module "surveyToc" {
|
|
14528
14625
|
import { Action } from "actions/action";
|
14529
14626
|
import { ListModel } from "list";
|
14530
14627
|
import { PageModel } from "page";
|
14628
|
+
import { PanelModelBase } from "panel";
|
14531
14629
|
import { PopupModel } from "popup";
|
14532
14630
|
import { SurveyModel } from "survey";
|
14533
14631
|
export function tryNavigateToPage(survey: SurveyModel, page: PageModel): boolean;
|
14632
|
+
export function tryFocusPage(survey: SurveyModel, panel: PanelModelBase): boolean;
|
14534
14633
|
export function createTOCListModel(survey: SurveyModel, onAction?: () => void): ListModel<Action>;
|
14535
14634
|
export function getTocRootCss(survey: SurveyModel, isMobile?: boolean): string;
|
14536
14635
|
export class TOCModel {
|
@@ -14630,12 +14729,25 @@ declare module "popup-survey" {
|
|
14630
14729
|
*/
|
14631
14730
|
collapse(): void;
|
14632
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);
|
14633
14744
|
get css(): any;
|
14634
14745
|
get cssButton(): string;
|
14635
14746
|
get cssRoot(): string;
|
14636
14747
|
get cssBody(): string;
|
14637
14748
|
get cssHeaderRoot(): string;
|
14638
14749
|
get cssHeaderTitle(): string;
|
14750
|
+
get cssHeaderButton(): string;
|
14639
14751
|
get renderedWidth(): string;
|
14640
14752
|
width: string;
|
14641
14753
|
private updateCss;
|
@@ -14986,6 +15098,7 @@ declare module "question_custom" {
|
|
14986
15098
|
private getValueForContentPanel;
|
14987
15099
|
private setNewValueIntoQuestion;
|
14988
15100
|
addConditionObjectsByContext(objects: Array<IConditionObject>, context: any): void;
|
15101
|
+
protected collectNestedQuestionsCore(questions: Question[], visibleOnly: boolean): void;
|
14989
15102
|
protected convertDataValue(name: string, newValue: any): any;
|
14990
15103
|
protected setQuestionValue(newValue: any, updateIsAnswered?: boolean): void;
|
14991
15104
|
private setValuesIntoQuestions;
|
@@ -15109,7 +15222,7 @@ declare module "popup-modal-view-model" {
|
|
15109
15222
|
declare module "popup-utils" {
|
15110
15223
|
import { IDialogOptions, PopupModel } from "popup";
|
15111
15224
|
import { PopupBaseViewModel } from "popup-view-model";
|
15112
|
-
export function createPopupModalViewModel(options: IDialogOptions,
|
15225
|
+
export function createPopupModalViewModel(options: IDialogOptions, rootElement?: HTMLElement): PopupBaseViewModel;
|
15113
15226
|
export function createPopupViewModel(model: PopupModel, targetElement?: HTMLElement): PopupBaseViewModel;
|
15114
15227
|
}
|
15115
15228
|
declare module "question_buttongroup" {
|
@@ -20865,18 +20978,23 @@ declare module "localization/turkish" {
|
|
20865
20978
|
noneItemText: string;
|
20866
20979
|
selectAllItemText: string;
|
20867
20980
|
progressText: string;
|
20981
|
+
indexText: string;
|
20868
20982
|
panelDynamicProgressText: string;
|
20983
|
+
panelDynamicTabTextFormat: string;
|
20869
20984
|
questionsProgressText: string;
|
20870
20985
|
emptySurvey: string;
|
20871
20986
|
completingSurvey: string;
|
20872
20987
|
completingSurveyBefore: string;
|
20873
20988
|
loadingSurvey: string;
|
20874
20989
|
placeholder: string;
|
20990
|
+
ratingOptionsCaption: string;
|
20875
20991
|
value: string;
|
20876
20992
|
requiredError: string;
|
20877
20993
|
requiredErrorInPanel: string;
|
20878
20994
|
requiredInAllRowsError: string;
|
20879
20995
|
numericError: string;
|
20996
|
+
minError: string;
|
20997
|
+
maxError: string;
|
20880
20998
|
textMinLength: string;
|
20881
20999
|
textMaxLength: string;
|
20882
21000
|
textMinMaxLength: string;
|
@@ -20896,16 +21014,19 @@ declare module "localization/turkish" {
|
|
20896
21014
|
loadingFile: string;
|
20897
21015
|
chooseFile: string;
|
20898
21016
|
noFileChosen: string;
|
21017
|
+
fileDragAreaPlaceholder: string;
|
20899
21018
|
confirmDelete: string;
|
20900
21019
|
keyDuplicationError: string;
|
20901
21020
|
addColumn: string;
|
20902
21021
|
addRow: string;
|
20903
21022
|
removeRow: string;
|
21023
|
+
emptyRowsText: string;
|
20904
21024
|
addPanel: string;
|
20905
21025
|
removePanel: string;
|
20906
21026
|
choices_Item: string;
|
20907
21027
|
matrix_column: string;
|
20908
21028
|
matrix_row: string;
|
21029
|
+
multipletext_itemname: string;
|
20909
21030
|
savingData: string;
|
20910
21031
|
savingDataError: string;
|
20911
21032
|
savingDataSuccess: string;
|
@@ -20919,6 +21040,7 @@ declare module "localization/turkish" {
|
|
20919
21040
|
timerLimitPage: string;
|
20920
21041
|
timerLimitSurvey: string;
|
20921
21042
|
clearCaption: string;
|
21043
|
+
signaturePlaceHolder: string;
|
20922
21044
|
chooseFileCaption: string;
|
20923
21045
|
removeFileCaption: string;
|
20924
21046
|
booleanCheckedLabel: string;
|
@@ -20926,6 +21048,16 @@ declare module "localization/turkish" {
|
|
20926
21048
|
confirmRemoveFile: string;
|
20927
21049
|
confirmRemoveAllFiles: string;
|
20928
21050
|
questionTitlePatternText: string;
|
21051
|
+
modalCancelButtonText: string;
|
21052
|
+
modalApplyButtonText: string;
|
21053
|
+
filterStringPlaceholder: string;
|
21054
|
+
emptyMessage: string;
|
21055
|
+
noEntriesText: string;
|
21056
|
+
noEntriesReadonlyText: string;
|
21057
|
+
more: string;
|
21058
|
+
tagboxDoneButtonCaption: string;
|
21059
|
+
selectToRankEmptyRankedAreaText: string;
|
21060
|
+
selectToRankEmptyUnrankedAreaText: string;
|
20929
21061
|
};
|
20930
21062
|
}
|
20931
21063
|
declare module "localization/ukrainian" {
|
@@ -21433,7 +21565,7 @@ declare module "react/components/popup/popup" {
|
|
21433
21565
|
protected renderHeaderPopup(popupModel: PopupBaseViewModel): JSX.Element | null;
|
21434
21566
|
}
|
21435
21567
|
export function showModal(componentName: string, data: any, onApply: () => boolean, onCancel?: () => void, cssClass?: string, title?: string, displayMode?: "popup" | "overlay"): PopupBaseViewModel;
|
21436
|
-
export function showDialog(dialogOptions: IDialogOptions,
|
21568
|
+
export function showDialog(dialogOptions: IDialogOptions, rootElement?: HTMLElement): PopupBaseViewModel;
|
21437
21569
|
}
|
21438
21570
|
declare module "react/components/action-bar/action-bar-item-dropdown" {
|
21439
21571
|
import { SurveyActionBarItem } from "react/components/action-bar/action-bar-item";
|
@@ -21731,6 +21863,7 @@ declare module "react/components/survey-header/survey-header" {
|
|
21731
21863
|
constructor(props: ISurveyHeaderProps);
|
21732
21864
|
private get survey();
|
21733
21865
|
private get css();
|
21866
|
+
private rootRef;
|
21734
21867
|
componentDidMount(): void;
|
21735
21868
|
componentWillUnmount(): void;
|
21736
21869
|
private renderTitle;
|