survey-creator-core 1.9.111 → 1.9.113
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/fonts.fontless.css +1 -1
- package/fonts.fontless.min.css +1 -1
- package/i18n/arabic.js +1717 -0
- package/i18n/arabic.js.map +1 -0
- package/i18n/arabic.min.js +7 -0
- package/i18n/bulgarian.js +1354 -0
- package/i18n/bulgarian.js.map +1 -0
- package/i18n/bulgarian.min.js +7 -0
- package/i18n/croatian.js +1801 -0
- package/i18n/croatian.js.map +1 -0
- package/i18n/croatian.min.js +7 -0
- package/i18n/czech.js +1356 -0
- package/i18n/czech.js.map +1 -0
- package/i18n/czech.min.js +7 -0
- package/i18n/danish.js +1992 -0
- package/i18n/danish.js.map +1 -0
- package/i18n/danish.min.js +7 -0
- package/i18n/dutch.js +1787 -0
- package/i18n/dutch.js.map +1 -0
- package/i18n/dutch.min.js +7 -0
- package/i18n/english.js +1247 -0
- package/i18n/english.js.map +1 -0
- package/i18n/english.min.js +7 -0
- package/i18n/finnish.js +1807 -0
- package/i18n/finnish.js.map +1 -0
- package/i18n/finnish.min.js +7 -0
- package/i18n/french.js +1864 -0
- package/i18n/french.js.map +1 -0
- package/i18n/french.min.js +7 -0
- package/i18n/german.js +1527 -0
- package/i18n/german.js.map +1 -0
- package/i18n/german.min.js +7 -0
- package/i18n/hungarian.js +1961 -0
- package/i18n/hungarian.js.map +1 -0
- package/i18n/hungarian.min.js +7 -0
- package/i18n/index.js +45735 -0
- package/i18n/index.js.map +1 -0
- package/i18n/index.min.js +7 -0
- package/i18n/indonesian.js +1961 -0
- package/i18n/indonesian.js.map +1 -0
- package/i18n/indonesian.min.js +7 -0
- package/i18n/italian.js +1549 -0
- package/i18n/italian.js.map +1 -0
- package/i18n/italian.min.js +7 -0
- package/i18n/japanese.js +1806 -0
- package/i18n/japanese.js.map +1 -0
- package/i18n/japanese.min.js +7 -0
- package/i18n/korean.js +2011 -0
- package/i18n/korean.js.map +1 -0
- package/i18n/korean.min.js +7 -0
- package/i18n/malay.js +1760 -0
- package/i18n/malay.js.map +1 -0
- package/i18n/malay.min.js +7 -0
- package/i18n/mongolian.js +1448 -0
- package/i18n/mongolian.js.map +1 -0
- package/i18n/mongolian.min.js +7 -0
- package/i18n/norwegian.js +1811 -0
- package/i18n/norwegian.js.map +1 -0
- package/i18n/norwegian.min.js +7 -0
- package/i18n/persian.js +1746 -0
- package/i18n/persian.js.map +1 -0
- package/i18n/persian.min.js +7 -0
- package/i18n/polish.js +2079 -0
- package/i18n/polish.js.map +1 -0
- package/i18n/polish.min.js +7 -0
- package/i18n/portuguese.js +1457 -0
- package/i18n/portuguese.js.map +1 -0
- package/i18n/portuguese.min.js +7 -0
- package/i18n/russian.js +1868 -0
- package/i18n/russian.js.map +1 -0
- package/i18n/russian.min.js +7 -0
- package/i18n/simplified-chinese.js +1948 -0
- package/i18n/simplified-chinese.js.map +1 -0
- package/i18n/simplified-chinese.min.js +7 -0
- package/i18n/slovak.js +1760 -0
- package/i18n/slovak.js.map +1 -0
- package/i18n/slovak.min.js +7 -0
- package/i18n/spanish.js +1573 -0
- package/i18n/spanish.js.map +1 -0
- package/i18n/spanish.min.js +7 -0
- package/i18n/swedish.js +1985 -0
- package/i18n/swedish.js.map +1 -0
- package/i18n/swedish.min.js +7 -0
- package/i18n/tajik.js +1037 -0
- package/i18n/tajik.js.map +1 -0
- package/i18n/tajik.min.js +7 -0
- package/i18n/traditional-chinese.js +2084 -0
- package/i18n/traditional-chinese.js.map +1 -0
- package/i18n/traditional-chinese.min.js +7 -0
- package/i18n/turkish.js +1802 -0
- package/i18n/turkish.js.map +1 -0
- package/i18n/turkish.min.js +7 -0
- package/package.json +2 -2
- package/survey-creator-core.css +14 -10
- package/survey-creator-core.fontless.css +13 -9
- package/survey-creator-core.fontless.css.map +1 -1
- package/survey-creator-core.fontless.min.css +4 -4
- package/survey-creator-core.i18n.js +2171 -99
- package/survey-creator-core.i18n.js.map +1 -1
- package/survey-creator-core.i18n.min.js +2 -2
- package/survey-creator-core.js +1456 -990
- package/survey-creator-core.js.map +1 -1
- package/survey-creator-core.min.css +5 -5
- package/survey-creator-core.min.js +45 -45
- package/typings/components/tabs/designer-plugin.d.ts +1 -0
- package/typings/components/tabs/json-editor-plugin.d.ts +12 -2
- package/typings/components/tabs/logic-actions-model.d.ts +9 -1
- package/typings/components/tabs/test-plugin.d.ts +2 -0
- package/typings/components/tabs/test.d.ts +2 -0
- package/typings/components/tabs/theme-builder.d.ts +29 -2
- package/typings/components/tabs/theme-custom-questions/element-settings.d.ts +4 -4
- package/typings/components/tabs/theme-custom-questions/font-settings.d.ts +4 -4
- package/typings/components/tabs/theme-plugin.d.ts +13 -3
- package/typings/components/tabs/themes.d.ts +1 -0
- package/typings/creator-base.d.ts +299 -244
- package/typings/creator-options.d.ts +0 -6
- package/typings/creator-settings.d.ts +5 -0
- package/typings/custom-questions/question-file.d.ts +8 -0
- package/typings/editorLocalization.d.ts +24 -9
- package/typings/localization/english.d.ts +23 -9
- package/typings/plugins/undo-redo/undo-redo-controller.d.ts +0 -10
- package/typings/plugins/undo-redo/undo-redo-manager.d.ts +3 -0
- package/typings/property-grid/index.d.ts +1 -5
- package/typings/property-grid/matrices.d.ts +4 -3
- package/typings/property-grid-theme/property-grid.d.ts +1 -0
- package/typings/questionconverter.d.ts +4 -3
- package/typings/survey-helper.d.ts +6 -6
- package/typings/utils/utils.d.ts +1 -0
|
@@ -72,23 +72,24 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
72
72
|
* Specifies whether to display the Designer tab.
|
|
73
73
|
*
|
|
74
74
|
* Default value: `true`
|
|
75
|
+
* @see activeTab
|
|
76
|
+
* @see onDesignerSurveyCreated
|
|
75
77
|
*/
|
|
76
78
|
showDesignerTab: boolean;
|
|
77
79
|
/**
|
|
78
80
|
* Specifies whether to display the JSON Editor tab.
|
|
79
81
|
*
|
|
80
82
|
* Default value: `true`
|
|
83
|
+
* @see activeTab
|
|
81
84
|
*/
|
|
82
85
|
showJSONEditorTab: boolean;
|
|
83
|
-
/**
|
|
84
|
-
* Obsolete. Please use showPreviewTab property
|
|
85
|
-
* @see showPreviewTab
|
|
86
|
-
*/
|
|
87
86
|
showTestSurveyTab: boolean;
|
|
88
87
|
/**
|
|
89
88
|
* Specifies whether to display the Preview tab.
|
|
90
89
|
*
|
|
91
90
|
* Default value: `true`
|
|
91
|
+
* @see activeTab
|
|
92
|
+
* @see onPreviewSurveyCreated
|
|
92
93
|
*/
|
|
93
94
|
get showPreviewTab(): boolean;
|
|
94
95
|
set showPreviewTab(val: boolean);
|
|
@@ -96,36 +97,39 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
96
97
|
* Specifies whether to display the Themes tab.
|
|
97
98
|
*
|
|
98
99
|
* Default value: `false`
|
|
100
|
+
* @see activeTab
|
|
101
|
+
* @see saveThemeFunc
|
|
99
102
|
*/
|
|
100
103
|
showThemeTab: boolean;
|
|
101
104
|
/**
|
|
102
105
|
* Specifies whether to display the Translation tab.
|
|
103
106
|
*
|
|
104
107
|
* Default value: `false`
|
|
108
|
+
* @see activeTab
|
|
105
109
|
*/
|
|
106
110
|
showTranslationTab: boolean;
|
|
107
111
|
/**
|
|
108
112
|
* Specifies whether to display the Logic tab.
|
|
109
113
|
*
|
|
110
114
|
* Default value: `false`
|
|
115
|
+
* @see activeTab
|
|
111
116
|
*/
|
|
112
117
|
showLogicTab: boolean;
|
|
113
118
|
useTableViewInLogicTab: boolean;
|
|
114
|
-
/**
|
|
115
|
-
* Set delay for page hover
|
|
116
|
-
*/
|
|
117
119
|
pageHoverDelay: number;
|
|
118
120
|
/**
|
|
119
|
-
*
|
|
121
|
+
* Allows users to edit choice values instead of choice texts on the design surface.
|
|
122
|
+
*
|
|
123
|
+
* Default value: `false` (users edit choice texts)
|
|
124
|
+
*
|
|
125
|
+
* If you enable this property, users cannot edit choice texts because the Property Grid hides the Text column for choices, rate values, columns and rows in [Single-Select Matrix](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-question-model), and rows in [Multi-Select Matrix](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-with-dropdown-list) questions.
|
|
126
|
+
* @see showObjectTitles
|
|
120
127
|
*/
|
|
121
128
|
inplaceEditForValues: boolean;
|
|
122
|
-
/**
|
|
123
|
-
* Obsolete. Use the [`showSurveyTitle`](https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#showSurveyTitle) property instead.
|
|
124
|
-
*/
|
|
125
129
|
get allowEditSurveyTitle(): boolean;
|
|
126
130
|
set allowEditSurveyTitle(val: boolean);
|
|
127
131
|
/**
|
|
128
|
-
* Specifies whether users can see and edit the survey
|
|
132
|
+
* Specifies whether users can see and edit the survey header and related survey properties.
|
|
129
133
|
*
|
|
130
134
|
* Default value: `true`
|
|
131
135
|
*/
|
|
@@ -135,9 +139,11 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
135
139
|
set haveCommercialLicense(val: boolean);
|
|
136
140
|
get licenseText(): string;
|
|
137
141
|
/**
|
|
138
|
-
* Specifies whether to
|
|
142
|
+
* Specifies whether to automatically save a survey or theme JSON schema each time survey or theme settings are changed.
|
|
139
143
|
*
|
|
140
144
|
* Default value: `false`
|
|
145
|
+
*
|
|
146
|
+
* If you enable this property, Survey Creator calls the [`saveSurveyFunc`](#saveSurveyFunc) or [`saveThemeFunc`](#saveThemeFunc) function to save the survey or theme JSON schema. The schemas are saved with a 500-millisecond delay after users change settings. You can specify the [`autoSaveDelay`](#autoSaveDelay) property to increase or descrease the delay.
|
|
141
147
|
*/
|
|
142
148
|
isAutoSave: boolean;
|
|
143
149
|
showOptions: boolean;
|
|
@@ -163,7 +169,19 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
163
169
|
private changePageModifications;
|
|
164
170
|
private pageEditModeValue;
|
|
165
171
|
/**
|
|
166
|
-
*
|
|
172
|
+
* Specifies how Survey Creator users edit survey pages.
|
|
173
|
+
*
|
|
174
|
+
* Accepted values:
|
|
175
|
+
*
|
|
176
|
+
* - `"standard"` (default)
|
|
177
|
+
* Questions and panels are divided between pages. Users can scroll the design surface to reach a required page.
|
|
178
|
+
*
|
|
179
|
+
* - `"single"`
|
|
180
|
+
* All questions and panels belong to a single page. Users cannot add or remove pages.
|
|
181
|
+
*
|
|
182
|
+
* - `"bypage"`
|
|
183
|
+
* Questions and panels are divided between pages. Users can use the page navigator to switch to a required page.
|
|
184
|
+
* @see allowModifyPages
|
|
167
185
|
*/
|
|
168
186
|
get pageEditMode(): "standard" | "single" | "bypage";
|
|
169
187
|
set pageEditMode(val: "standard" | "single" | "bypage");
|
|
@@ -180,28 +198,12 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
180
198
|
private saveSurveyFuncValue;
|
|
181
199
|
private saveThemeFuncValue;
|
|
182
200
|
viewType: string;
|
|
183
|
-
/**
|
|
184
|
-
* Returns the current show view name. The possible returns values are:
|
|
185
|
-
* "designer", "editor", "test", "embed", "logic" and "translation".
|
|
186
|
-
* @see showDesigner
|
|
187
|
-
* @see showPreview
|
|
188
|
-
* @see showJsonEditor
|
|
189
|
-
* @see showLogicEditor
|
|
190
|
-
* @see showTranslationEditor
|
|
191
|
-
* @see showEmbedEditor
|
|
192
|
-
*/
|
|
193
201
|
get showingViewName(): string;
|
|
194
202
|
get isDesignerShowing(): boolean;
|
|
195
203
|
showDesigner(): void;
|
|
196
204
|
get isTestSurveyShowing(): boolean;
|
|
197
|
-
/**
|
|
198
|
-
* Return true if Preview tab is currently active
|
|
199
|
-
*/
|
|
200
205
|
get isPreviewShowing(): boolean;
|
|
201
206
|
showTestSurvey(): void;
|
|
202
|
-
/**
|
|
203
|
-
* Show Preview tab
|
|
204
|
-
*/
|
|
205
207
|
showPreview(): void;
|
|
206
208
|
protected plugins: {
|
|
207
209
|
[name: string]: ICreatorPlugin;
|
|
@@ -210,11 +212,19 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
210
212
|
addPlugin(name: string, plugin: ICreatorPlugin): void;
|
|
211
213
|
getPlugin<P extends ICreatorPlugin = ICreatorPlugin>(name: string): P;
|
|
212
214
|
/**
|
|
213
|
-
*
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
215
|
+
* An event that is raised before a survey element (a question, panel, or page) is deleted.
|
|
216
|
+
*
|
|
217
|
+
* Parameters:
|
|
218
|
+
*
|
|
219
|
+
* - `sender`: `CreatorBase`\
|
|
220
|
+
* A Survey Creator instance that raised the event.
|
|
221
|
+
* - `options.element`: [`Survey.Base`](https://surveyjs.io/form-library/documentation/api-reference/base)\
|
|
222
|
+
* A survey element to be deleted.
|
|
223
|
+
* - `options.elementType`: `"question"` | `"panel"` | `"page"`\
|
|
224
|
+
* The element type.
|
|
225
|
+
* - `options.allowing`: `boolean`\
|
|
226
|
+
* A Boolean property that you can set to `false` if you want to cancel element deletion.
|
|
227
|
+
* @see deleteElement
|
|
218
228
|
*/
|
|
219
229
|
onElementDeleting: CreatorEvent;
|
|
220
230
|
/**
|
|
@@ -280,54 +290,72 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
280
290
|
*/
|
|
281
291
|
onHtmlToMarkdown: CreatorEvent;
|
|
282
292
|
/**
|
|
283
|
-
* Use this event to disable user interactions with a question or
|
|
293
|
+
* An event that is raised when Survey Creator obtains permitted operations for a survey element. Use this event to disable user interactions with a question, panel, or page on the design surface.
|
|
284
294
|
*
|
|
285
|
-
*
|
|
295
|
+
* Parameters:
|
|
286
296
|
*
|
|
287
|
-
* - `sender
|
|
288
|
-
*
|
|
289
|
-
* - `options.
|
|
290
|
-
*
|
|
291
|
-
* - `options.
|
|
292
|
-
*
|
|
293
|
-
* - `options.
|
|
294
|
-
*
|
|
295
|
-
* - `options.
|
|
296
|
-
*
|
|
297
|
+
* - `sender`: `CreatorBase`\
|
|
298
|
+
* A Survey Creator instance that raised the event.
|
|
299
|
+
* - `options.obj`: [`Survey.Base`](https://surveyjs.io/form-library/documentation/api-reference/base)\
|
|
300
|
+
* A survey element (question or panel) for which you can disable user interactions.
|
|
301
|
+
* - `options.allowChangeRequired`: `boolean`\
|
|
302
|
+
* Allows users to mark the survey element as required.
|
|
303
|
+
* - `options.allowChangeType`: `boolean`\
|
|
304
|
+
* Allows users to change the survey element type.
|
|
305
|
+
* - `options.allowChangeInputType`: `boolean`\
|
|
306
|
+
* Allows users to change the [`inputType`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#inputType) property of Single-Line Input questions.
|
|
307
|
+
* - `options.allowCopy`: `boolean`\
|
|
308
|
+
* Allows users to duplicate the survey element.
|
|
309
|
+
* - `options.allowDelete`: `boolean`\
|
|
310
|
+
* Allows users to delete the survey element.
|
|
311
|
+
* - `options.allowDragging`: `boolean`\
|
|
312
|
+
* Allows users to drag and drop the survey element.
|
|
313
|
+
* - `options.allowEdit`: `boolean`\
|
|
314
|
+
* Allows users to edit survey element properties on the design surface. If you disable this property, users can edit the properties only in the Property Grid.
|
|
297
315
|
*
|
|
298
316
|
* To disable a user interaction, set the correponding `allow...` property to `false`.
|
|
317
|
+
*
|
|
318
|
+
* [Specify Adorner Visibility](https://surveyjs.io/survey-creator/documentation/customize-survey-creation-process#specify-adorner-availability (linkStyle))
|
|
299
319
|
*/
|
|
300
320
|
onElementAllowOperations: CreatorEvent;
|
|
301
321
|
/**
|
|
302
|
-
* Use this event to
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
322
|
+
* An event that is raised when Survey Creator obtains [adorners](https://surveyjs.io/survey-creator/documentation/customize-survey-creation-process#specify-adorner-availability) for a survey element. Use this event to hide and modify predefined adorners or add a custom adorner.
|
|
323
|
+
*
|
|
324
|
+
* Parameters:
|
|
325
|
+
*
|
|
326
|
+
* - `sender`: `CreatorBase`\
|
|
327
|
+
* A Survey Creator instance that raised the event.
|
|
328
|
+
* - `options.obj`: [`Survey.Base`](https://surveyjs.io/form-library/documentation/api-reference/base)\
|
|
329
|
+
* A survey element (question, panel, or page) whose adorners you can customize.
|
|
330
|
+
* - `options.items`: [`IAction[]`](https://surveyjs.io/form-library/documentation/api-reference/iaction#title)\
|
|
331
|
+
* An array of adorner actions. You can add, modify, or remove actions from this array.
|
|
332
|
+
*
|
|
333
|
+
* [View Demo](https://surveyjs.io/survey-creator/examples/create-custom-adorners/ (linkStyle))
|
|
306
334
|
* @see onElementAllowOperations
|
|
335
|
+
* @see onGetPageActions
|
|
307
336
|
*/
|
|
308
337
|
onDefineElementMenuItems: CreatorEvent;
|
|
309
338
|
/**
|
|
310
|
-
*
|
|
311
|
-
*- sender the survey creator object that fires the event
|
|
312
|
-
*- options.obj the survey object, Survey, Page, Panel or Question
|
|
313
|
-
*- options.property the object property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties.
|
|
314
|
-
*- 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.
|
|
315
|
-
*- 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).
|
|
316
|
-
*- 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.
|
|
339
|
+
* An event that is raised when Survey Creator adds properties to a survey element selected on the design surface. Handle this event if you cancel the addition of certain properties and thus [hide them from the Property Grid](https://surveyjs.io/survey-creator/documentation/property-grid-customization#hide-properties-from-the-property-grid).
|
|
317
340
|
*
|
|
318
|
-
*
|
|
341
|
+
* Parameters:
|
|
342
|
+
*
|
|
343
|
+
* - `sender`: `CreatorBase`\
|
|
344
|
+
* A Survey Creator instance that raised the event.
|
|
345
|
+
* - `options.property`: `JsonObjectProperty`\
|
|
346
|
+
* A property being added.
|
|
347
|
+
* - `options.parentProperty`: `JsonObjectProperty`\
|
|
348
|
+
* A property that nests `options.property` (`choices` for an item value, `columns` for a matrix column, `rows` for a matrix row etc.). `options.parentProperty` has a value only for nested properties.
|
|
349
|
+
* - `options.obj`: `any`\
|
|
350
|
+
* A survey element that contains `options.property`: page, panel, question, the survey itself, item value (choice option), matrix column, etc.
|
|
351
|
+
* - `options.parentObj`: `any`\
|
|
352
|
+
* A survey element that contains `options.parentProperty`. `options.parentObj` has a value only for nested properties.
|
|
353
|
+
* - `options.canShow`: `boolean`\
|
|
354
|
+
* A Boolean property that you can set to `false` if you do not want to add the property.
|
|
355
|
+
*
|
|
356
|
+
* [View Demo](https://surveyjs.io/survey-creator/examples/hide-category-from-property-grid/ (linkStyle))
|
|
319
357
|
*/
|
|
320
358
|
onShowingProperty: CreatorEvent;
|
|
321
|
-
/**
|
|
322
|
-
* @Deprecated Obsolete, please use onShowingProperty event.
|
|
323
|
-
* The event is called before showing a property in the Property Grid or in Question Editor.
|
|
324
|
-
*- sender the survey creator object that fires the event
|
|
325
|
-
*- options.obj the survey object, Survey, Page, Panel or Question
|
|
326
|
-
*- options.property the object property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties.
|
|
327
|
-
*- options.canShow a boolean value. It is true by default. Set it false to hide the property from the Property Grid or in Question Editor
|
|
328
|
-
*- 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).
|
|
329
|
-
*- 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.
|
|
330
|
-
*/
|
|
331
359
|
onCanShowProperty: CreatorEvent;
|
|
332
360
|
/**
|
|
333
361
|
* The event is called after a survey that represents the Property Grid is created and all its questions (property editors) are setup.
|
|
@@ -368,28 +396,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
368
396
|
* - `options.popupModel` - A `PopupBaseViewModel` object that describes the pop-up window model. Use `options.popupModel.footerToolbar` to access the actions at the bottom of the window.
|
|
369
397
|
*/
|
|
370
398
|
onPropertyGridShowModal: CreatorEvent;
|
|
371
|
-
/**
|
|
372
|
-
* The event is called before rendering a delete button in the Property Grid or in Question Editor.
|
|
373
|
-
* @Deprecated Obsolete, please use onCollectionItemAllowOperations
|
|
374
|
-
*- sender the survey creator object that fires the event
|
|
375
|
-
*- options.obj the survey Question
|
|
376
|
-
*- options.item the object property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties
|
|
377
|
-
*- 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
|
|
378
|
-
* @see onCollectionItemAllowOperations
|
|
379
|
-
*/
|
|
380
399
|
onCanDeleteItem: CreatorEvent;
|
|
381
|
-
/**
|
|
382
|
-
* 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.
|
|
383
|
-
* @Deprecated Obsolete, please use onCollectionItemAllowOperations
|
|
384
|
-
*- sender the survey creator object that fires the event
|
|
385
|
-
*- options.obj the survey object: Question, Panel, Page or Survey
|
|
386
|
-
*- options.property the collection property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties
|
|
387
|
-
*- options.propertyName the collection property name
|
|
388
|
-
*- 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.
|
|
389
|
-
*- options.item the collection item that we are going to delete
|
|
390
|
-
*- options.allowDelete a boolean value. It is true by default. Set it false to abondome the element removing from the collection
|
|
391
|
-
* @see onCollectionItemAllowOperations
|
|
392
|
-
*/
|
|
393
400
|
onCollectionItemDeleting: CreatorEvent;
|
|
394
401
|
/**
|
|
395
402
|
* The event is called before rendering a collection item in a property editor. For example: a column in a column editor, or an item in Choices and so on.
|
|
@@ -505,7 +512,6 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
505
512
|
* - `options.questionName`: `String`\
|
|
506
513
|
* The name of a question for which conditions are displayed.
|
|
507
514
|
* - `options.questionName`: `String`\
|
|
508
|
-
* The type of a question for which conditions are displayed.
|
|
509
515
|
* The name of a question for which conditions are displayed.
|
|
510
516
|
* - `options.operator`: `"empty"` | `"notempty"` | `"equal"` | `"notequal"` | `"contains"` | `"notcontains"` | `"anyof"` | `"allof"` | `"greater"` | `"less"` | `"greaterorequal"` | `"lessorequal"`\
|
|
511
517
|
* A condition opeator for which the event is raised.
|
|
@@ -585,24 +591,50 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
585
591
|
*/
|
|
586
592
|
onModified: CreatorEvent;
|
|
587
593
|
/**
|
|
588
|
-
*
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
594
|
+
* An event that is raised when users add a question to the survey. Use this event to customize the question.
|
|
595
|
+
*
|
|
596
|
+
* Parameters:
|
|
597
|
+
*
|
|
598
|
+
* - `sender`: `CreatorBase`\
|
|
599
|
+
* A Survey Creator instance that raised the event.
|
|
600
|
+
* - `options.question`: [`Question`](https://surveyjs.io/form-library/documentation/api-reference/question)\
|
|
601
|
+
* The question users added.
|
|
602
|
+
* - `options.page`: [`PageModel`](https://surveyjs.io/form-library/documentation/api-reference/page-model)\
|
|
603
|
+
* A page to which the question was added.
|
|
604
|
+
* - `options.reason`: `"DROPPED_FROM_TOOLBOX"` | `"ADDED_FROM_PAGEBUTTON"` | `"ELEMENT_COPIED"`\
|
|
605
|
+
* A value that indicates how the question was added: dragged from the [Toolbox](https://surveyjs.io/survey-creator/documentation/toolbox-customization), created using the Add Question button, or duplicated.
|
|
606
|
+
*
|
|
607
|
+
* [Customize Survey Elements on Creation](https://surveyjs.io/survey-creator/documentation/customize-survey-creation-process#customize-survey-elements-on-creation (linkStyle))
|
|
593
608
|
*/
|
|
594
609
|
onQuestionAdded: CreatorEvent;
|
|
595
610
|
/**
|
|
596
|
-
*
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
611
|
+
* An event that is raised when users add a [Panel](https://surveyjs.io/form-library/documentation/api-reference/panel-model) element to the survey. Use this event to customize the panel.
|
|
612
|
+
*
|
|
613
|
+
* Parameters:
|
|
614
|
+
*
|
|
615
|
+
* - `sender`: `CreatorBase`\
|
|
616
|
+
* A Survey Creator instance that raised the event.
|
|
617
|
+
* - `options.panel`: [`PanelModel`](https://surveyjs.io/form-library/documentation/api-reference/panel-model)\
|
|
618
|
+
* The panel users added.
|
|
619
|
+
* - `options.page`: [`PageModel`](https://surveyjs.io/form-library/documentation/api-reference/page-model)\
|
|
620
|
+
* A page to which the panel was added.
|
|
621
|
+
* - `options.reason`: `"DROPPED_FROM_TOOLBOX"` | `"ADDED_FROM_PAGEBUTTON"` | `"ELEMENT_COPIED"`\
|
|
622
|
+
* A value that indicates how the panel was added: dragged from the [Toolbox](https://surveyjs.io/survey-creator/documentation/toolbox-customization), created using the Add Question button, or duplicated.
|
|
623
|
+
*
|
|
624
|
+
* [Customize Survey Elements on Creation](https://surveyjs.io/survey-creator/documentation/customize-survey-creation-process#customize-survey-elements-on-creation (linkStyle))
|
|
600
625
|
*/
|
|
601
626
|
onPanelAdded: CreatorEvent;
|
|
602
627
|
/**
|
|
603
|
-
*
|
|
604
|
-
|
|
605
|
-
|
|
628
|
+
* An event that is raised when a new page is added to the survey. Use this event to customize the page.
|
|
629
|
+
*
|
|
630
|
+
* Parameters:
|
|
631
|
+
*
|
|
632
|
+
* - `sender`: `CreatorBase`\
|
|
633
|
+
* A Survey Creator instance that raised the event.
|
|
634
|
+
* - `options.page`: [`PageModel`](https://surveyjs.io/form-library/documentation/api-reference/page-model)\
|
|
635
|
+
* The page users added.
|
|
636
|
+
*
|
|
637
|
+
* [Customize Survey Elements on Creation](https://surveyjs.io/survey-creator/documentation/customize-survey-creation-process#customize-survey-elements-on-creation (linkStyle))
|
|
606
638
|
*/
|
|
607
639
|
onPageAdded: CreatorEvent;
|
|
608
640
|
/**
|
|
@@ -613,29 +645,44 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
613
645
|
* - `sender`: `CreatorBase`\
|
|
614
646
|
* A Survey Creator instance that raised the event.
|
|
615
647
|
* - `options.actions`: [`IAction[]`](/form-library/documentation/api-reference/iaction)\
|
|
616
|
-
* An array of actions. You can add or remove actions from this array.
|
|
648
|
+
* An array of actions. You can add, modify, or remove actions from this array.
|
|
617
649
|
* - `options.page`: [`PageModel`](/form-library/documentation/api-reference/page-model)\
|
|
618
650
|
* A page for which the event is raised.
|
|
619
651
|
* - `options.addNewQuestion(type)`: Method\
|
|
620
652
|
* Adds a new question of a specified [`type`](/form-library/documentation/api-reference/question#getType) to the page.
|
|
653
|
+
* @see onDefineElementMenuItems
|
|
621
654
|
*/
|
|
622
655
|
onGetPageActions: CreatorEvent;
|
|
623
656
|
/**
|
|
624
|
-
*
|
|
625
|
-
|
|
626
|
-
|
|
657
|
+
* An event that is raised when Survey Creator instantiates a survey for the [Designer](https://surveyjs.io/survey-creator/documentation/end-user-guide#designer-tab) tab. Use this event to customize the survey.
|
|
658
|
+
*
|
|
659
|
+
* Parameters:
|
|
660
|
+
*
|
|
661
|
+
* - `sender`: `CreatorBase`\
|
|
662
|
+
* A Survey Creator instance that raised the event.
|
|
663
|
+
* - `options.survey`: [`SurveyModel`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model)\
|
|
664
|
+
* A survey to be displayed in the Designer tab.
|
|
665
|
+
*
|
|
666
|
+
* [Design Mode Survey Instance](https://surveyjs.io/survey-creator/documentation/customize-survey-creation-process#design-mode-survey-instance (linkStyle))
|
|
667
|
+
*
|
|
668
|
+
* > If you want this event raised at startup, assign a survey JSON schema to the [`JSON`](#JSON) property *after* you add a handler to the event. If the JSON schema should be empty, specify the `JSON` property with an empty object.
|
|
627
669
|
*/
|
|
628
670
|
onDesignerSurveyCreated: CreatorEvent;
|
|
629
671
|
/**
|
|
630
|
-
*
|
|
631
|
-
|
|
632
|
-
|
|
672
|
+
* An event that is raised when Survey Creator instantiates a survey for the [Preview](https://surveyjs.io/survey-creator/documentation/end-user-guide#preview-tab) tab. Use this event to customize the survey.
|
|
673
|
+
*
|
|
674
|
+
* Parameters:
|
|
675
|
+
*
|
|
676
|
+
* - `sender`: `CreatorBase`\
|
|
677
|
+
* A Survey Creator instance that raised the event.
|
|
678
|
+
* - `options.survey`: [`SurveyModel`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model)\
|
|
679
|
+
* A survey to be displayed in the Preview tab.
|
|
680
|
+
*
|
|
681
|
+
* [Preview Mode Survey Instance](https://surveyjs.io/survey-creator/documentation/customize-survey-creation-process#preview-mode-survey-instance (linkStyle))
|
|
682
|
+
*
|
|
683
|
+
* > If you want this event raised at startup, assign a survey JSON schema to the [`JSON`](#JSON) property *after* you add a handler to the event. If the JSON schema should be empty, specify the `JSON` property with an empty object.
|
|
633
684
|
*/
|
|
634
685
|
onPreviewSurveyCreated: CreatorEvent;
|
|
635
|
-
/**
|
|
636
|
-
* Obsolete. Please use onPreviewSurveyCreated event.
|
|
637
|
-
* @see onPreviewSurveyCreated
|
|
638
|
-
*/
|
|
639
686
|
onTestSurveyCreated: CreatorEvent;
|
|
640
687
|
/**
|
|
641
688
|
* The event is called in case of UI notifications. By default all notifications are done via built-in alert () function.
|
|
@@ -644,13 +691,28 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
644
691
|
*/
|
|
645
692
|
onNotify: CreatorEvent;
|
|
646
693
|
/**
|
|
647
|
-
*
|
|
648
|
-
|
|
694
|
+
* An event that is raised before a survey element (a question, panel, page, or the survey itself) is focused. Use this event to move focus to a different survey element.
|
|
695
|
+
*
|
|
696
|
+
* Parameters:
|
|
697
|
+
*
|
|
698
|
+
* - `sender`: `CreatorBase`\
|
|
699
|
+
* A Survey Creator instance that raised the event.
|
|
700
|
+
* - `options.newSelectedElement`: [`Survey.Base`](https://surveyjs.io/form-library/documentation/api-reference/base)\
|
|
701
|
+
* An element that is going to be focused.
|
|
702
|
+
* @see onSelectedElementChanged
|
|
703
|
+
* @see selectedElement
|
|
649
704
|
*/
|
|
650
705
|
onSelectedElementChanging: CreatorEvent;
|
|
651
706
|
/**
|
|
652
|
-
*
|
|
653
|
-
|
|
707
|
+
* An event that is raised after a survey element (a question, panel, page, or the survey itself) is focused.
|
|
708
|
+
*
|
|
709
|
+
* Parameters:
|
|
710
|
+
*
|
|
711
|
+
* - `sender`: `CreatorBase`\
|
|
712
|
+
* A Survey Creator instance that raised the event.
|
|
713
|
+
* - `options.newSelectedElement`: [`Survey.Base`](https://surveyjs.io/form-library/documentation/api-reference/base)\
|
|
714
|
+
* The [focused element](#selectedElement).
|
|
715
|
+
* @see onSelectedElementChanging
|
|
654
716
|
*/
|
|
655
717
|
onSelectedElementChanged: CreatorEvent;
|
|
656
718
|
/**
|
|
@@ -768,27 +830,34 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
768
830
|
*/
|
|
769
831
|
onTranslationItemChanging: CreatorEvent;
|
|
770
832
|
/**
|
|
771
|
-
* Use this event to control drag
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
833
|
+
* An event that is raised when users drag and drop survey elements within the design surface. Use this event to control drag and drop operations.
|
|
834
|
+
*
|
|
835
|
+
* Parameters:
|
|
836
|
+
*
|
|
837
|
+
* - `sender`: `CreatorBase`\
|
|
838
|
+
* A Survey Creator instance that raised the event.
|
|
839
|
+
* - `options.target`: `IElement`\
|
|
840
|
+
* A survey element being dragged.
|
|
841
|
+
* - `options.source`: `IElement`\
|
|
842
|
+
* A survey element from which `target` is being dragged. This parameter is `null` if `target` is being dragged from the [Toolbox](https://surveyjs.io/survey-creator/documentation/toolbox).
|
|
843
|
+
* - `options.insertBefore`: `IElement`\
|
|
844
|
+
* A survey element before which the target element will be placed. This parameter is `null` if the parent container (page or panel) has no elements or if the target element will be placed below all other elements within the container.
|
|
845
|
+
* - `options.insertAfter`: `IElement`\
|
|
846
|
+
* A survey element after which `target` will be placed. This parameter is `null` if the parent container (page or panel) has no elements or if `target` will be placed above all other elements within the container.
|
|
847
|
+
* - `options.parent`: `ISurveyElement`\
|
|
848
|
+
* A parent container (page or panel) within which `target` will be placed.
|
|
849
|
+
* - `options.survey`: [`SurveyModel`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model)\
|
|
850
|
+
* A survey within which the drag and drop operation occured.
|
|
851
|
+
* - `options.allow`: `boolean`\
|
|
852
|
+
* A Boolean property that you can set to `false` if you want to cancel the drag and drop operation.
|
|
853
|
+
* @see onDragStart
|
|
854
|
+
* @see onDragEnd
|
|
780
855
|
*/
|
|
781
856
|
onDragDropAllow: CreatorEvent;
|
|
782
|
-
/**
|
|
783
|
-
* This callback is used internally for providing survey JSON text.
|
|
784
|
-
*/
|
|
785
857
|
getSurveyJSONTextCallback: () => {
|
|
786
858
|
text: string;
|
|
787
859
|
isModified: boolean;
|
|
788
860
|
};
|
|
789
|
-
/**
|
|
790
|
-
* This callback is used internally for setting survey JSON text.
|
|
791
|
-
*/
|
|
792
861
|
setSurveyJSONTextCallback: (text: string) => void;
|
|
793
862
|
/**
|
|
794
863
|
* Limits the number of items in a logical expression.
|
|
@@ -864,23 +933,17 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
864
933
|
* Default value: -1 (unlimited)
|
|
865
934
|
*/
|
|
866
935
|
maxNestedPanels: number;
|
|
867
|
-
/**
|
|
868
|
-
* Obsolete. Use the [`showPagesInPreviewTab`](https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#showPagesInPreviewTab) property instead.
|
|
869
|
-
*/
|
|
870
936
|
showPagesInTestSurveyTab: boolean;
|
|
871
937
|
/**
|
|
872
|
-
* Specifies whether to show
|
|
938
|
+
* Specifies whether to show a page selector at the bottom of the Preview tab.
|
|
873
939
|
*
|
|
874
940
|
* Default value: `true`
|
|
875
941
|
*/
|
|
876
942
|
get showPagesInPreviewTab(): boolean;
|
|
877
943
|
set showPagesInPreviewTab(val: boolean);
|
|
878
|
-
/**
|
|
879
|
-
* Obsolete. Use the [`showSimulatorInPreviewTab`](https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#showSimulatorInPreviewTab) property instead.
|
|
880
|
-
*/
|
|
881
944
|
showSimulatorInTestSurveyTab: boolean;
|
|
882
945
|
/**
|
|
883
|
-
* Specifies whether the Preview tab displays
|
|
946
|
+
* Specifies whether the Preview tab displays a Device button that allows users to preview the survey on different device types.
|
|
884
947
|
*
|
|
885
948
|
* Default value: `true`
|
|
886
949
|
*/
|
|
@@ -892,28 +955,35 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
892
955
|
* Accepted values: `"modern"`, `"default"`, `"defaultV2"`
|
|
893
956
|
*
|
|
894
957
|
* Default value: `"defaultV2"`
|
|
958
|
+
* @see allowChangeThemeInPreview
|
|
895
959
|
*/
|
|
896
960
|
themeForPreview: string;
|
|
897
|
-
|
|
898
|
-
|
|
961
|
+
/**
|
|
962
|
+
* A function that is called each time users click the [Save button](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#showSaveButton) or [auto-save](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#isAutoSave) is triggered to save a theme JSON object.
|
|
963
|
+
*
|
|
964
|
+
* For more information, refer to the [Save and Load Custom Themes](/survey-creator/documentation/theme-editor#save-and-load-custom-themes) help topic.
|
|
965
|
+
* @see showThemeTab
|
|
966
|
+
* @see saveSurveyFunc
|
|
967
|
+
*/
|
|
968
|
+
get saveThemeFunc(): any;
|
|
969
|
+
set saveThemeFunc(value: any);
|
|
970
|
+
isThemeModified: boolean;
|
|
899
971
|
private _theme;
|
|
900
972
|
get theme(): ITheme;
|
|
901
973
|
set theme(newTheme: ITheme);
|
|
902
|
-
|
|
974
|
+
doSaveTheme(): void;
|
|
903
975
|
private _allowModifyPages;
|
|
904
976
|
/**
|
|
905
977
|
* Specifies whether users can add, edit, and delete survey pages.
|
|
906
978
|
*
|
|
907
979
|
* Default value: `true`
|
|
980
|
+
* @see pageEditMode
|
|
908
981
|
*/
|
|
909
982
|
get allowModifyPages(): boolean;
|
|
910
983
|
set allowModifyPages(val: boolean);
|
|
911
|
-
/**
|
|
912
|
-
* Obsolete. Use the [`showDefaultLanguageInPreviewTab`](https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#showDefaultLanguageInPreviewTab) property instead.
|
|
913
|
-
*/
|
|
914
984
|
showDefaultLanguageInTestSurveyTab: boolean | string;
|
|
915
985
|
/**
|
|
916
|
-
* Specifies whether the Preview tab displays
|
|
986
|
+
* Specifies whether the Preview tab displays a language selector.
|
|
917
987
|
*
|
|
918
988
|
* Accepted values:
|
|
919
989
|
*
|
|
@@ -921,7 +991,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
921
991
|
* Display the language selector only if the survey is translated into more than one language.
|
|
922
992
|
*
|
|
923
993
|
* - `true`
|
|
924
|
-
* Always display the language selector regardless of how many languages
|
|
994
|
+
* Always display the language selector regardless of how many languages the survey uses.
|
|
925
995
|
*
|
|
926
996
|
* - `false`
|
|
927
997
|
* Never display the language selector.
|
|
@@ -929,16 +999,13 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
929
999
|
* - `"all"`
|
|
930
1000
|
* Always display the language selector with [all supported languages](https://github.com/surveyjs/survey-creator/tree/master/packages/survey-creator-core/src/localization).
|
|
931
1001
|
*
|
|
932
|
-
*
|
|
1002
|
+
* [Localization & Globalization](https://surveyjs.io/survey-creator/documentation/survey-localization-translate-surveys-to-different-languages (linkStyle))
|
|
933
1003
|
*/
|
|
934
1004
|
get showDefaultLanguageInPreviewTab(): boolean | string;
|
|
935
1005
|
set showDefaultLanguageInPreviewTab(val: boolean | string);
|
|
936
|
-
/**
|
|
937
|
-
* Obsolete. Use the [`showInvisibleElementsInPreviewTab`](https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#showInvisibleElementsInPreviewTab) property instead.
|
|
938
|
-
*/
|
|
939
1006
|
showInvisibleElementsInTestSurveyTab: boolean;
|
|
940
1007
|
/**
|
|
941
|
-
* Specifies whether the Preview tab displays a
|
|
1008
|
+
* Specifies whether the Preview tab displays a toggle that allows users to show or hide invisible survey elements.
|
|
942
1009
|
*
|
|
943
1010
|
* Default value: `true`
|
|
944
1011
|
*/
|
|
@@ -954,6 +1021,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
954
1021
|
* Default value: `true`
|
|
955
1022
|
*
|
|
956
1023
|
* [View Demo](https://surveyjs.io/Examples/Creator?id=theme-switcher (linkStyle))
|
|
1024
|
+
* @see themeForPreview
|
|
957
1025
|
*/
|
|
958
1026
|
allowChangeThemeInPreview: boolean;
|
|
959
1027
|
tabbedMenu: AdaptiveActionContainer<TabbedMenuItem>;
|
|
@@ -1000,10 +1068,11 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1000
1068
|
*
|
|
1001
1069
|
* - `sender`: `CreatorBase`\
|
|
1002
1070
|
* A Survey Creator instance that raised the event.
|
|
1003
|
-
* - `options.tabName`: `"designer"` | `"test"` | `"theme"` | `"editor"` | `"
|
|
1071
|
+
* - `options.tabName`: `"designer"` | `"test"` | `"theme"` | `"editor"` | `"logic"` | `"translation"`\
|
|
1004
1072
|
* A tab that is going to become active.
|
|
1005
1073
|
* - `options.allow`: `Boolean`\
|
|
1006
1074
|
* Specifies whether the active tab can be switched. Set this property to `false` if you want to cancel the switch.
|
|
1075
|
+
* @see makeNewViewActive
|
|
1007
1076
|
*/
|
|
1008
1077
|
onActiveTabChanging: CreatorEvent;
|
|
1009
1078
|
/**
|
|
@@ -1013,22 +1082,32 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1013
1082
|
*
|
|
1014
1083
|
* - `sender`: `CreatorBase`\
|
|
1015
1084
|
* A Survey Creator instance that raised the event.
|
|
1016
|
-
* - `options.tabName`: `"designer"` | `"test"` | `"theme"` | `"editor"` | `"
|
|
1085
|
+
* - `options.tabName`: `"designer"` | `"test"` | `"theme"` | `"editor"` | `"logic"` | `"translation"`\
|
|
1017
1086
|
* A tab that has become active.
|
|
1087
|
+
* @see makeNewViewActive
|
|
1018
1088
|
*/
|
|
1019
1089
|
onActiveTabChanged: CreatorEvent;
|
|
1020
1090
|
/**
|
|
1021
|
-
*
|
|
1022
|
-
*
|
|
1023
|
-
*
|
|
1091
|
+
* Gets or sets the currently displayed tab.
|
|
1092
|
+
*
|
|
1093
|
+
* Possible values:
|
|
1094
|
+
*
|
|
1095
|
+
* - [`"designer"`](#showDesignerTab)
|
|
1096
|
+
* - [`"test"`](#showPreviewTab)
|
|
1097
|
+
* - [`"theme"`](#showThemeTab)
|
|
1098
|
+
* - [`"editor"`](#showJSONEditorTab)
|
|
1099
|
+
* - [`"logic"`](#showLogicTab)
|
|
1100
|
+
* - [`"translation"`](#showLogicTab)
|
|
1101
|
+
* @see makeNewViewActive
|
|
1024
1102
|
*/
|
|
1025
1103
|
get activeTab(): string;
|
|
1026
1104
|
set activeTab(val: string);
|
|
1027
1105
|
/**
|
|
1028
|
-
*
|
|
1029
|
-
* @param
|
|
1106
|
+
* Switches the [active tab](#activeTab). Returns `false` if the tab cannot be switched.
|
|
1107
|
+
* @param tabName A tab that you want to make active: `"designer"`, `"test"`, `"theme"`, `"editor"`, `"logic"`, or `"translation"`.
|
|
1108
|
+
* @returns `false` if the active tab cannot be switched, `true` otherwise.
|
|
1030
1109
|
*/
|
|
1031
|
-
makeNewViewActive(
|
|
1110
|
+
makeNewViewActive(tabName: string): boolean;
|
|
1032
1111
|
private switchViewType;
|
|
1033
1112
|
private canSwitchViewType;
|
|
1034
1113
|
private activatePlugin;
|
|
@@ -1058,45 +1137,53 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1058
1137
|
rightContainerActiveItem(name: string): void;
|
|
1059
1138
|
leftContainerActiveItem(name: string): void;
|
|
1060
1139
|
/**
|
|
1061
|
-
*
|
|
1062
|
-
|
|
1140
|
+
* An event that is raised before an undo operation.
|
|
1141
|
+
*
|
|
1142
|
+
* Parameters:
|
|
1143
|
+
*
|
|
1144
|
+
* - `sender`: `CreatorBase`\
|
|
1145
|
+
* A Survey Creator instance that raised the event.
|
|
1146
|
+
* - `options.canUndo`: `boolean`\
|
|
1147
|
+
* A Boolean value that you can set to `false` if you want to prevent the undo operation.
|
|
1148
|
+
* @see undo
|
|
1149
|
+
* @see redo
|
|
1150
|
+
* @see onBeforeRedo
|
|
1063
1151
|
*/
|
|
1064
1152
|
onBeforeUndo: CreatorEvent;
|
|
1065
1153
|
/**
|
|
1066
|
-
*
|
|
1067
|
-
|
|
1154
|
+
* An event that is raised before an redo operation.
|
|
1155
|
+
*
|
|
1156
|
+
* Parameters:
|
|
1157
|
+
*
|
|
1158
|
+
* - `sender`: `CreatorBase`\
|
|
1159
|
+
* A Survey Creator instance that raised the event.
|
|
1160
|
+
* - `options.canRedo`: `boolean`\
|
|
1161
|
+
* A Boolean value that you can set to `false` if you want to prevent the redo operation.
|
|
1162
|
+
* @see redo
|
|
1163
|
+
* @see undo
|
|
1164
|
+
* @see onBeforeUndo
|
|
1068
1165
|
*/
|
|
1069
1166
|
onBeforeRedo: CreatorEvent;
|
|
1070
|
-
/**
|
|
1071
|
-
* The event is called after undo happens.
|
|
1072
|
-
*- options.state is an undo/redo item.
|
|
1073
|
-
*/
|
|
1074
|
-
onAfterUndo: CreatorEvent;
|
|
1075
|
-
/**
|
|
1076
|
-
* The event is called after redo happens.
|
|
1077
|
-
*- options.state is an undo/redo item.
|
|
1078
|
-
*/
|
|
1079
|
-
onAfterRedo: CreatorEvent;
|
|
1080
1167
|
get undoRedoManager(): UndoRedoManager;
|
|
1081
1168
|
get undoRedoController(): UndoRedoController;
|
|
1082
|
-
/**
|
|
1083
|
-
* This method starts undo/redo transaction: all changes will be stored as one undo/redo item.
|
|
1084
|
-
*/
|
|
1085
1169
|
startUndoRedoTransaction(name?: string): void;
|
|
1086
|
-
/**
|
|
1087
|
-
* This method stops undo/redo transaction.
|
|
1088
|
-
*/
|
|
1089
1170
|
stopUndoRedoTransaction(): void;
|
|
1090
1171
|
/**
|
|
1091
|
-
* Returns true if
|
|
1172
|
+
* Returns `true` if an undo or redo operation is in progress.
|
|
1173
|
+
* @see undo
|
|
1174
|
+
* @see redo
|
|
1092
1175
|
*/
|
|
1093
1176
|
get isProcessingUndoRedo(): boolean;
|
|
1094
1177
|
/**
|
|
1095
|
-
*
|
|
1178
|
+
* Cancels the last change if possible.
|
|
1179
|
+
* @see redo
|
|
1180
|
+
* @see onBeforeUndo
|
|
1096
1181
|
*/
|
|
1097
1182
|
undo(): void;
|
|
1098
1183
|
/**
|
|
1099
|
-
*
|
|
1184
|
+
* Repeats the last undone action if possible.
|
|
1185
|
+
* @see undo
|
|
1186
|
+
* @see onBeforeRedo
|
|
1100
1187
|
*/
|
|
1101
1188
|
redo(): void;
|
|
1102
1189
|
get selectionHistoryController(): SelectionHistory;
|
|
@@ -1155,6 +1242,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1155
1242
|
* - `options.toElement`: `any`\
|
|
1156
1243
|
* A survey element to which `draggedElement` is being dragged.
|
|
1157
1244
|
* @see onDragEnd
|
|
1245
|
+
* @see onDragDropAllow
|
|
1158
1246
|
*/
|
|
1159
1247
|
onDragStart: Event<() => any, any, any>;
|
|
1160
1248
|
onBeforeDrop: Event<() => any, any, any>;
|
|
@@ -1171,6 +1259,8 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1171
1259
|
* A survey element from which `draggedElement` was dragged.
|
|
1172
1260
|
* - `options.toElement`: `any`\
|
|
1173
1261
|
* A survey element to which `draggedElement` was dragged.
|
|
1262
|
+
* @see onDragStart
|
|
1263
|
+
* @see onDragDropAllow
|
|
1174
1264
|
*/
|
|
1175
1265
|
onDragEnd: Event<() => any, any, any>;
|
|
1176
1266
|
onAfterDrop: Event<() => any, any, any>;
|
|
@@ -1265,22 +1355,20 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1265
1355
|
*/
|
|
1266
1356
|
fastCopyQuestion(question: Base): IElement;
|
|
1267
1357
|
/**
|
|
1268
|
-
*
|
|
1358
|
+
* Gets or sets the focused survey element: a question, panel, page, or the survey itself.
|
|
1359
|
+
* @see onSelectedElementChanging
|
|
1360
|
+
* @see onSelectedElementChanged
|
|
1269
1361
|
*/
|
|
1270
1362
|
get selectedElement(): Base;
|
|
1271
1363
|
set selectedElement(val: Base);
|
|
1272
|
-
/**
|
|
1273
|
-
* @Deprecated Obsolete. Please use deleteCurrentElement.
|
|
1274
|
-
* @see deleteCurrentElement
|
|
1275
|
-
*/
|
|
1276
1364
|
deleteCurrentObject(): void;
|
|
1277
|
-
/**
|
|
1278
|
-
* Delete a currently selected element in the survey. It can be a question, a panel or a page.
|
|
1279
|
-
*/
|
|
1280
1365
|
deleteCurrentElement(): void;
|
|
1281
1366
|
/**
|
|
1282
|
-
*
|
|
1283
|
-
*
|
|
1367
|
+
* Deletes a survey element: a question, panel, or page.
|
|
1368
|
+
*
|
|
1369
|
+
* If you want to delete the focused element, pass the [`selectedElement`](#selectedElement) property value to this method.
|
|
1370
|
+
* @param element A survey element to delete.
|
|
1371
|
+
* @see onElementDeleting
|
|
1284
1372
|
*/
|
|
1285
1373
|
deleteElement(element: Base): void;
|
|
1286
1374
|
/**
|
|
@@ -1300,61 +1388,36 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1300
1388
|
protected get designerPropertyGrid(): PropertyGridModel;
|
|
1301
1389
|
get propertyGrid(): SurveyModel;
|
|
1302
1390
|
/**
|
|
1303
|
-
*
|
|
1304
|
-
* name
|
|
1305
|
-
* @see collapseAllPropertyGridCategories
|
|
1391
|
+
* Collapses a specified category in Property Grid.
|
|
1392
|
+
* @param name A [category name](https://surveyjs.io/survey-creator/documentation/property-grid-customization#category).
|
|
1306
1393
|
* @see expandPropertyGridCategory
|
|
1307
|
-
* @see expandAllPropertyGridCategories
|
|
1308
1394
|
*/
|
|
1309
1395
|
collapsePropertyGridCategory(name: string): void;
|
|
1310
1396
|
/**
|
|
1311
|
-
*
|
|
1312
|
-
* name
|
|
1397
|
+
* Expands a specified category in Property Grid.
|
|
1398
|
+
* @param name A [category name](https://surveyjs.io/survey-creator/documentation/property-grid-customization#category).
|
|
1313
1399
|
* @see collapsePropertyGridCategory
|
|
1314
|
-
* @see collapseAllPropertyGridCategories
|
|
1315
|
-
* @see expandAllPropertyGridCategories
|
|
1316
1400
|
*/
|
|
1317
1401
|
expandPropertyGridCategory(name: string): void;
|
|
1318
1402
|
/**
|
|
1319
|
-
*
|
|
1320
|
-
* @see collapsePropertyGridCategory
|
|
1321
|
-
* @see expandPropertyGridCategory
|
|
1403
|
+
* Collapses all categories in Property Grid.
|
|
1322
1404
|
* @see expandAllPropertyGridCategories
|
|
1323
1405
|
*/
|
|
1324
1406
|
collapseAllPropertyGridCategories(): void;
|
|
1325
1407
|
/**
|
|
1326
|
-
*
|
|
1327
|
-
* @see collapsePropertyGridCategory
|
|
1408
|
+
* Expands all categories in Property Grid.
|
|
1328
1409
|
* @see collapseAllPropertyGridCategories
|
|
1329
|
-
* @see expandPropertyGridCategory
|
|
1330
1410
|
*/
|
|
1331
1411
|
expandAllPropertyGridCategories(): void;
|
|
1332
|
-
/**
|
|
1333
|
-
* @Deprecated Obsolete. Collapse all property editor tabs (categories) in properties panel/grid
|
|
1334
|
-
* @see collapseAllPropertyGridCategories
|
|
1335
|
-
*
|
|
1336
|
-
*/
|
|
1337
1412
|
collapseAllPropertyTabs(): void;
|
|
1338
|
-
/**
|
|
1339
|
-
* @Deprecated Obsolete. Expand all property editor tabs (categories) in properties panel/grid
|
|
1340
|
-
* @see expandAllPropertyGridCategories
|
|
1341
|
-
*/
|
|
1342
1413
|
expandAllPropertyTabs(): void;
|
|
1343
|
-
/**
|
|
1344
|
-
* @Deprecated Obsolete. Expand certain property editor tab (category) in properties panel/grid
|
|
1345
|
-
* name - tab category name
|
|
1346
|
-
* @see expandPropertyGridCategory
|
|
1347
|
-
*/
|
|
1348
1414
|
expandPropertyTab(name: string): void;
|
|
1349
|
-
/**
|
|
1350
|
-
* @Deprecated Obsolete. Collapse certain property editor tab (category) in properties panel/grid
|
|
1351
|
-
* name - tab category name
|
|
1352
|
-
* @see collapsePropertyGridCategory
|
|
1353
|
-
*/
|
|
1354
1415
|
collapsePropertyTab(name: string): void;
|
|
1355
1416
|
/**
|
|
1356
|
-
*
|
|
1357
|
-
*
|
|
1417
|
+
* Validates the property values of the [focused element](#selectedElement).
|
|
1418
|
+
* @returns `true` if all property values of the focused element are valid or if no element is focused, `false` otherwise.
|
|
1419
|
+
* @see onSelectedElementChanging
|
|
1420
|
+
* @see onSelectedElementChanged
|
|
1358
1421
|
*/
|
|
1359
1422
|
validateSelectedElement(): boolean;
|
|
1360
1423
|
/**
|
|
@@ -1423,25 +1486,17 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1423
1486
|
getHasMachineTranslation(): boolean;
|
|
1424
1487
|
doMachineTranslation(fromLocale: string, toLocale: string, strings: Array<string>, callback: (translated: Array<string>) => void): void;
|
|
1425
1488
|
/**
|
|
1426
|
-
*
|
|
1427
|
-
*
|
|
1428
|
-
*
|
|
1489
|
+
* A delay between changing survey settings and saving the survey JSON schema, measured in milliseconds. Applies only when the [`isAutoSave`](#isAutoSave) property is `true`.
|
|
1490
|
+
*
|
|
1491
|
+
* Default value: 500 (taken from `settings.autoSave.delay`)
|
|
1492
|
+
*
|
|
1493
|
+
* If a user changes the settings once again during the delay, only the latest version will be saved.
|
|
1429
1494
|
*/
|
|
1430
1495
|
autoSaveDelay: number;
|
|
1431
1496
|
private autoSaveTimerId;
|
|
1432
|
-
protected doAutoSave(
|
|
1497
|
+
protected doAutoSave(): void;
|
|
1433
1498
|
saveNo: number;
|
|
1434
1499
|
doSave(): void;
|
|
1435
|
-
doSaveTheme(): void;
|
|
1436
|
-
/**
|
|
1437
|
-
* A function that is called each time users click the [Save button](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#showSaveButton) or [auto-save](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#isAutoSave) is triggered to save a theme JSON object.
|
|
1438
|
-
*
|
|
1439
|
-
* For more information, refer to the [Save and Load Custom Themes](/survey-creator/documentation/theme-editor#save-and-load-custom-themes) help topic.
|
|
1440
|
-
* @see showThemeTab
|
|
1441
|
-
* @see saveSurveyFunc
|
|
1442
|
-
*/
|
|
1443
|
-
get saveThemeFunc(): any;
|
|
1444
|
-
set saveThemeFunc(value: any);
|
|
1445
1500
|
/**
|
|
1446
1501
|
* Specifies whether to display a button that saves the survey or theme (executes the [`saveSurveyFunc`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#saveSurveyFunc) or [`saveThemeFunc`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#saveThemeFunc) function).
|
|
1447
1502
|
* @see isAutoSave
|