survey-creator-core 1.9.36 → 1.9.39
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/package.json +1 -1
- package/survey-creator-core.css +58 -20
- package/survey-creator-core.d.ts +510 -225
- package/survey-creator-core.i18n.js +1 -1
- package/survey-creator-core.i18n.min.js +1 -1
- package/survey-creator-core.js +898 -326
- package/survey-creator-core.min.css +7 -7
- package/survey-creator-core.min.js +3 -3
package/survey-creator-core.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Type definition for Survey Creatorlibrary. Platform independent (core) v1.9.
|
|
2
|
+
* Type definition for Survey Creatorlibrary. Platform independent (core) v1.9.39
|
|
3
3
|
* Copyright (c) 2015-2022 Devsoft Baltic OÜ - https://surveyjs.io/
|
|
4
4
|
* License: https://surveyjs.io/Licenses#SurveyCreator
|
|
5
5
|
*/
|
|
@@ -7,11 +7,11 @@ import { Base, JsonObjectProperty, Question, SurveyModel, ItemValue } from "surv
|
|
|
7
7
|
import { MatrixDropdownColumn, IAction, Action, ActionContainer, DragDropSurveyElements } from "survey-core";
|
|
8
8
|
import { DragDropChoices, Event, AdaptiveActionContainer, PageModel, IElement } from "survey-core";
|
|
9
9
|
import { IPanel, ISurveyElement, SurveyElement, QuestionSelectBase, QuestionRowModel } from "survey-core";
|
|
10
|
-
import { LocalizableString, DragOrClickHelper, PanelModel, QuestionDropdownModel
|
|
11
|
-
import { PopupModel, EventBase, PanelModelBase, QuestionNonValue
|
|
12
|
-
import { QuestionRatingModel, ComputedUpdater, QuestionCheckboxModel, ILocalizableString
|
|
13
|
-
import { ImageItemValue, HashTable, QuestionMatrixDynamicModel, QuestionMatrixModel
|
|
14
|
-
import { QuestionPanelDynamicModel, QuestionCommentModel, MatrixDynamicRowModel } from "survey-core";
|
|
10
|
+
import { LocalizableString, Operand, DragOrClickHelper, PanelModel, QuestionDropdownModel } from "survey-core";
|
|
11
|
+
import { ListModel, PopupModel, EventBase, PanelModelBase, QuestionNonValue } from "survey-core";
|
|
12
|
+
import { SurveyTemplateRendererTemplateData, QuestionRatingModel, ComputedUpdater, QuestionCheckboxModel, ILocalizableString } from "survey-core";
|
|
13
|
+
import { ArrayChanges, ImageItemValue, HashTable, QuestionMatrixDynamicModel, QuestionMatrixModel } from "survey-core";
|
|
14
|
+
import { QuestionMatrixDropdownModel, QuestionPanelDynamicModel, QuestionCommentModel, MatrixDynamicRowModel } from "survey-core";
|
|
15
15
|
|
|
16
16
|
export { editorLocalization as localization };
|
|
17
17
|
|
|
@@ -64,41 +64,211 @@ export interface ISurveyCreatorOptions {
|
|
|
64
64
|
onConditionGetTitleCallback(expression: string, title: string): string;
|
|
65
65
|
}
|
|
66
66
|
/*
|
|
67
|
-
* Creator
|
|
67
|
+
* Survey Creator configuration. Pass it as an argument to the `SurveyCreator` constructor:
|
|
68
|
+
*
|
|
69
|
+
* ```js
|
|
70
|
+
* const creator = new SurveyCreator.SurveyCreator(creatorOptions);
|
|
71
|
+
* ```
|
|
68
72
|
*/
|
|
69
73
|
export interface ICreatorOptions {
|
|
74
|
+
/*
|
|
75
|
+
* Specifies whether to display the Designer tab.
|
|
76
|
+
*
|
|
77
|
+
* Default value: `true`
|
|
78
|
+
*/
|
|
70
79
|
showDesignerTab?: boolean;
|
|
80
|
+
/*
|
|
81
|
+
* Specifies whether to display the Preview tab.
|
|
82
|
+
*
|
|
83
|
+
* Default value: `true`
|
|
84
|
+
*/
|
|
71
85
|
showPreviewTab?: boolean;
|
|
86
|
+
/*
|
|
87
|
+
* Specifies whether to display the JSON Editor tab.
|
|
88
|
+
*
|
|
89
|
+
* Default value: `true`
|
|
90
|
+
*/
|
|
72
91
|
showJSONEditorTab?: boolean;
|
|
92
|
+
/*
|
|
93
|
+
* Specifies whether to display the Logic tab.
|
|
94
|
+
*
|
|
95
|
+
* Default value: `false`
|
|
96
|
+
*/
|
|
73
97
|
showLogicTab?: boolean;
|
|
98
|
+
/*
|
|
99
|
+
* Specifies whether to display the Embed Survey tab.
|
|
100
|
+
*
|
|
101
|
+
* Default value: `false`
|
|
102
|
+
*/
|
|
74
103
|
showEmbeddedSurveyTab?: boolean;
|
|
104
|
+
/*
|
|
105
|
+
* Specifies whether to display the Translation tab.
|
|
106
|
+
*
|
|
107
|
+
* Default value: `false`
|
|
108
|
+
*/
|
|
75
109
|
showTranslationTab?: boolean;
|
|
110
|
+
/*
|
|
111
|
+
* Removes the Free Trial bar.
|
|
112
|
+
*
|
|
113
|
+
* Default value: `false`
|
|
114
|
+
*
|
|
115
|
+
* **IMPORTANT**: You can enable this property only if you have a Survey Creator commercial license. It is illegal to enable this property without a license.
|
|
116
|
+
*/
|
|
76
117
|
haveCommercialLicense?: boolean;
|
|
118
|
+
/*
|
|
119
|
+
* Specifies whether to call the [saveSurveyFunc](https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#saveSurveyFunc) each time survey settings are changed.
|
|
120
|
+
*
|
|
121
|
+
* Default value: `false`
|
|
122
|
+
*/
|
|
77
123
|
isAutoSave?: boolean;
|
|
78
|
-
|
|
79
|
-
|
|
124
|
+
/*
|
|
125
|
+
* Specifies whether to enable support for right-to-left languages.
|
|
126
|
+
*
|
|
127
|
+
* Default value: `false`
|
|
128
|
+
*/
|
|
129
|
+
isRTL?: boolean;
|
|
130
|
+
/*
|
|
131
|
+
* Specifies whether users can see and edit the survey title and related survey properties.
|
|
132
|
+
*
|
|
133
|
+
* Default value: `true`
|
|
134
|
+
*/
|
|
135
|
+
showSurveyTitle?: boolean;
|
|
136
|
+
/*
|
|
137
|
+
* Specifies whether users can edit expressions in the Logic tab as plain text.
|
|
138
|
+
*
|
|
139
|
+
* If you set this property to `false`, users can only use UI elements to edit logical expressions.
|
|
140
|
+
*
|
|
141
|
+
* Default value: `true`
|
|
142
|
+
*/
|
|
80
143
|
allowEditExpressionsInTextEditor?: boolean;
|
|
81
|
-
|
|
144
|
+
/*
|
|
145
|
+
* Specifies whether to display question titles instead of names when users edit logical expressions.
|
|
146
|
+
*
|
|
147
|
+
* Default value: `false`
|
|
148
|
+
*/
|
|
82
149
|
showTitlesInExpressions?: boolean;
|
|
83
|
-
|
|
150
|
+
/*
|
|
151
|
+
* Specifies whether to show an error message if a survey is not saved in the database.
|
|
152
|
+
*
|
|
153
|
+
* Default value: `true`
|
|
154
|
+
*/
|
|
84
155
|
showErrorOnFailedSave?: boolean;
|
|
156
|
+
/*
|
|
157
|
+
* Specifies whether the Survey Creator generates the survey definition as a valid JSON object or JavaScript object.
|
|
158
|
+
*
|
|
159
|
+
* Default value: `true`
|
|
160
|
+
*
|
|
161
|
+
* Refer to the following MDN topic for information on differences between JSON and JavaScript objects: [JavaScript and JSON Differences](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON#javascript_and_json_differences)
|
|
162
|
+
*/
|
|
85
163
|
generateValidJSON?: boolean;
|
|
164
|
+
/*
|
|
165
|
+
* Enables the read-only mode. If you set this property to `true`, users cannot change the initial survey configuration.
|
|
166
|
+
*
|
|
167
|
+
* Default value: `false`
|
|
168
|
+
*/
|
|
86
169
|
readOnly?: boolean;
|
|
87
|
-
|
|
170
|
+
/*
|
|
171
|
+
* Specifies whether to show the page selector at the bottom of the Preview tab.
|
|
172
|
+
*
|
|
173
|
+
* Default value: `true`
|
|
174
|
+
*/
|
|
88
175
|
showPagesInPreviewTab?: boolean;
|
|
89
|
-
|
|
176
|
+
/*
|
|
177
|
+
* A [UI theme](https://surveyjs.io/Documentation/Library?id=get-started-react#configure-styles) used to display the survey in the Preview tab.
|
|
178
|
+
*
|
|
179
|
+
* Accepted values: `"modern"`, `"default"`, `"defaultV2"`
|
|
180
|
+
*
|
|
181
|
+
* Default value: `"defaultV2"`
|
|
182
|
+
*/
|
|
90
183
|
themeForPreview?: string;
|
|
184
|
+
/*
|
|
185
|
+
* Specifies whether the Preview tab displays the Device button that allows users to preview the survey on different device types.
|
|
186
|
+
*
|
|
187
|
+
* Default value: `true`
|
|
188
|
+
*/
|
|
91
189
|
showSimulatorInPreviewTab?: boolean;
|
|
190
|
+
/*
|
|
191
|
+
* Specifies whether the Preview tab displays the language selector.
|
|
192
|
+
*
|
|
193
|
+
* Accepted values:
|
|
194
|
+
*
|
|
195
|
+
* - `"auto"` (default)
|
|
196
|
+
* Display the language selector only if the survey is translated to more than one language.
|
|
197
|
+
*
|
|
198
|
+
* - `true`
|
|
199
|
+
* Always display the language selector regardless of how many languages are used in the survey.
|
|
200
|
+
*
|
|
201
|
+
* - `false`
|
|
202
|
+
* Never display the language selector.
|
|
203
|
+
*
|
|
204
|
+
* - `"all"`
|
|
205
|
+
* Always display the language selector with [all supported languages](https://github.com/surveyjs/survey-creator/tree/master/packages/survey-creator-core/src/localization).
|
|
206
|
+
*
|
|
207
|
+
* **See also**: [Localization & Globalization](https://surveyjs.io/Documentation/Survey-Creator?id=localization)
|
|
208
|
+
*/
|
|
92
209
|
showDefaultLanguageInPreviewTab?: string | boolean;
|
|
210
|
+
/*
|
|
211
|
+
* Specifies whether the Preview tab displays a checkbox that allows users to show or hide invisible survey elements.
|
|
212
|
+
*
|
|
213
|
+
* Default value: `true`
|
|
214
|
+
*/
|
|
93
215
|
showInvisibleElementsInPreviewTab?: boolean;
|
|
216
|
+
/*
|
|
217
|
+
* Specifies whether UI elements display survey, page, and question titles instead of their names.
|
|
218
|
+
*
|
|
219
|
+
* Default value: `false`
|
|
220
|
+
*/
|
|
94
221
|
showObjectTitles?: boolean;
|
|
222
|
+
/*
|
|
223
|
+
* Specifies whether the design surface displays the survey title and description when the survey does not contain any elements.
|
|
224
|
+
*
|
|
225
|
+
* Default value: `false`
|
|
226
|
+
*/
|
|
95
227
|
showHeaderInEmptySurvey?: boolean;
|
|
228
|
+
/*
|
|
229
|
+
* Specifies whether users can add, edit, and delete survey pages.
|
|
230
|
+
*
|
|
231
|
+
* Default value: `true`
|
|
232
|
+
*/
|
|
96
233
|
allowModifyPages?: boolean;
|
|
234
|
+
/*
|
|
235
|
+
* Limits the number of columns that users can add to [Matrix](https://surveyjs.io/Documentation/Library?id=questionmatrixmodel), [Matrix Dynamic](https://surveyjs.io/Documentation/Library?id=questionmatrixdynamicmodel), and [Matrix Dropdown](https://surveyjs.io/Documentation/Library?id=questionmatrixdropdownmodel) questions.
|
|
236
|
+
*
|
|
237
|
+
* Default value: 0 (unlimited, taken from `settings.propertyGrid.maximumColumnsCount`)
|
|
238
|
+
*/
|
|
97
239
|
maximumColumnsCount?: number;
|
|
240
|
+
/*
|
|
241
|
+
* Limits the number of choices that users can add to [Checkbox](https://surveyjs.io/Documentation/Library?id=questioncheckboxmodel), [Dropdown](https://surveyjs.io/Documentation/Library?id=questiondropdownmodel), and [Radiogroup](https://surveyjs.io/Documentation/Library?id=questionradiogroupmodel) questions.
|
|
242
|
+
*
|
|
243
|
+
* Default value: 0 (unlimited, taken from `settings.propertyGrid.maximumChoicesCount`)
|
|
244
|
+
*/
|
|
98
245
|
maximumChoicesCount?: number;
|
|
246
|
+
/*
|
|
247
|
+
* Limits the number of rows that users can add to [Matrix](https://surveyjs.io/Documentation/Library?id=questionmatrixmodel) and [Matrix Dropdown](https://surveyjs.io/Documentation/Library?id=questionmatrixdropdownmodel) questions.
|
|
248
|
+
*
|
|
249
|
+
* Default value: 0 (unlimited, taken from `settings.propertyGrid.maximumRowsCount`)
|
|
250
|
+
*/
|
|
99
251
|
maximumRowsCount?: number;
|
|
252
|
+
/*
|
|
253
|
+
* Limits the number of rate value that users can add to [Rating](https://surveyjs.io/Documentation/Library?id=questionratingmodel) questions.
|
|
254
|
+
*
|
|
255
|
+
* Default value: 0 (unlimited, taken from `settings.propertyGrid.maximumRateValues`)
|
|
256
|
+
*/
|
|
100
257
|
maximumRateValues?: number;
|
|
258
|
+
/*
|
|
259
|
+
* Limits the number of items in a logical expression.
|
|
260
|
+
*
|
|
261
|
+
* Default value: -1 (unlimited)
|
|
262
|
+
*/
|
|
101
263
|
maxLogicItemsInCondition?: number;
|
|
264
|
+
/*
|
|
265
|
+
* Specifies whether users can switch between UI themes in the Preview tab.
|
|
266
|
+
*
|
|
267
|
+
* Default value: `true`
|
|
268
|
+
*
|
|
269
|
+
* [View the "Switch Between Themes" demo](https://surveyjs.io/Examples/Creator?id=theme-switcher)
|
|
270
|
+
*/
|
|
271
|
+
allowChangeThemeInPreview?: boolean;
|
|
102
272
|
}
|
|
103
273
|
/*
|
|
104
274
|
* The Toolbox item description.
|
|
@@ -301,11 +471,15 @@ export declare class CreatorAction extends Action implements ICreatorAction {
|
|
|
301
471
|
export declare class CreatorBase extends Base implements ISurveyCreatorOptions, ICreatorSelectionOwner {
|
|
302
472
|
constructor(options: ICreatorOptions, options2?: ICreatorOptions);
|
|
303
473
|
/*
|
|
304
|
-
*
|
|
474
|
+
* Specifies whether to display the Designer tab.
|
|
475
|
+
*
|
|
476
|
+
* Default value: `true`
|
|
305
477
|
*/
|
|
306
478
|
showDesignerTab: boolean;
|
|
307
479
|
/*
|
|
308
|
-
*
|
|
480
|
+
* Specifies whether to display the JSON Editor tab.
|
|
481
|
+
*
|
|
482
|
+
* Default value: `true`
|
|
309
483
|
*/
|
|
310
484
|
showJSONEditorTab: boolean;
|
|
311
485
|
/*
|
|
@@ -313,20 +487,28 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
313
487
|
*/
|
|
314
488
|
showTestSurveyTab: boolean;
|
|
315
489
|
/*
|
|
316
|
-
*
|
|
490
|
+
* Specifies whether to display the Preview tab.
|
|
491
|
+
*
|
|
492
|
+
* Default value: `true`
|
|
317
493
|
*/
|
|
318
494
|
get showPreviewTab(): boolean;
|
|
319
495
|
set showPreviewTab(val: boolean);
|
|
320
496
|
/*
|
|
321
|
-
*
|
|
497
|
+
* Specifies whether to display the Embed Survey tab.
|
|
498
|
+
*
|
|
499
|
+
* Default value: `false`
|
|
322
500
|
*/
|
|
323
501
|
showEmbeddedSurveyTab: boolean;
|
|
324
502
|
/*
|
|
325
|
-
*
|
|
503
|
+
* Specifies whether to display the Translation tab.
|
|
504
|
+
*
|
|
505
|
+
* Default value: `false`
|
|
326
506
|
*/
|
|
327
507
|
showTranslationTab: boolean;
|
|
328
508
|
/*
|
|
329
|
-
*
|
|
509
|
+
* Specifies whether to display the Logic tab.
|
|
510
|
+
*
|
|
511
|
+
* Default value: `false`
|
|
330
512
|
*/
|
|
331
513
|
showLogicTab: boolean;
|
|
332
514
|
useTableViewInLogicTab: boolean;
|
|
@@ -339,19 +521,30 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
339
521
|
*/
|
|
340
522
|
inplaceEditForValues: boolean;
|
|
341
523
|
/*
|
|
342
|
-
*
|
|
524
|
+
* Obsolete. Use the [`showSurveyTitle`](https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#showSurveyTitle) property instead.
|
|
343
525
|
*/
|
|
344
526
|
get allowEditSurveyTitle(): boolean;
|
|
345
527
|
set allowEditSurveyTitle(val: boolean);
|
|
346
528
|
/*
|
|
347
|
-
*
|
|
348
|
-
*
|
|
349
|
-
*
|
|
529
|
+
* Specifies whether users can see and edit the survey title and related survey properties.
|
|
530
|
+
*
|
|
531
|
+
* Default value: `true`
|
|
532
|
+
*/
|
|
533
|
+
get showSurveyTitle(): boolean;
|
|
534
|
+
set showSurveyTitle(val: boolean);
|
|
535
|
+
/*
|
|
536
|
+
* Removes the Free Trial bar.
|
|
537
|
+
*
|
|
538
|
+
* Default value: `false`
|
|
539
|
+
*
|
|
540
|
+
* **IMPORTANT**: You can enable this property only if you have a Survey Creator commercial license. It is illegal to enable this property without a license.
|
|
350
541
|
*/
|
|
351
542
|
haveCommercialLicense: boolean;
|
|
352
543
|
get licenseText(): string;
|
|
353
544
|
/*
|
|
354
|
-
*
|
|
545
|
+
* Specifies whether to call the [saveSurveyFunc](https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#saveSurveyFunc) each time survey settings are changed.
|
|
546
|
+
*
|
|
547
|
+
* Default value: `false`
|
|
355
548
|
*/
|
|
356
549
|
isAutoSave: boolean;
|
|
357
550
|
showOptions: boolean;
|
|
@@ -405,44 +598,45 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
405
598
|
getPlugin<P extends ICreatorPlugin = ICreatorPlugin>(name: string): any;
|
|
406
599
|
/*
|
|
407
600
|
* The event is called on deleting an element (question/panel/page) from the survey. Typically, when a user click the delete from the element menu.
|
|
408
|
-
* sender the survey creator object that fires the event
|
|
409
|
-
* options.element an instance of the deleting element
|
|
410
|
-
* options.elementType the type of the element: 'question', 'panel' or 'page'.
|
|
411
|
-
* options.allowing set it to false to cancel the element deleting
|
|
601
|
+
* - sender the survey creator object that fires the event
|
|
602
|
+
* - options.element an instance of the deleting element
|
|
603
|
+
* - options.elementType the type of the element: 'question', 'panel' or 'page'.
|
|
604
|
+
* - options.allowing set it to false to cancel the element deleting
|
|
412
605
|
*/
|
|
413
606
|
onElementDeleting: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
414
607
|
/*
|
|
415
608
|
* The event is called on setting a readOnly property of the property editor. By default the property.readOnly property is used.
|
|
416
609
|
* You may changed it and make the property editor read only or enabled for a particular object.
|
|
417
|
-
* sender the survey creator object that fires the event
|
|
418
|
-
* options.obj the survey object, Survey, Page, Panel or Question
|
|
419
|
-
* options.property the object property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties.
|
|
420
|
-
* options.readOnly a boolean value. It has value equals to options.readOnly property by default. You may change it.
|
|
421
|
-
* options.parentObj the parent object. It is null for non-nested properties. It is not null for itemvalue or column objects. The parent object is a question (dropdown, radigroup, checkbox, matrices and so on).
|
|
422
|
-
* options.parentProperty the parent property (Survey.JsonObjectProperty object). It is null for non-nested properties. It is not null for itemvalue or column objects. The parent object is choices, columns, rows, triggers and so on.
|
|
610
|
+
* - sender the survey creator object that fires the event
|
|
611
|
+
* - options.obj the survey object, Survey, Page, Panel or Question
|
|
612
|
+
* - options.property the object property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties.
|
|
613
|
+
* - options.readOnly a boolean value. It has value equals to options.readOnly property by default. You may change it.
|
|
614
|
+
* - options.parentObj the parent object. It is null for non-nested properties. It is not null for itemvalue or column objects. The parent object is a question (dropdown, radigroup, checkbox, matrices and so on).
|
|
615
|
+
* - options.parentProperty the parent property (Survey.JsonObjectProperty object). It is null for non-nested properties. It is not null for itemvalue or column objects. The parent object is choices, columns, rows, triggers and so on.
|
|
423
616
|
*/
|
|
424
617
|
onGetPropertyReadOnly: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
425
618
|
/*
|
|
426
619
|
* The event is fired when the survey creator creates a survey object (Survey.Survey).
|
|
427
|
-
* sender the survey creator object that fires the event
|
|
428
|
-
* options.survey the survey object showing in the creator.
|
|
429
|
-
* options.reason indicates what component of the creator requests the survey. There are several reason types: "designer" - survey for designer survey, "test" - survey for "Preview" tab and "conditionEditor", "defaultValueEditor", "restfulEditor" - surveys for different property editors.
|
|
620
|
+
* - sender the survey creator object that fires the event
|
|
621
|
+
* - options.survey the survey object showing in the creator.
|
|
622
|
+
* - options.reason indicates what component of the creator requests the survey. There are several reason types: "designer" - survey for designer survey, "test" - survey for "Preview" tab and "conditionEditor", "defaultValueEditor", "restfulEditor" - surveys for different property editors.
|
|
430
623
|
*/
|
|
431
624
|
onSurveyInstanceCreated: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
432
625
|
/*
|
|
433
626
|
* The event allows to display the custom name for objects: questions, pages and panels. By default the object name is using. You may show object title by setting showObjectTitles property to true.
|
|
434
627
|
* Use this event, if you want custom display name for objects.
|
|
435
|
-
* sender the survey creator object that fires the event
|
|
436
|
-
* options.obj the survey object, Survey, Page, Panel or Question
|
|
437
|
-
* options.reason the name of the UI that requests the object display name.
|
|
438
|
-
* options.displayName change this property to show your custom display name for the object
|
|
628
|
+
* - sender the survey creator object that fires the event
|
|
629
|
+
* - options.obj the survey object, Survey, Page, Panel or Question
|
|
630
|
+
* - options.reason the name of the UI that requests the object display name.
|
|
631
|
+
* - options.displayName change this property to show your custom display name for the object
|
|
632
|
+
*
|
|
439
633
|
* The list of possible values in options.reason:
|
|
440
|
-
* "condition" - raised from Condition modal window or on setup condition in a logic tab
|
|
441
|
-
* "survey-tester" - raised from page selector list in "Preview" tab
|
|
442
|
-
* "survey-tester-selected" - raised on setting page selector title in "Preview" tab
|
|
443
|
-
* "survey-translation" - raised from translation tab
|
|
444
|
-
* "property-grid" - raised from showing object selector for property grid in "Designer" tab.
|
|
445
|
-
* "property-grid-title" - raised on rendering selected object title in property grid in "Designer" tab.
|
|
634
|
+
* - "condition" - raised from Condition modal window or on setup condition in a logic tab
|
|
635
|
+
* - "survey-tester" - raised from page selector list in "Preview" tab
|
|
636
|
+
* - "survey-tester-selected" - raised on setting page selector title in "Preview" tab
|
|
637
|
+
* - "survey-translation" - raised from translation tab
|
|
638
|
+
* - "property-grid" - raised from showing object selector for property grid in "Designer" tab.
|
|
639
|
+
* - "property-grid-title" - raised on rendering selected object title in property grid in "Designer" tab.
|
|
446
640
|
*/
|
|
447
641
|
onGetObjectDisplayName: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
448
642
|
/*
|
|
@@ -477,19 +671,19 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
477
671
|
onElementAllowOperations: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
478
672
|
/*
|
|
479
673
|
* Use this event to add/remove/modify the element (question/panel) menu items.
|
|
480
|
-
* sender the survey creator object that fires the event
|
|
481
|
-
* options.obj the survey object which property is edited in the Property Editor.
|
|
482
|
-
* options.items the list of menu items. It has two required fields: text and onClick: function(obj: Survey.Base) {} and optional name field.
|
|
674
|
+
* - sender the survey creator object that fires the event
|
|
675
|
+
* - options.obj the survey object which property is edited in the Property Editor.
|
|
676
|
+
* - options.items the list of menu items. It has two required fields: text and onClick: function(obj: Survey.Base) {} and optional name field.
|
|
483
677
|
*/
|
|
484
678
|
onDefineElementMenuItems: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
485
679
|
/*
|
|
486
680
|
* The event is called before showing a property in the Properties Grid or in the Question Editor.
|
|
487
|
-
* sender the survey creator object that fires the event
|
|
488
|
-
* options.obj the survey object, Survey, Page, Panel or Question
|
|
489
|
-
* options.property the object property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties.
|
|
490
|
-
* options.canShow a boolean value. It is true by default. Set it false to hide the property from the Properties Grid and in the Question Editor.
|
|
491
|
-
* options.parentObj the parent object. It is null for non-nested properties. It is not null for itemvalue or column objects. The parent object is a question (dropdown, radigroup, checkbox, matrices and so on).
|
|
492
|
-
* options.parentProperty the parent property (Survey.JsonObjectProperty object). It is null for non-nested properties. It is not null for itemvalue or column objects. The parent object is choices, columns, rows, triggers and so on.
|
|
681
|
+
* - sender the survey creator object that fires the event
|
|
682
|
+
* - options.obj the survey object, Survey, Page, Panel or Question
|
|
683
|
+
* - options.property the object property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties.
|
|
684
|
+
* - options.canShow a boolean value. It is true by default. Set it false to hide the property from the Properties Grid and in the Question Editor.
|
|
685
|
+
* - options.parentObj the parent object. It is null for non-nested properties. It is not null for itemvalue or column objects. The parent object is a question (dropdown, radigroup, checkbox, matrices and so on).
|
|
686
|
+
* - options.parentProperty the parent property (Survey.JsonObjectProperty object). It is null for non-nested properties. It is not null for itemvalue or column objects. The parent object is choices, columns, rows, triggers and so on.
|
|
493
687
|
*
|
|
494
688
|
* [Example: Hide a category in the Properties Grid](https://surveyjs.io/Examples/Survey-Creator?id=hidecategoryinpropertiesgrid)
|
|
495
689
|
*/
|
|
@@ -498,106 +692,106 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
498
692
|
/*
|
|
499
693
|
* The event is called after a survey that represents the Property Grid is created and all its questions (property editors) are setup.
|
|
500
694
|
* You can use this event to modify this survey to change the property grid behavior
|
|
501
|
-
* options.obj the survey object that is currently editing in the property grid
|
|
502
|
-
* options.survey the property grid survey
|
|
695
|
+
* - options.obj the survey object that is currently editing in the property grid
|
|
696
|
+
* - options.survey the property grid survey
|
|
503
697
|
*/
|
|
504
698
|
onPropertyGridSurveyCreated: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
505
699
|
/*
|
|
506
700
|
* The event is called after a property editor (in fact a survey question) has been created and all it's properties have been assign.
|
|
507
701
|
* You can use this event to modify the property editor properties or set event handlers to customize it's behavior
|
|
508
|
-
* options.obj the survey object that is currently editing in the property grid
|
|
509
|
-
* options.property the property that the current property editor is editing
|
|
510
|
-
* options.editor the property editor. In fact it is a survey question. We are using a heavily customizable survey as a property grid in Creator V2. It means that every property editor is a question.
|
|
702
|
+
* - options.obj the survey object that is currently editing in the property grid
|
|
703
|
+
* - options.property the property that the current property editor is editing
|
|
704
|
+
* - options.editor the property editor. In fact it is a survey question. We are using a heavily customizable survey as a property grid in Creator V2. It means that every property editor is a question.
|
|
511
705
|
*/
|
|
512
706
|
onPropertyEditorCreated: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
513
707
|
/*
|
|
514
708
|
* The event is called after a property editor setups its title actions.
|
|
515
709
|
* You can use this event to modify the property editor title actions
|
|
516
|
-
* options.obj the survey object that is currently editing in the property grid
|
|
517
|
-
* options.property the property that the current property editor is editing
|
|
518
|
-
* options.editor the property editor. In fact it is a survey question. We are using a heavily customizable survey as a property grid in Creator V2. It means that every property editor is a question.
|
|
519
|
-
* options.titleActions the list of title actions.
|
|
710
|
+
* - options.obj the survey object that is currently editing in the property grid
|
|
711
|
+
* - options.property the property that the current property editor is editing
|
|
712
|
+
* - options.editor the property editor. In fact it is a survey question. We are using a heavily customizable survey as a property grid in Creator V2. It means that every property editor is a question.
|
|
713
|
+
* - options.titleActions the list of title actions.
|
|
520
714
|
*/
|
|
521
715
|
onPropertyEditorUpdateTitleActions: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
522
716
|
/*
|
|
523
717
|
* The event is called before rendering a delete button in the Property Grid or in Question Editor.
|
|
524
718
|
* Obsolete, please use onCollectionItemAllowOperations
|
|
525
|
-
* sender the survey creator object that fires the event
|
|
526
|
-
* options.obj the survey Question
|
|
527
|
-
* options.item the object property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties
|
|
528
|
-
* options.canDelete a boolean value. It is true by default. Set it false to remove delete button from the Property Grid or in Question Editor
|
|
719
|
+
* - sender the survey creator object that fires the event
|
|
720
|
+
* - options.obj the survey Question
|
|
721
|
+
* - options.item the object property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties
|
|
722
|
+
* - options.canDelete a boolean value. It is true by default. Set it false to remove delete button from the Property Grid or in Question Editor
|
|
529
723
|
*/
|
|
530
724
|
onCanDeleteItem: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
531
725
|
/*
|
|
532
726
|
* The event is called on deleting a collection item from the Property Editor. For example: column in columns editor or item in choices and so on.
|
|
533
727
|
* Obsolete, please use onCollectionItemAllowOperations
|
|
534
|
-
* sender the survey creator object that fires the event
|
|
535
|
-
* options.obj the survey object: Question, Panel, Page or Survey
|
|
536
|
-
* options.property the collection property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties
|
|
537
|
-
* options.propertyName the collection property name
|
|
538
|
-
* options.collection the editing collection where deleting item is located. It is can be columns in the matrices or choices in dropdown question and so on.
|
|
539
|
-
* options.item the collection item that we are going to delete
|
|
540
|
-
* options.allowDelete a boolean value. It is true by default. Set it false to abondome the element removing from the collection
|
|
728
|
+
* - sender the survey creator object that fires the event
|
|
729
|
+
* - options.obj the survey object: Question, Panel, Page or Survey
|
|
730
|
+
* - options.property the collection property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties
|
|
731
|
+
* - options.propertyName the collection property name
|
|
732
|
+
* - options.collection the editing collection where deleting item is located. It is can be columns in the matrices or choices in dropdown question and so on.
|
|
733
|
+
* - options.item the collection item that we are going to delete
|
|
734
|
+
* - options.allowDelete a boolean value. It is true by default. Set it false to abondome the element removing from the collection
|
|
541
735
|
*/
|
|
542
736
|
onCollectionItemDeleting: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
543
737
|
/*
|
|
544
738
|
* The event is called before rendering a collection item from the Property Editor. For example: column in columns editor or item in choices and so on.
|
|
545
739
|
* You can make detail/edit and remove buttons invsible and/or disable editing.
|
|
546
|
-
* sender the survey creator object that fires the event
|
|
547
|
-
* options.obj the survey object: Question, Panel, Page or Survey
|
|
548
|
-
* options.property the collection property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties
|
|
549
|
-
* options.propertyName the collection property name
|
|
550
|
-
* options.collection the editing collection where deleting item is located. It is can be columns in the matrices or choices in dropdown question and so on.
|
|
551
|
-
* options.item the collection item that we are going to delete
|
|
552
|
-
* options.allowDelete a boolean value. It is true by default. Set it false to abondome the element removing from the collection
|
|
553
|
-
* options.allowEdit a boolean value. It is true by default. Set it false to disable editing.
|
|
740
|
+
* - sender the survey creator object that fires the event
|
|
741
|
+
* - options.obj the survey object: Question, Panel, Page or Survey
|
|
742
|
+
* - options.property the collection property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties
|
|
743
|
+
* - options.propertyName the collection property name
|
|
744
|
+
* - options.collection the editing collection where deleting item is located. It is can be columns in the matrices or choices in dropdown question and so on.
|
|
745
|
+
* - options.item the collection item that we are going to delete
|
|
746
|
+
* - options.allowDelete a boolean value. It is true by default. Set it false to abondome the element removing from the collection
|
|
747
|
+
* - options.allowEdit a boolean value. It is true by default. Set it false to disable editing.
|
|
554
748
|
*/
|
|
555
749
|
onCollectionItemAllowOperations: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
556
750
|
/*
|
|
557
751
|
* The event is called on adding a new Survey.ItemValue object. It uses as an element in choices array in Radiogroup, checkbox and dropdown questions or Matrix columns and rows properties.
|
|
558
752
|
* Use this event, to set ItemValue.value and ItemValue.text properties by default or set a value to the custom property.
|
|
559
|
-
* sender the survey creator object that fires the event
|
|
560
|
-
* options.obj the object that contains the itemsValues array, for example selector, rating and single choice matrix questions.
|
|
561
|
-
* options.propertyName the object property Name. It can be "choices" for selector questions or rateValues for rating question or columns/rows for single choice matrix.
|
|
562
|
-
* options.newItem a new created Survey.ItemValue object.
|
|
563
|
-
* options.itemValues an editing Survey.ItemValue array. newItem object is not added yet into this array.
|
|
753
|
+
* - sender the survey creator object that fires the event
|
|
754
|
+
* - options.obj the object that contains the itemsValues array, for example selector, rating and single choice matrix questions.
|
|
755
|
+
* - options.propertyName the object property Name. It can be "choices" for selector questions or rateValues for rating question or columns/rows for single choice matrix.
|
|
756
|
+
* - options.newItem a new created Survey.ItemValue object.
|
|
757
|
+
* - options.itemValues an editing Survey.ItemValue array. newItem object is not added yet into this array.
|
|
564
758
|
*/
|
|
565
759
|
onItemValueAdded: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
566
760
|
/*
|
|
567
761
|
* The event is called when a user adds a new column into MatrixDropdown or MatrixDynamic questions. Use it to set some properties of Survey.MatrixDropdownColumn by default, for example name or a custom property.
|
|
568
|
-
* sender the survey creator object that fires the event
|
|
569
|
-
* options.matrix a matrix question where column is located, matrix.columns.
|
|
570
|
-
* options.newColumn a new created Survey.MatrixDropdownColumn object.
|
|
571
|
-
* options.columns editable columns objects. They can be different from options.matrix.columns. options.columns and options.matrix.columns are equal after user press Apply or Cancel and options.columns will be set to options.matrix.columns or reset to initial state.
|
|
762
|
+
* - sender the survey creator object that fires the event
|
|
763
|
+
* - options.matrix a matrix question where column is located, matrix.columns.
|
|
764
|
+
* - options.newColumn a new created Survey.MatrixDropdownColumn object.
|
|
765
|
+
* - options.columns editable columns objects. They can be different from options.matrix.columns. options.columns and options.matrix.columns are equal after user press Apply or Cancel and options.columns will be set to options.matrix.columns or reset to initial state.
|
|
572
766
|
*/
|
|
573
767
|
onMatrixColumnAdded: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
574
768
|
/*
|
|
575
769
|
* Use this event to control Property Editors UI.
|
|
576
|
-
* sender the survey creator object that fires the event
|
|
577
|
-
* options.obj the survey object which property is edited in the Property Editor.
|
|
578
|
-
* options.propertyName the name of the edited property.
|
|
579
|
-
* options.editorOptions options that can be changed.
|
|
580
|
-
* options.editorOptions.allowAddRemoveItems a boolean property, true by default. Set it false to disable add/remove items in array properties. For example 'choices', 'columns', 'rows'.
|
|
581
|
-
* options.editorOptions.allowRemoveAllItems a boolean property, true by default. Set it false to disable remove all items in array properties. For example 'choices', 'columns', 'rows'.
|
|
582
|
-
* options.editorOptions.showTextView a boolean property, true by default. Set it false to disable "Manual Entry" tab for "choices" property.
|
|
583
|
-
* options.editorOptions.itemsEntryType a string property, 'form' by default. Set it 'fast' to show "Manual Entry" tab for "choices" property by default.
|
|
770
|
+
* - sender the survey creator object that fires the event
|
|
771
|
+
* - options.obj the survey object which property is edited in the Property Editor.
|
|
772
|
+
* - options.propertyName the name of the edited property.
|
|
773
|
+
* - options.editorOptions options that can be changed.
|
|
774
|
+
* - options.editorOptions.allowAddRemoveItems a boolean property, true by default. Set it false to disable add/remove items in array properties. For example 'choices', 'columns', 'rows'.
|
|
775
|
+
* - options.editorOptions.allowRemoveAllItems a boolean property, true by default. Set it false to disable remove all items in array properties. For example 'choices', 'columns', 'rows'.
|
|
776
|
+
* - options.editorOptions.showTextView a boolean property, true by default. Set it false to disable "Manual Entry" tab for "choices" property.
|
|
777
|
+
* - options.editorOptions.itemsEntryType a string property, 'form' by default. Set it 'fast' to show "Manual Entry" tab for "choices" property by default.
|
|
584
778
|
*/
|
|
585
779
|
onSetPropertyEditorOptions: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
586
780
|
/*
|
|
587
781
|
* The event is called on generation a new name for a new created element.
|
|
588
|
-
* sender the survey creator object that fires the event
|
|
589
|
-
* options.element a new created survey element. It can be question, panel or page
|
|
590
|
-
* options.name a new suggested name, that is unique for the current survey. You can suggest your own name. If it is unique, creator will assign it to the element.
|
|
591
|
-
* options.isUnique a boolean property, set this property to false, if you want to ask Creator to generate another name
|
|
782
|
+
* - sender the survey creator object that fires the event
|
|
783
|
+
* - options.element a new created survey element. It can be question, panel or page
|
|
784
|
+
* - options.name a new suggested name, that is unique for the current survey. You can suggest your own name. If it is unique, creator will assign it to the element.
|
|
785
|
+
* - options.isUnique a boolean property, set this property to false, if you want to ask Creator to generate another name
|
|
592
786
|
*/
|
|
593
787
|
onGenerateNewName: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
594
788
|
/*
|
|
595
789
|
* Use this event to show a custom error in the Question Editor on pressing Apply or OK buttons, if the values are not set correctly. The error will be displayed under the property editor.
|
|
596
|
-
* sender the survey creator object that fires the event
|
|
597
|
-
* options.obj the survey object which property is edited in the Property Editor.
|
|
598
|
-
* options.propertyName the name of the edited property.
|
|
599
|
-
* options.value the property value.
|
|
600
|
-
* options.error the error you want to display. Set the empty string (the default value) or null if there is no errors.
|
|
790
|
+
* - sender the survey creator object that fires the event
|
|
791
|
+
* - options.obj the survey object which property is edited in the Property Editor.
|
|
792
|
+
* - options.propertyName the name of the edited property.
|
|
793
|
+
* - options.value the property value.
|
|
794
|
+
* - options.error the error you want to display. Set the empty string (the default value) or null if there is no errors.
|
|
601
795
|
*/
|
|
602
796
|
onPropertyValidationCustomError: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
603
797
|
/*
|
|
@@ -625,98 +819,98 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
625
819
|
onSurveyPropertyValueChanged: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
626
820
|
/*
|
|
627
821
|
* Use this event to modify the list (name and titles) of the questions available in a condition editor.
|
|
628
|
-
* sender the survey creator object that fires the event
|
|
629
|
-
* options.obj the survey object which property is edited in the Property Editor.
|
|
630
|
-
* options.propertyName the name of the edited property.
|
|
631
|
-
* options.editor the instance of Property Editor.
|
|
632
|
-
* options.list the list of the questions available for condition
|
|
822
|
+
* - sender the survey creator object that fires the event
|
|
823
|
+
* - options.obj the survey object which property is edited in the Property Editor.
|
|
824
|
+
* - options.propertyName the name of the edited property.
|
|
825
|
+
* - options.editor the instance of Property Editor.
|
|
826
|
+
* - options.list the list of the questions available for condition
|
|
633
827
|
*/
|
|
634
828
|
onConditionQuestionsGetList: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
635
829
|
/*
|
|
636
830
|
* Use this event to modify the title in a condition editor. The title is changing during editing. In case of empty or incorrect expression it tells that expression is incorrect
|
|
637
|
-
* sender the survey creator object that fires the event.
|
|
638
|
-
* options.expression the current expression. If the expression is empty or incorrect then the value is empty.
|
|
639
|
-
* options.title the default value of the title. You can change the default value.
|
|
831
|
+
* - sender the survey creator object that fires the event.
|
|
832
|
+
* - options.expression the current expression. If the expression is empty or incorrect then the value is empty.
|
|
833
|
+
* - options.title the default value of the title. You can change the default value.
|
|
640
834
|
*/
|
|
641
835
|
onConditionGetTitle: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
642
836
|
/*
|
|
643
837
|
* The event is called when a survey is changed in the designer. A new page/question/page is added or existing is removed, a property is changed and so on.
|
|
644
|
-
* sender the survey creator object that fires the event
|
|
838
|
+
* - sender the survey creator object that fires the event
|
|
645
839
|
* options object contains the information about certain modifications
|
|
646
|
-
* options.type contains string constant describing certain modification
|
|
840
|
+
* - options.type contains string constant describing certain modification
|
|
647
841
|
* Available values:
|
|
648
842
|
*
|
|
649
|
-
* options.type: "ADDED_FROM_TOOLBOX"
|
|
650
|
-
* options.question: newly added question
|
|
843
|
+
* - options.type: "ADDED_FROM_TOOLBOX"
|
|
844
|
+
* - options.question: newly added question
|
|
651
845
|
*
|
|
652
|
-
* options.type: "PAGE_ADDED"
|
|
653
|
-
* options.newValue: newly created page
|
|
846
|
+
* - options.type: "PAGE_ADDED"
|
|
847
|
+
* - options.newValue: newly created page
|
|
654
848
|
*
|
|
655
|
-
* options.type: "PAGE_MOVED"
|
|
656
|
-
* options.page: page has been moved
|
|
657
|
-
* options.indexFrom: pevious index
|
|
658
|
-
* options.indexTo: new index
|
|
849
|
+
* - options.type: "PAGE_MOVED"
|
|
850
|
+
* - options.page: page has been moved
|
|
851
|
+
* - options.indexFrom: pevious index
|
|
852
|
+
* - options.indexTo: new index
|
|
659
853
|
*
|
|
660
|
-
* options.type: "QUESTION_CONVERTED"
|
|
661
|
-
* options.className: the converted class name
|
|
662
|
-
* options.oldValue: pevious object
|
|
663
|
-
* options.newValue: the new object, converted from oldVale to the given class name
|
|
854
|
+
* - options.type: "QUESTION_CONVERTED"
|
|
855
|
+
* - options.className: the converted class name
|
|
856
|
+
* - options.oldValue: pevious object
|
|
857
|
+
* - options.newValue: the new object, converted from oldVale to the given class name
|
|
664
858
|
*
|
|
665
|
-
* options.type: "QUESTION_CHANGED_BY_EDITOR"
|
|
666
|
-
* options.question: question has been edited in the popup question editor
|
|
859
|
+
* - options.type: "QUESTION_CHANGED_BY_EDITOR"
|
|
860
|
+
* - options.question: question has been edited in the popup question editor
|
|
667
861
|
*
|
|
668
|
-
* options.type: "PROPERTY_CHANGED"
|
|
669
|
-
* options.name: the name of the property has been changed
|
|
670
|
-
* options.target: the object containing the changed property
|
|
671
|
-
* options.oldValue: the previous value of the changed property
|
|
672
|
-
* options.newValue: the new value of the changed property
|
|
862
|
+
* - options.type: "PROPERTY_CHANGED"
|
|
863
|
+
* - options.name: the name of the property has been changed
|
|
864
|
+
* - options.target: the object containing the changed property
|
|
865
|
+
* - options.oldValue: the previous value of the changed property
|
|
866
|
+
* - options.newValue: the new value of the changed property
|
|
673
867
|
*
|
|
674
|
-
* options.type: "OBJECT_DELETED"
|
|
675
|
-
* options.target: deleted object
|
|
868
|
+
* - options.type: "OBJECT_DELETED"
|
|
869
|
+
* - options.target: deleted object
|
|
676
870
|
*
|
|
677
|
-
* options.type: "VIEW_TYPE_CHANGED"
|
|
678
|
-
* options.newType: new type of the creator view: editor or designer
|
|
871
|
+
* - options.type: "VIEW_TYPE_CHANGED"
|
|
872
|
+
* - options.newType: new type of the creator view: editor or designer
|
|
679
873
|
*
|
|
680
|
-
* options.type: "DO_DROP"
|
|
681
|
-
* options.page: the page of the drap/drop operation
|
|
682
|
-
* options.source: the source dragged object
|
|
683
|
-
* options.target: the drop target
|
|
684
|
-
* options.newElement: a new element. It is defined if a user drops question or panel from the toolbox
|
|
874
|
+
* - options.type: "DO_DROP"
|
|
875
|
+
* - options.page: the page of the drap/drop operation
|
|
876
|
+
* - options.source: the source dragged object
|
|
877
|
+
* - options.target: the drop target
|
|
878
|
+
* - options.newElement: a new element. It is defined if a user drops question or panel from the toolbox
|
|
685
879
|
*
|
|
686
|
-
* options.type: "TRANSLATIONS_CHANGED"
|
|
687
|
-
* options.type: "JSON_EDITOR"
|
|
880
|
+
* - options.type: "TRANSLATIONS_CHANGED"
|
|
881
|
+
* - options.type: "JSON_EDITOR"
|
|
688
882
|
*/
|
|
689
883
|
onModified: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
690
884
|
/*
|
|
691
885
|
* The event is called on adding a new question into the survey. Typically, when a user dropped a Question from the Question Toolbox into designer Survey area.
|
|
692
|
-
* sender the survey creator object that fires the event
|
|
693
|
-
* options.question a new added survey question. Survey.Question object
|
|
694
|
-
* options.page the survey Page object where question has been added.
|
|
886
|
+
* - sender the survey creator object that fires the event
|
|
887
|
+
* - options.question a new added survey question. Survey.Question object
|
|
888
|
+
* - options.page the survey Page object where question has been added.
|
|
695
889
|
*/
|
|
696
890
|
onQuestionAdded: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
697
891
|
/*
|
|
698
892
|
* The event is called on adding a new panel into the survey. Typically, when a user dropped a Panel from the Question Toolbox into designer Survey area.
|
|
699
|
-
* sender the survey creator object that fires the event
|
|
700
|
-
* options.panel a new added survey panel. Survey.Panel object
|
|
701
|
-
* options.page the survey Page object where question has been added.
|
|
893
|
+
* - sender the survey creator object that fires the event
|
|
894
|
+
* - options.panel a new added survey panel. Survey.Panel object
|
|
895
|
+
* - options.page the survey Page object where question has been added.
|
|
702
896
|
*/
|
|
703
897
|
onPanelAdded: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
704
898
|
/*
|
|
705
899
|
* The event is called on adding a new page into the survey.
|
|
706
|
-
* sender the survey creator object that fires the event
|
|
707
|
-
* options.page the new survey Page object.
|
|
900
|
+
* - sender the survey creator object that fires the event
|
|
901
|
+
* - options.page the new survey Page object.
|
|
708
902
|
*/
|
|
709
903
|
onPageAdded: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
710
904
|
/*
|
|
711
905
|
* The event is fired when the survey creator is initialized and a survey object (Survey.Survey) is created.
|
|
712
|
-
* sender the survey creator object that fires the event
|
|
713
|
-
* options.survey the survey object showing in the creator.
|
|
906
|
+
* - sender the survey creator object that fires the event
|
|
907
|
+
* - options.survey the survey object showing in the creator.
|
|
714
908
|
*/
|
|
715
909
|
onDesignerSurveyCreated: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
716
910
|
/*
|
|
717
911
|
* The event is fired when the survey creator creates survey in Preview tab for testing.
|
|
718
|
-
* sender the survey creator object that fires the event
|
|
719
|
-
* options.survey the survey object showing in the "Preview" tab.
|
|
912
|
+
* - sender the survey creator object that fires the event
|
|
913
|
+
* - options.survey the survey object showing in the "Preview" tab.
|
|
720
914
|
*/
|
|
721
915
|
onPreviewSurveyCreated: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
722
916
|
/*
|
|
@@ -726,29 +920,29 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
726
920
|
/*
|
|
727
921
|
* The event is called in case of UI notifications. By default all notifications are done via built-in alert () function.
|
|
728
922
|
* In case of any subscriptions to this event all notifications will be redirected into the event handler.
|
|
729
|
-
* options.message is a message to show.
|
|
923
|
+
* - options.message is a message to show.
|
|
730
924
|
*/
|
|
731
925
|
onNotify: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
732
926
|
/*
|
|
733
927
|
* The event is called on changing the selected element. You may change the new selected element by changing the property options.newSelectedElement to your own
|
|
734
|
-
* options.newSelectedElement the element that is going to be selected in the survey desiger: question, panel, page or survey.
|
|
928
|
+
* - options.newSelectedElement the element that is going to be selected in the survey desiger: question, panel, page or survey.
|
|
735
929
|
*/
|
|
736
930
|
onSelectedElementChanging: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
737
931
|
/*
|
|
738
932
|
* The event is called after the selected element is changed.
|
|
739
|
-
* options.newSelectedElement the new selected element in the survey desiger: question, panel, page or survey.
|
|
933
|
+
* - options.newSelectedElement the new selected element in the survey desiger: question, panel, page or survey.
|
|
740
934
|
*/
|
|
741
935
|
onSelectedElementChanged: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
742
936
|
/*
|
|
743
937
|
* The event is fired then one need to choose files.
|
|
744
|
-
* sender the survey creator object that fires the event
|
|
938
|
+
* - sender the survey creator object that fires the event
|
|
745
939
|
* input file input HTML element
|
|
746
940
|
* callback need to be called after files has been chosen
|
|
747
941
|
*/
|
|
748
942
|
onOpenFileChooser: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
749
943
|
/*
|
|
750
944
|
* The event is fired on uploading the files.
|
|
751
|
-
* sender the survey creator object that fires the event
|
|
945
|
+
* - sender the survey creator object that fires the event
|
|
752
946
|
* There are two properties in options:
|
|
753
947
|
* files the Javascript File objects array
|
|
754
948
|
* callback called on upload complete,
|
|
@@ -794,30 +988,30 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
794
988
|
onTranslationImported: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
795
989
|
/*
|
|
796
990
|
* Use this event to control drag&drop operations.
|
|
797
|
-
* sender the survey creator object that fires the event.
|
|
798
|
-
* options.survey the editing survey object.
|
|
799
|
-
* options.allow set it to false to disable dragging.
|
|
800
|
-
* options.target a target element that is dragging.
|
|
801
|
-
* options.source a source element. It can be null, if it is a new element, dragging from toolbox.
|
|
802
|
-
* options.parent a page or panel where target element is dragging.
|
|
803
|
-
* options.insertBefore an element before the target element is dragging. It can be null if parent container (page or panel) is empty or dragging an element under the last element of the container.
|
|
804
|
-
* options.insertAfter an element after the target element is dragging. It can be null if parent container (page or panel) is empty or dragging element to the top of the parent container.
|
|
991
|
+
* - sender the survey creator object that fires the event.
|
|
992
|
+
* - options.survey the editing survey object.
|
|
993
|
+
* - options.allow set it to false to disable dragging.
|
|
994
|
+
* - options.target a target element that is dragging.
|
|
995
|
+
* - options.source a source element. It can be null, if it is a new element, dragging from toolbox.
|
|
996
|
+
* - options.parent a page or panel where target element is dragging.
|
|
997
|
+
* - options.insertBefore an element before the target element is dragging. It can be null if parent container (page or panel) is empty or dragging an element under the last element of the container.
|
|
998
|
+
* - options.insertAfter an element after the target element is dragging. It can be null if parent container (page or panel) is empty or dragging element to the top of the parent container.
|
|
805
999
|
*/
|
|
806
1000
|
onDragDropAllow: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
807
1001
|
/*
|
|
808
1002
|
* Use this event to override/disable element adorners - wrapping component name.
|
|
809
|
-
* sender the survey creator object that fires the event.
|
|
810
|
-
* options.element a survey object to be wrapped.
|
|
811
|
-
* options.reason why we need to wrap an element.
|
|
812
|
-
* options.conponentName component wrapper name.
|
|
1003
|
+
* - sender the survey creator object that fires the event.
|
|
1004
|
+
* - options.element a survey object to be wrapped.
|
|
1005
|
+
* - options.reason why we need to wrap an element.
|
|
1006
|
+
* - options.conponentName component wrapper name.
|
|
813
1007
|
*/
|
|
814
1008
|
onGetElementWrapperComponentName: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
815
1009
|
/*
|
|
816
1010
|
* Use this event to override/disable element adorners - wrapping component data.
|
|
817
|
-
* sender the survey creator object that fires the event.
|
|
818
|
-
* options.element a survey object to be wrapped.
|
|
819
|
-
* options.reason why we need to wrap an element.
|
|
820
|
-
* options.conponentData component wrapper data.
|
|
1011
|
+
* - sender the survey creator object that fires the event.
|
|
1012
|
+
* - options.element a survey object to be wrapped.
|
|
1013
|
+
* - options.reason why we need to wrap an element.
|
|
1014
|
+
* - options.conponentData component wrapper data.
|
|
821
1015
|
*/
|
|
822
1016
|
onGetElementWrapperComponentData: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
823
1017
|
/*
|
|
@@ -829,87 +1023,124 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
829
1023
|
*/
|
|
830
1024
|
setSurveyJSONTextCallback: (text: string) => void;
|
|
831
1025
|
/*
|
|
832
|
-
*
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
/*
|
|
836
|
-
* You need to set this property to value bigger than 0 to disable adding more logic items in condition than this value.
|
|
1026
|
+
* Limits the number of items in a logical expression.
|
|
1027
|
+
*
|
|
1028
|
+
* Default value: -1 (unlimited)
|
|
837
1029
|
*/
|
|
838
1030
|
maxLogicItemsInCondition: number;
|
|
839
1031
|
/*
|
|
840
|
-
*
|
|
1032
|
+
* Specifies whether UI elements display survey, page, and question titles instead of their names.
|
|
1033
|
+
*
|
|
1034
|
+
* Default value: `false`
|
|
841
1035
|
*/
|
|
842
1036
|
showObjectTitles: boolean;
|
|
843
1037
|
/*
|
|
844
|
-
*
|
|
1038
|
+
* Specifies whether to display question titles instead of names when users edit logical expressions.
|
|
1039
|
+
*
|
|
1040
|
+
* Default value: `false`
|
|
845
1041
|
*/
|
|
846
1042
|
showTitlesInExpressions: boolean;
|
|
847
1043
|
/*
|
|
848
|
-
*
|
|
1044
|
+
* Specifies whether users can edit expressions in the Logic tab as plain text.
|
|
1045
|
+
*
|
|
1046
|
+
* If you set this property to `false`, users can only use UI elements to edit logical expressions.
|
|
1047
|
+
*
|
|
1048
|
+
* Default value: `true`
|
|
849
1049
|
*/
|
|
850
1050
|
allowEditExpressionsInTextEditor: boolean;
|
|
851
1051
|
/*
|
|
852
|
-
*
|
|
1052
|
+
* Limits the number of columns that users can add to [Matrix](https://surveyjs.io/Documentation/Library?id=questionmatrixmodel), [Matrix Dynamic](https://surveyjs.io/Documentation/Library?id=questionmatrixdynamicmodel), and [Matrix Dropdown](https://surveyjs.io/Documentation/Library?id=questionmatrixdropdownmodel) questions.
|
|
1053
|
+
*
|
|
1054
|
+
* Default value: 0 (unlimited, taken from `settings.propertyGrid.maximumColumnsCount`)
|
|
853
1055
|
*/
|
|
854
1056
|
maximumColumnsCount: number;
|
|
855
1057
|
/*
|
|
856
|
-
*
|
|
1058
|
+
* Limits the number of choices that users can add to [Checkbox](https://surveyjs.io/Documentation/Library?id=questioncheckboxmodel), [Dropdown](https://surveyjs.io/Documentation/Library?id=questiondropdownmodel), and [Radiogroup](https://surveyjs.io/Documentation/Library?id=questionradiogroupmodel) questions.
|
|
1059
|
+
*
|
|
1060
|
+
* Default value: 0 (unlimited, taken from `settings.propertyGrid.maximumChoicesCount`)
|
|
857
1061
|
*/
|
|
858
1062
|
maximumChoicesCount: number;
|
|
859
1063
|
/*
|
|
860
|
-
*
|
|
1064
|
+
* Limits the number of rows that users can add to [Matrix](https://surveyjs.io/Documentation/Library?id=questionmatrixmodel) and [Matrix Dropdown](https://surveyjs.io/Documentation/Library?id=questionmatrixdropdownmodel) questions.
|
|
1065
|
+
*
|
|
1066
|
+
* Default value: 0 (unlimited, taken from `settings.propertyGrid.maximumRowsCount`)
|
|
861
1067
|
*/
|
|
862
1068
|
maximumRowsCount: number;
|
|
863
1069
|
/*
|
|
864
|
-
*
|
|
1070
|
+
* Limits the number of rate value that users can add to [Rating](https://surveyjs.io/Documentation/Library?id=questionratingmodel) questions.
|
|
1071
|
+
*
|
|
1072
|
+
* Default value: 0 (unlimited, taken from `settings.propertyGrid.maximumRateValues`)
|
|
865
1073
|
*/
|
|
866
1074
|
maximumRateValues: number;
|
|
867
1075
|
/*
|
|
868
|
-
* Obsolete.
|
|
1076
|
+
* Obsolete. Use the [`showPagesInPreviewTab`](https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#showPagesInPreviewTab) property instead.
|
|
869
1077
|
*/
|
|
870
1078
|
showPagesInTestSurveyTab: boolean;
|
|
871
1079
|
/*
|
|
872
|
-
*
|
|
1080
|
+
* Specifies whether to show the page selector at the bottom of the Preview tab.
|
|
1081
|
+
*
|
|
1082
|
+
* Default value: `true`
|
|
873
1083
|
*/
|
|
874
1084
|
get showPagesInPreviewTab(): boolean;
|
|
875
1085
|
set showPagesInPreviewTab(val: boolean);
|
|
876
1086
|
/*
|
|
877
|
-
* Obsolete.
|
|
1087
|
+
* Obsolete. Use the [`showSimulatorInPreviewTab`](https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#showSimulatorInPreviewTab) property instead.
|
|
878
1088
|
*/
|
|
879
1089
|
showSimulatorInTestSurveyTab: boolean;
|
|
880
1090
|
/*
|
|
881
|
-
*
|
|
1091
|
+
* Specifies whether the Preview tab displays the Device button that allows users to preview the survey on different device types.
|
|
1092
|
+
*
|
|
1093
|
+
* Default value: `true`
|
|
882
1094
|
*/
|
|
883
1095
|
get showSimulatorInPreviewTab(): boolean;
|
|
884
1096
|
set showSimulatorInPreviewTab(val: boolean);
|
|
885
1097
|
/*
|
|
886
|
-
*
|
|
1098
|
+
* A [UI theme](https://surveyjs.io/Documentation/Library?id=get-started-react#configure-styles) used to display the survey in the Preview tab.
|
|
1099
|
+
*
|
|
887
1100
|
* Accepted values: `"modern"`, `"default"`, `"defaultV2"`
|
|
1101
|
+
*
|
|
1102
|
+
* Default value: `"defaultV2"`
|
|
888
1103
|
*/
|
|
889
1104
|
themeForPreview: string;
|
|
890
1105
|
/*
|
|
891
|
-
*
|
|
1106
|
+
* Specifies whether users can add, edit, and delete survey pages.
|
|
1107
|
+
*
|
|
1108
|
+
* Default value: `true`
|
|
892
1109
|
*/
|
|
893
1110
|
allowModifyPages: boolean;
|
|
894
1111
|
/*
|
|
895
|
-
* Obsolete.
|
|
1112
|
+
* Obsolete. Use the [`showDefaultLanguageInPreviewTab`](https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#showDefaultLanguageInPreviewTab) property instead.
|
|
896
1113
|
*/
|
|
897
1114
|
showDefaultLanguageInTestSurveyTab: string | boolean;
|
|
898
1115
|
/*
|
|
899
|
-
*
|
|
900
|
-
*
|
|
901
|
-
*
|
|
902
|
-
*
|
|
903
|
-
*
|
|
1116
|
+
* Specifies whether the Preview tab displays the language selector.
|
|
1117
|
+
*
|
|
1118
|
+
* Accepted values:
|
|
1119
|
+
*
|
|
1120
|
+
* - `"auto"` (default)
|
|
1121
|
+
* Display the language selector only if the survey is translated to more than one language.
|
|
1122
|
+
*
|
|
1123
|
+
* - `true`
|
|
1124
|
+
* Always display the language selector regardless of how many languages are used in the survey.
|
|
1125
|
+
*
|
|
1126
|
+
* - `false`
|
|
1127
|
+
* Never display the language selector.
|
|
1128
|
+
*
|
|
1129
|
+
* - `"all"`
|
|
1130
|
+
* Always display the language selector with [all supported languages](https://github.com/surveyjs/survey-creator/tree/master/packages/survey-creator-core/src/localization).
|
|
1131
|
+
*
|
|
1132
|
+
* **See also**: [Localization & Globalization](https://surveyjs.io/Documentation/Survey-Creator?id=localization)
|
|
904
1133
|
*/
|
|
905
1134
|
get showDefaultLanguageInPreviewTab(): string | boolean;
|
|
906
1135
|
set showDefaultLanguageInPreviewTab(val: string | boolean);
|
|
907
1136
|
/*
|
|
908
|
-
*
|
|
1137
|
+
* Obsolete. Use the [`showInvisibleElementsInPreviewTab`](https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#showInvisibleElementsInPreviewTab) property instead.
|
|
909
1138
|
*/
|
|
910
1139
|
showInvisibleElementsInTestSurveyTab: boolean;
|
|
911
1140
|
/*
|
|
912
|
-
*
|
|
1141
|
+
* Specifies whether the Preview tab displays a checkbox that allows users to show or hide invisible survey elements.
|
|
1142
|
+
*
|
|
1143
|
+
* Default value: `true`
|
|
913
1144
|
*/
|
|
914
1145
|
get showInvisibleElementsInPreviewTab(): boolean;
|
|
915
1146
|
set showInvisibleElementsInPreviewTab(val: boolean);
|
|
@@ -917,6 +1148,14 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
917
1148
|
* Set this property to true if you want to show "page selector" in the toolabar instead of "pages editor"
|
|
918
1149
|
*/
|
|
919
1150
|
showPageSelectorInToolbar: boolean;
|
|
1151
|
+
/*
|
|
1152
|
+
* Specifies whether users can switch between UI themes in the Preview tab.
|
|
1153
|
+
*
|
|
1154
|
+
* Default value: `true`
|
|
1155
|
+
*
|
|
1156
|
+
* [View the "Switch Between Themes" demo](https://surveyjs.io/Examples/Creator?id=theme-switcher)
|
|
1157
|
+
*/
|
|
1158
|
+
allowChangeThemeInPreview: boolean;
|
|
920
1159
|
tabbedMenu: any;
|
|
921
1160
|
get tabs(): any;
|
|
922
1161
|
set tabs(val: any);
|
|
@@ -925,7 +1164,9 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
925
1164
|
*/
|
|
926
1165
|
getLocString(str: string): string;
|
|
927
1166
|
/*
|
|
928
|
-
*
|
|
1167
|
+
* Specifies whether to show an error message if a survey is not saved in the database.
|
|
1168
|
+
*
|
|
1169
|
+
* Default value: `true`
|
|
929
1170
|
*/
|
|
930
1171
|
showErrorOnFailedSave: boolean;
|
|
931
1172
|
protected onSetReadOnly(newVal: boolean): void;
|
|
@@ -936,25 +1177,29 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
936
1177
|
get locale(): string;
|
|
937
1178
|
set locale(val: string);
|
|
938
1179
|
/*
|
|
939
|
-
*
|
|
1180
|
+
* Enables the read-only mode. If you set this property to `true`, users cannot change the initial survey configuration.
|
|
1181
|
+
*
|
|
1182
|
+
* Default value: `false`
|
|
940
1183
|
*/
|
|
941
1184
|
get readOnly(): boolean;
|
|
942
1185
|
set readOnly(val: boolean);
|
|
943
1186
|
/*
|
|
944
|
-
*
|
|
1187
|
+
* Specifies whether to enable support for right-to-left languages.
|
|
1188
|
+
*
|
|
1189
|
+
* Default value: `false`
|
|
945
1190
|
*/
|
|
946
1191
|
get isRTL(): boolean;
|
|
947
1192
|
set isRTL(val: boolean);
|
|
948
1193
|
/*
|
|
949
1194
|
* The event is called when creator is going to change the active tab.
|
|
950
|
-
* sender the survey creator object that fires the event
|
|
951
|
-
* options.tabName the name of new active tab
|
|
1195
|
+
* - sender the survey creator object that fires the event
|
|
1196
|
+
* - options.tabName the name of new active tab
|
|
952
1197
|
*/
|
|
953
1198
|
onActiveTabChanging: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
954
1199
|
/*
|
|
955
1200
|
* The event is called when creator active tab is changed.
|
|
956
|
-
* sender the survey creator object that fires the event
|
|
957
|
-
* options.tabName the name of new active tab
|
|
1201
|
+
* - sender the survey creator object that fires the event
|
|
1202
|
+
* - options.tabName the name of new active tab
|
|
958
1203
|
*/
|
|
959
1204
|
onActiveTabChanged: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
960
1205
|
/*
|
|
@@ -990,22 +1235,22 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
990
1235
|
leftContainerActiveItem(name: string): void;
|
|
991
1236
|
/*
|
|
992
1237
|
* The event is called before undo happens.
|
|
993
|
-
* options.canUndo a boolean value. It is true by default. Set it false to hide prevent undo operation.
|
|
1238
|
+
* - options.canUndo a boolean value. It is true by default. Set it false to hide prevent undo operation.
|
|
994
1239
|
*/
|
|
995
1240
|
onBeforeUndo: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
996
1241
|
/*
|
|
997
1242
|
* The event is called before redo happens.
|
|
998
|
-
* options.canRedo a boolean value. It is true by default. Set it false to hide prevent redo operation.
|
|
1243
|
+
* - options.canRedo a boolean value. It is true by default. Set it false to hide prevent redo operation.
|
|
999
1244
|
*/
|
|
1000
1245
|
onBeforeRedo: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
1001
1246
|
/*
|
|
1002
1247
|
* The event is called after undo happens.
|
|
1003
|
-
* options.state is an undo/redo item.
|
|
1248
|
+
* - options.state is an undo/redo item.
|
|
1004
1249
|
*/
|
|
1005
1250
|
onAfterUndo: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
1006
1251
|
/*
|
|
1007
1252
|
* The event is called after redo happens.
|
|
1008
|
-
* options.state is an undo/redo item.
|
|
1253
|
+
* - options.state is an undo/redo item.
|
|
1009
1254
|
*/
|
|
1010
1255
|
onAfterRedo: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
1011
1256
|
get undoRedoManager(): UndoRedoManager;
|
|
@@ -1049,7 +1294,10 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1049
1294
|
onBeforeDrop: Event<() => any, any>;
|
|
1050
1295
|
onAfterDrop: Event<() => any, any>;
|
|
1051
1296
|
updateElementsOnLocaleChanged(obj: Base, propertyName: string): void;
|
|
1052
|
-
|
|
1297
|
+
updateConditionsOnNameChanged(obj: Base, propertyName: string, oldValue: any): void;
|
|
1298
|
+
surveyLogicForUpdate: SurveyLogic;
|
|
1299
|
+
surveyLogicRenaming: boolean;
|
|
1300
|
+
protected createSurveyLogicForUpdate(): SurveyLogic;
|
|
1053
1301
|
isObjQuestion(obj: Base): boolean;
|
|
1054
1302
|
isObjPage(obj: Base): boolean;
|
|
1055
1303
|
protected setSurvey(survey: SurveyModel): void;
|
|
@@ -1318,6 +1566,7 @@ export declare class ExpressionToDisplayText {
|
|
|
1318
1566
|
currentQuestion: Question;
|
|
1319
1567
|
showTitles: boolean;
|
|
1320
1568
|
toDisplayText(expression: string): string;
|
|
1569
|
+
toExpression(node: Operand): string;
|
|
1321
1570
|
static operatorText: any;
|
|
1322
1571
|
}
|
|
1323
1572
|
export declare class ItemValueWrapperViewModel extends Base {
|
|
@@ -1813,6 +2062,7 @@ export declare class StringEditorViewModelBase extends Base {
|
|
|
1813
2062
|
onInput(event: any): void;
|
|
1814
2063
|
done(event: any): void;
|
|
1815
2064
|
onKeyDown(event: any): boolean;
|
|
2065
|
+
onKeyUp(event: any): boolean;
|
|
1816
2066
|
justFocused: boolean;
|
|
1817
2067
|
onMouseUp(event: any): boolean;
|
|
1818
2068
|
findProperty(): JsonObjectProperty;
|
|
@@ -1853,10 +2103,12 @@ export declare class SurveyForTextWorker extends SurveyModel {
|
|
|
1853
2103
|
}
|
|
1854
2104
|
export declare class SurveyHelper {
|
|
1855
2105
|
static getNewPageName(objs: any): string;
|
|
2106
|
+
static isPageNameAutoGenerated(name: string): boolean;
|
|
1856
2107
|
static getNewQuestionName(objs: any): string;
|
|
1857
2108
|
static getNewPanelName(objs: any): string;
|
|
1858
2109
|
static generateNewName(name: string): string;
|
|
1859
2110
|
static getNewName(objs: any, baseName: string): string;
|
|
2111
|
+
static isNameAutoGenerated(name: string, baseName: string): boolean;
|
|
1860
2112
|
static getObjectType(obj: any): ObjType;
|
|
1861
2113
|
static getObjectTypeStr(obj: any): string;
|
|
1862
2114
|
static getObjectName(obj: any, showObjectTitle?: boolean): string;
|
|
@@ -1932,7 +2184,6 @@ export declare class SurveyLogic extends Base implements ISurveyLogicItemOwner {
|
|
|
1932
2184
|
* options.item is the removed logic item.
|
|
1933
2185
|
*/
|
|
1934
2186
|
onLogicItemRemoved: Event<(sender: SurveyLogic, options: any) => any, any>;
|
|
1935
|
-
koAfterRender: any;
|
|
1936
2187
|
dispose(): void;
|
|
1937
2188
|
items: any;
|
|
1938
2189
|
logicTypes: any;
|
|
@@ -1955,6 +2206,9 @@ export declare class SurveyLogic extends Base implements ISurveyLogicItemOwner {
|
|
|
1955
2206
|
protected onEditableItemApply(): void;
|
|
1956
2207
|
protected onItemChanged(item: SurveyLogicItem, changeType: string): void;
|
|
1957
2208
|
renameQuestion(oldName: string, newName: string): void;
|
|
2209
|
+
renameItemValue(item: ItemValue, oldValue: any): void;
|
|
2210
|
+
renameRowValue(item: ItemValue, oldValue: any): void;
|
|
2211
|
+
renameColumn(column: MatrixDropdownColumn, oldName: string): void;
|
|
1958
2212
|
removeQuestion(name: string): void;
|
|
1959
2213
|
hasError(): boolean;
|
|
1960
2214
|
getUsedQuestions(): Array<Question>;
|
|
@@ -2002,6 +2256,15 @@ export declare class SurveyLogicAction {
|
|
|
2002
2256
|
addQuestionNames(names: any): void;
|
|
2003
2257
|
get elementName(): string;
|
|
2004
2258
|
}
|
|
2259
|
+
export declare class SurveyLogicExpressionUpdater {
|
|
2260
|
+
constructor(expresion: string);
|
|
2261
|
+
operand: Operand;
|
|
2262
|
+
constChanges: any;
|
|
2263
|
+
update(varName: string, oldValue: any, newValue: any): void;
|
|
2264
|
+
get isModified(): boolean;
|
|
2265
|
+
toString(): string;
|
|
2266
|
+
static operatorText: any;
|
|
2267
|
+
}
|
|
2005
2268
|
export declare class SurveyLogicItem {
|
|
2006
2269
|
constructor(owner: ISurveyLogicItemOwner, expression?: string);
|
|
2007
2270
|
expression: string;
|
|
@@ -2029,6 +2292,9 @@ export declare class SurveyLogicItem {
|
|
|
2029
2292
|
equals(item: SurveyLogicItem): boolean;
|
|
2030
2293
|
apply(expression: string): void;
|
|
2031
2294
|
renameQuestion(oldName: string, newName: string): void;
|
|
2295
|
+
renameColumn(question: Question, column: MatrixDropdownColumn, oldName: string): void;
|
|
2296
|
+
renameItemValue(question: Question, item: ItemValue, oldValue: any): void;
|
|
2297
|
+
renameRowValue(question: Question, item: ItemValue, oldValue: any): void;
|
|
2032
2298
|
removeQuestion(name: string): void;
|
|
2033
2299
|
getQuestionNames(): Array<any>;
|
|
2034
2300
|
getActionTypes(): Array<any>;
|
|
@@ -2178,6 +2444,7 @@ export declare class TabDesignerViewModel extends Base {
|
|
|
2178
2444
|
constructor(creator: CreatorBase);
|
|
2179
2445
|
widthUpdater: any;
|
|
2180
2446
|
checkNewPageHandler: (sender: SurveyModel, options: any) => void;
|
|
2447
|
+
checkRemovePageHandler: (sender: SurveyModel, options: any) => void;
|
|
2181
2448
|
surveyOnPropertyChanged: (sender: SurveyModel, options: any) => void;
|
|
2182
2449
|
pagesControllerValue: PagesController;
|
|
2183
2450
|
newPage: PageModel;
|
|
@@ -2227,7 +2494,6 @@ export declare class TestSurveyTabViewModel extends Base {
|
|
|
2227
2494
|
testAgain(): void;
|
|
2228
2495
|
buildActions(): void;
|
|
2229
2496
|
setTheme(themeName: string, themeMapper: any): void;
|
|
2230
|
-
getCurrThemeTitle(themeMapper: any): string;
|
|
2231
2497
|
protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
|
|
2232
2498
|
}
|
|
2233
2499
|
export declare class ToolbarActionContainer extends ActionContainer {
|
|
@@ -2439,8 +2705,15 @@ export declare class ImageItemValueWrapperViewModel extends ItemValueWrapperView
|
|
|
2439
2705
|
item: ImageItemValue;
|
|
2440
2706
|
templateData: any;
|
|
2441
2707
|
itemsRoot: any;
|
|
2708
|
+
isFileDragging: boolean;
|
|
2709
|
+
getRootCss(): string;
|
|
2710
|
+
getIsNewItemSingle(): boolean;
|
|
2442
2711
|
chooseFile(model: ImageItemValueWrapperViewModel): void;
|
|
2712
|
+
uploadFiles(files: any): void;
|
|
2443
2713
|
chooseNewFile(model: ImageItemValueWrapperViewModel): void;
|
|
2714
|
+
onDragOver: (event: any) => void;
|
|
2715
|
+
onDrop: (event: any) => void;
|
|
2716
|
+
onDragLeave: (event: any) => void;
|
|
2444
2717
|
}
|
|
2445
2718
|
export declare class LogicActionModel extends LogicActionModelBase {
|
|
2446
2719
|
constructor(panel: PanelModel, logicAction: SurveyLogicAction, logicType: SurveyLogicType, selectorElementsHash: any);
|
|
@@ -2634,7 +2907,7 @@ export declare class TabTestPlugin implements ICreatorPlugin {
|
|
|
2634
2907
|
languageListModel: ListModel;
|
|
2635
2908
|
changeThemePopupModel: any;
|
|
2636
2909
|
changeThemeModel: ListModel;
|
|
2637
|
-
changeThemeAction:
|
|
2910
|
+
protected changeThemeAction: CreatorAction;
|
|
2638
2911
|
deviceSelectorAction: Action;
|
|
2639
2912
|
deviceListModel: ListModel;
|
|
2640
2913
|
orientationSelectorAction: Action;
|
|
@@ -2648,7 +2921,8 @@ export declare class TabTestPlugin implements ICreatorPlugin {
|
|
|
2648
2921
|
activate(): void;
|
|
2649
2922
|
update(): void;
|
|
2650
2923
|
deactivate(): boolean;
|
|
2651
|
-
|
|
2924
|
+
protected filterThemeMapper(themeMapper: any): Array<any>;
|
|
2925
|
+
createActions(): Array<Action>;
|
|
2652
2926
|
addFooterActions(): void;
|
|
2653
2927
|
}
|
|
2654
2928
|
export declare class TabTranslationPlugin implements ICreatorPlugin {
|
|
@@ -3015,6 +3289,7 @@ export declare class PropertyGridEditorMatrixCalculatedValues extends PropertyGr
|
|
|
3015
3289
|
protected getKeyValue(): string;
|
|
3016
3290
|
protected getBaseValue(prop: JsonObjectProperty): string;
|
|
3017
3291
|
protected getShowDetailPanelOnAdding(): boolean;
|
|
3292
|
+
protected setupMatrixQuestion(obj: Base, matrix: QuestionMatrixDynamicModel, prop: JsonObjectProperty): void;
|
|
3018
3293
|
}
|
|
3019
3294
|
export declare class PropertyGridEditorMatrixColumns extends PropertyGridEditorMatrix {
|
|
3020
3295
|
constructor();
|
|
@@ -3193,6 +3468,7 @@ export declare function assignDefaultV2Classes(destination: any, questionType: s
|
|
|
3193
3468
|
export declare function wrapTextByCurlyBraces(text: string): string;
|
|
3194
3469
|
export declare function capitalize(str: string): string;
|
|
3195
3470
|
export declare function getLocString(strName: string, locale?: string): string;
|
|
3471
|
+
export declare function updateLogicExpression(expression: string, varName: string, oldValue: any, newValue: any): string;
|
|
3196
3472
|
export declare function getLogicString(name: string): string;
|
|
3197
3473
|
export declare function parsePropertyDescription(text: string): string;
|
|
3198
3474
|
export declare function setSurveyJSONForPropertyGrid(json: any, updateOnTyping?: boolean, titleLocationLeft?: boolean): void;
|
|
@@ -3252,6 +3528,14 @@ export declare var settings: {
|
|
|
3252
3528
|
logicItemTitleMaxChars: number,
|
|
3253
3529
|
openBracket: string,
|
|
3254
3530
|
closeBracket: string,
|
|
3531
|
+
/*
|
|
3532
|
+
* Set these properties to false if you don't want to update expressions on changing question and column names and on changing choices values
|
|
3533
|
+
*/
|
|
3534
|
+
updateExpressionsOnChanging: {
|
|
3535
|
+
questionName: boolean,
|
|
3536
|
+
columnName: boolean,
|
|
3537
|
+
choiceValue: boolean,
|
|
3538
|
+
},
|
|
3255
3539
|
},
|
|
3256
3540
|
/*
|
|
3257
3541
|
* Determines which types of questions the conversion will be available for.
|
|
@@ -3554,6 +3838,7 @@ export declare var propertyGridCss: {
|
|
|
3554
3838
|
dragElementDecorator: string,
|
|
3555
3839
|
iconDragElement: string,
|
|
3556
3840
|
iconDrag: string,
|
|
3841
|
+
footer: string,
|
|
3557
3842
|
dragDropGhostPositionTop: string,
|
|
3558
3843
|
dragDropGhostPositionBottom: string,
|
|
3559
3844
|
emptyRowsSection: string,
|