survey-creator-core 1.9.82 → 1.9.84

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.
Files changed (100) hide show
  1. package/fonts.fontless.css +1 -1
  2. package/fonts.fontless.min.css +1 -1
  3. package/package.json +2 -2
  4. package/survey-creator-core.css +75 -14
  5. package/survey-creator-core.d.ts +1 -8046
  6. package/survey-creator-core.fontless.css +74 -13
  7. package/survey-creator-core.fontless.css.map +1 -1
  8. package/survey-creator-core.fontless.min.css +4 -4
  9. package/survey-creator-core.i18n.js +126 -128
  10. package/survey-creator-core.i18n.js.map +1 -1
  11. package/survey-creator-core.i18n.min.js +2 -2
  12. package/survey-creator-core.js +447 -152
  13. package/survey-creator-core.js.map +1 -1
  14. package/survey-creator-core.min.css +5 -5
  15. package/survey-creator-core.min.js +2 -2
  16. package/typings/components/action-container-view-model.d.ts +27 -0
  17. package/typings/components/embedded-survey.d.ts +9 -0
  18. package/typings/components/header/logo-image.d.ts +15 -0
  19. package/typings/components/image-item-value.d.ts +21 -0
  20. package/typings/components/item-value.d.ts +42 -0
  21. package/typings/components/link-value.d.ts +27 -0
  22. package/typings/components/matrix-cell.d.ts +25 -0
  23. package/typings/components/page-navigator/page-navigator.d.ts +39 -0
  24. package/typings/components/page.d.ts +28 -0
  25. package/typings/components/question-dropdown.d.ts +18 -0
  26. package/typings/components/question-image.d.ts +9 -0
  27. package/typings/components/question-rating.d.ts +15 -0
  28. package/typings/components/question.d.ts +41 -0
  29. package/typings/components/results.d.ts +40 -0
  30. package/typings/components/row.d.ts +9 -0
  31. package/typings/components/side-bar/side-bar-model.d.ts +34 -0
  32. package/typings/components/side-bar/side-bar-tab-model.d.ts +11 -0
  33. package/typings/components/simulator.d.ts +205 -0
  34. package/typings/components/string-editor.d.ts +68 -0
  35. package/typings/components/tabs/designer-plugin.d.ts +26 -0
  36. package/typings/components/tabs/designer.d.ts +29 -0
  37. package/typings/components/tabs/embed-json.d.ts +1 -0
  38. package/typings/components/tabs/embed.d.ts +13 -0
  39. package/typings/components/tabs/json-editor-ace.d.ts +22 -0
  40. package/typings/components/tabs/json-editor-plugin.d.ts +28 -0
  41. package/typings/components/tabs/json-editor-textarea.d.ts +22 -0
  42. package/typings/components/tabs/logic-actions-model.d.ts +49 -0
  43. package/typings/components/tabs/logic-expression.d.ts +32 -0
  44. package/typings/components/tabs/logic-item-editor.d.ts +53 -0
  45. package/typings/components/tabs/logic-items.d.ts +96 -0
  46. package/typings/components/tabs/logic-plugin.d.ts +22 -0
  47. package/typings/components/tabs/logic-theme.d.ts +327 -0
  48. package/typings/components/tabs/logic-types.d.ts +77 -0
  49. package/typings/components/tabs/logic-ui.d.ts +68 -0
  50. package/typings/components/tabs/logic.d.ts +102 -0
  51. package/typings/components/tabs/test-plugin.d.ts +33 -0
  52. package/typings/components/tabs/test.d.ts +43 -0
  53. package/typings/components/tabs/translation-plugin.d.ts +33 -0
  54. package/typings/components/tabs/translation-theme.d.ts +301 -0
  55. package/typings/components/tabs/translation.d.ts +199 -0
  56. package/typings/components/toolbox/toolbox-tool.d.ts +16 -0
  57. package/typings/creator-base.d.ts +1375 -0
  58. package/typings/creator-options.d.ts +247 -0
  59. package/typings/creator-responsivity-manager.d.ts +22 -0
  60. package/typings/creator-settings.d.ts +216 -0
  61. package/typings/custom-questions/question-color.d.ts +15 -0
  62. package/typings/custom-questions/question-file.d.ts +15 -0
  63. package/typings/custom-questions/question-spin-editor.d.ts +25 -0
  64. package/typings/editable-object.d.ts +20 -0
  65. package/typings/editorLocalization.d.ts +951 -0
  66. package/typings/entries/index.d.ts +68 -0
  67. package/typings/expressionToDisplayText.d.ts +46 -0
  68. package/typings/json5.d.ts +46 -0
  69. package/typings/localization/english.d.ts +922 -0
  70. package/typings/pages-controller.d.ts +21 -0
  71. package/typings/plugins/undo-redo/index.d.ts +12 -0
  72. package/typings/plugins/undo-redo/undo-redo-controller.d.ts +40 -0
  73. package/typings/plugins/undo-redo/undo-redo-manager.d.ts +78 -0
  74. package/typings/property-grid/bindings.d.ts +10 -0
  75. package/typings/property-grid/cells-survey.d.ts +14 -0
  76. package/typings/property-grid/condition-survey.d.ts +117 -0
  77. package/typings/property-grid/condition.d.ts +13 -0
  78. package/typings/property-grid/description-parser.d.ts +10 -0
  79. package/typings/property-grid/fast-entry.d.ts +32 -0
  80. package/typings/property-grid/index.d.ts +239 -0
  81. package/typings/property-grid/matrices.d.ts +132 -0
  82. package/typings/property-grid/object-selector.d.ts +42 -0
  83. package/typings/property-grid/property-grid-view-model.d.ts +23 -0
  84. package/typings/property-grid/restfull.d.ts +8 -0
  85. package/typings/property-grid/values-survey.d.ts +42 -0
  86. package/typings/property-grid/values.d.ts +37 -0
  87. package/typings/property-grid-theme/property-grid.d.ts +346 -0
  88. package/typings/question-editor/definition.d.ts +22 -0
  89. package/typings/question-editor/properties.d.ts +49 -0
  90. package/typings/questionconverter.d.ts +12 -0
  91. package/typings/selection-history.d.ts +20 -0
  92. package/typings/selection-owner.d.ts +7 -0
  93. package/typings/survey-helper.d.ts +43 -0
  94. package/typings/svgbundle.d.ts +1 -0
  95. package/typings/textWorker.d.ts +18 -0
  96. package/typings/toolbox.d.ts +269 -0
  97. package/typings/utils/actions.d.ts +5 -0
  98. package/typings/utils/events.d.ts +14 -0
  99. package/typings/utils/resizer.d.ts +24 -0
  100. package/typings/utils/utils.d.ts +19 -0
@@ -0,0 +1,1375 @@
1
+ import * as Survey from "survey-core";
2
+ import { Base, SurveyModel, Question, PageModel, IElement, JsonObjectProperty, ActionContainer, AdaptiveActionContainer, IAction, Action, IPanel, SurveyElement, ItemValue, QuestionSelectBase, LocalizableString, ILocalizableString, ILocalizableOwner, PopupBaseViewModel, EventBase } from "survey-core";
3
+ import { ISurveyCreatorOptions, ICollectionItemAllowOperations } from "./creator-settings";
4
+ import { DragDropSurveyElements, DragDropChoices } from "survey-core";
5
+ import { QuestionToolbox } from "./toolbox";
6
+ import { PropertyGridModel } from "./property-grid";
7
+ import { ICreatorSelectionOwner } from "./selection-owner";
8
+ import { SelectionHistory } from "./selection-history";
9
+ import { SurveyLogic } from "./components/tabs/logic";
10
+ import { UndoRedoManager } from "./plugins/undo-redo/undo-redo-manager";
11
+ import { UndoRedoController } from "./plugins/undo-redo/undo-redo-controller";
12
+ import { SidebarModel } from "./components/side-bar/side-bar-model";
13
+ import { ICreatorOptions } from "./creator-options";
14
+ export interface IKeyboardShortcut {
15
+ name?: string;
16
+ hotKey: {
17
+ ctrlKey?: boolean;
18
+ keyCode: number;
19
+ };
20
+ macOsHotkey?: {
21
+ shiftKey?: boolean;
22
+ keyCode: number;
23
+ };
24
+ execute: (context: any) => void;
25
+ }
26
+ export interface ICreatorPlugin {
27
+ activate: () => void;
28
+ update?: () => void;
29
+ deactivate?: () => boolean;
30
+ canDeactivateAsync?: (onSuccess: () => void) => void;
31
+ dispose?: () => void;
32
+ onDesignerSurveyPropertyChanged?: (obj: Base, propName: string) => void;
33
+ model: Base;
34
+ }
35
+ export declare class CreatorAction extends Action {
36
+ }
37
+ export interface ITabbedMenuItem extends IAction {
38
+ componentContent: string;
39
+ renderTab?: () => any;
40
+ }
41
+ export declare class TabbedMenuItem extends Action implements ITabbedMenuItem {
42
+ constructor(item: ITabbedMenuItem);
43
+ componentContent: string;
44
+ renderTab?: () => any;
45
+ }
46
+ export declare class TabbedMenuContainer extends AdaptiveActionContainer<TabbedMenuItem> {
47
+ constructor();
48
+ }
49
+ export declare class ToolbarActionContainer extends ActionContainer {
50
+ private creator;
51
+ constructor(creator: CreatorBase);
52
+ protected getRenderedActions(): Array<Action>;
53
+ }
54
+ export declare type toolboxLocationType = "left" | "right" | "sidebar";
55
+ export declare class CreatorEvent extends EventBase<CreatorBase, any> {
56
+ }
57
+ /**
58
+ * Base class for Survey Creator.
59
+ */
60
+ export declare class CreatorBase extends Base implements ISurveyCreatorOptions, ICreatorSelectionOwner, ILocalizableOwner {
61
+ protected options: ICreatorOptions;
62
+ getMarkdownHtml(text: string, name: string): string;
63
+ getRenderer(name: string): string;
64
+ getRendererContext(locStr: LocalizableString): any;
65
+ getProcessedText(text: string): string;
66
+ getLocale(): string;
67
+ /**
68
+ * Specifies whether to display the Designer tab.
69
+ *
70
+ * Default value: `true`
71
+ */
72
+ showDesignerTab: boolean;
73
+ /**
74
+ * Specifies whether to display the JSON Editor tab.
75
+ *
76
+ * Default value: `true`
77
+ */
78
+ showJSONEditorTab: boolean;
79
+ /**
80
+ * Obsolete. Please use showPreviewTab property
81
+ * @see showPreviewTab
82
+ */
83
+ showTestSurveyTab: boolean;
84
+ /**
85
+ * Specifies whether to display the Preview tab.
86
+ *
87
+ * Default value: `true`
88
+ */
89
+ get showPreviewTab(): boolean;
90
+ set showPreviewTab(val: boolean);
91
+ /**
92
+ * Specifies whether to display the Embed Survey tab.
93
+ *
94
+ * Default value: `false`
95
+ */
96
+ showEmbeddedSurveyTab: boolean;
97
+ /**
98
+ * Specifies whether to display the Translation tab.
99
+ *
100
+ * Default value: `false`
101
+ */
102
+ showTranslationTab: boolean;
103
+ /**
104
+ * Specifies whether to display the Logic tab.
105
+ *
106
+ * Default value: `false`
107
+ */
108
+ showLogicTab: boolean;
109
+ useTableViewInLogicTab: boolean;
110
+ /**
111
+ * Set delay for page hover
112
+ */
113
+ pageHoverDelay: number;
114
+ /**
115
+ * You need to set this property to true if you want to inplace edit item values instead of texts.
116
+ */
117
+ inplaceEditForValues: boolean;
118
+ /**
119
+ * Obsolete. Use the [`showSurveyTitle`](https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#showSurveyTitle) property instead.
120
+ */
121
+ get allowEditSurveyTitle(): boolean;
122
+ set allowEditSurveyTitle(val: boolean);
123
+ /**
124
+ * Specifies whether users can see and edit the survey title and related survey properties.
125
+ *
126
+ * Default value: `true`
127
+ */
128
+ get showSurveyTitle(): boolean;
129
+ set showSurveyTitle(val: boolean);
130
+ /**
131
+ * Removes the Free Trial bar.
132
+ *
133
+ * Default value: `false`
134
+ *
135
+ * > You can enable this property only if you have a Survey Creator commercial license. It is illegal to enable this property without a license.
136
+ */
137
+ haveCommercialLicense: boolean;
138
+ get licenseText(): string;
139
+ /**
140
+ * Specifies whether to call the [saveSurveyFunc](https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#saveSurveyFunc) each time survey settings are changed.
141
+ *
142
+ * Default value: `false`
143
+ */
144
+ isAutoSave: boolean;
145
+ showOptions: boolean;
146
+ showSearch: boolean;
147
+ generateValidJSON: boolean;
148
+ currentAddQuestionType: string;
149
+ /**
150
+ * Specifies the orientation of the selected device in the Preview tab.
151
+ *
152
+ * Possible values:
153
+ * - `"landscape"` (default)
154
+ * - `"portrait"`
155
+ */
156
+ previewOrientation: "landscape" | "portrait";
157
+ private isRTLValue;
158
+ private alwaySaveTextInPropertyEditorsValue;
159
+ private toolbarValue;
160
+ private responsivityManager;
161
+ footerToolbar: ActionContainer;
162
+ private changePageModifications;
163
+ private pageEditModeValue;
164
+ /**
165
+ * Contains the value of the [`pageEditMode`](https://surveyjs.io/Documentation/Survey-Creator?id=ICreatorOptions#pageEditMode) property specified in the constructor.
166
+ */
167
+ get pageEditMode(): "standard" | "single" | "bypage";
168
+ set pageEditMode(val: "standard" | "single" | "bypage");
169
+ surveyValue: SurveyModel;
170
+ get toolbarItems(): Array<Action>;
171
+ get toolbar(): ActionContainer;
172
+ dragDropSurveyElements: DragDropSurveyElements;
173
+ dragDropChoices: DragDropChoices;
174
+ private selectedElementValue;
175
+ private newQuestions;
176
+ private newPanels;
177
+ private newQuestionChangedNames;
178
+ private selectionHistoryControllerValue;
179
+ private saveSurveyFuncValue;
180
+ viewType: string;
181
+ /**
182
+ * Returns the current show view name. The possible returns values are:
183
+ * "designer", "editor", "test", "embed", "logic" and "translation".
184
+ * @see showDesigner
185
+ * @see showPreview
186
+ * @see showJsonEditor
187
+ * @see showLogicEditor
188
+ * @see showTranslationEditor
189
+ * @see showEmbedEditor
190
+ */
191
+ get showingViewName(): string;
192
+ get isDesignerShowing(): boolean;
193
+ showDesigner(): void;
194
+ get isTestSurveyShowing(): boolean;
195
+ /**
196
+ * Return true if Preview tab is currently active
197
+ */
198
+ get isPreviewShowing(): boolean;
199
+ showTestSurvey(): void;
200
+ /**
201
+ * Show Preview tab
202
+ */
203
+ showPreview(): void;
204
+ protected plugins: {
205
+ [name: string]: ICreatorPlugin;
206
+ };
207
+ addPluginTab(name: string, plugin: ICreatorPlugin, title?: string, componentContent?: string, index?: number): void;
208
+ addPlugin(name: string, plugin: ICreatorPlugin): void;
209
+ getPlugin<P extends ICreatorPlugin = ICreatorPlugin>(name: string): P;
210
+ /**
211
+ * 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.
212
+ *- sender the survey creator object that fires the event
213
+ *- options.element an instance of the deleting element
214
+ *- options.elementType the type of the element: 'question', 'panel' or 'page'.
215
+ *- options.allowing set it to false to cancel the element deleting
216
+ */
217
+ onElementDeleting: CreatorEvent;
218
+ /**
219
+ * The event is called on setting a readOnly property of the property editor. By default the property.readOnly property is used.
220
+ * You may changed it and make the property editor read only or enabled for a particular object.
221
+ *- sender the survey creator object that fires the event
222
+ *- options.obj the survey object, Survey, Page, Panel or Question
223
+ *- options.property the object property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties.
224
+ *- options.readOnly a boolean value. It has value equals to options.readOnly property by default. You may change it.
225
+ *- 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).
226
+ *- 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.
227
+ */
228
+ onGetPropertyReadOnly: CreatorEvent;
229
+ /**
230
+ * The event is fired when the survey creator creates a survey object (Survey.Survey).
231
+ *- sender the survey creator object that fires the event
232
+ *- options.survey the survey object showing in the creator.
233
+ *- 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.
234
+ */
235
+ onSurveyInstanceCreated: CreatorEvent;
236
+ /**
237
+ * An event that is raised when Survey Creator obtains a survey element name to display it in the UI.
238
+ *
239
+ * Handle this event to replace survey element names in the UI with custom display texts.
240
+ * If you only want to replace the names with survey element titles, enable the [`showObjectTitles`](https://surveyjs.io/survey-creator/documentation/surveycreator#showObjectTitles) property instead of handling this event.
241
+ *
242
+ * The event handler accepts the following arguments:
243
+ *
244
+ * - `sender`- A Survey Creator instance that raised the event.
245
+ * - `options.obj` - The instance of a survey element (survey, page, question, or panel) whose name has been requested.
246
+ * - `options.area` - A Survey Creator UI element that requests the display name.
247
+ * - `"page-selector"` - Page selector on the design surface
248
+ * - `"condition-editor"` - Condition pop-up window or drop-down menus that allow users to select questions in the Logic tab
249
+ * - `"logic-tab:question-filter"` - Question filter in the Logic tab
250
+ * - `"logic-tab:question-selector"` - Question selector on editing actions in the Logic tab
251
+ * - `"preview-tab:page-list"` - Page list in the Preview tab
252
+ * - `"preview-tab:selected-page"` - Selected page name in the Preview tab
253
+ * - `"property-grid:property-editor"` - Property editors in the Property Grid
254
+ * - `"property-grid-header:element-list"` - Survey element list in the header of the Property Grid
255
+ * - `"property-grid-header:selected-element"` - Selected survey element in the header of the Property Grid
256
+ * - `"translation-tab"` - Translation tab
257
+ * - `options.displayName` - Modify this property to set a custom display text for the survey element.
258
+ * - `options.reason` - Obsolete. Use the `options.area` property instead.
259
+ * - `"condition"` - Use the `"condition-editor"` value of `options.area` instead.
260
+ * - `"survey-tester"` - Use the `"preview-tab:page-list"` value of `options.area` instead.
261
+ * - `"survey-tester-selected"` - Use the `"preview-tab:selected-page"` value of `options.area` instead.
262
+ * - `"survey-translation"` - Use the `"translation-tab"` value of `options.area` instead.
263
+ * - `"property-editor"` - Use the `"property-grid:property-editor"` value of `options.area` instead.
264
+ * - `"property-grid"` - Use the `"property-grid-header:element-list"` value of `options.area` instead.
265
+ * - `"property-grid-title"` - Use the `"property-grid-header:selected-element"` value of `options.area` instead.
266
+ */
267
+ onGetObjectDisplayName: CreatorEvent;
268
+ /**
269
+ * This event is raised after a user has edited a text value on the design surface. This value may include HTML markup. You can handle the `onHtmlToMarkdown` event to convert the HTML markup to Markdown.
270
+ *
271
+ * The event handler accepts the following arguments:
272
+ *
273
+ * - `sender` - A Survey Creator instance that raised the event.
274
+ * - `options.element` - The instance of a survey element (survey, page, panel, question) that the user configures.
275
+ * - `options.name` - The name of a property whose value has been edited.
276
+ * - `options.html` - HTML content. Pass this field's value to an HTML-to-Markdown converter.
277
+ * - `options.text` - A text string that may contain Markdown. Assign the result of the HTML-to-Markdown conversion to this field.
278
+ */
279
+ onHtmlToMarkdown: CreatorEvent;
280
+ /**
281
+ * Use this event to disable user interactions with a question or panel on the design surface.
282
+ *
283
+ * The event handler accepts the following arguments:
284
+ *
285
+ * - `sender`- A Survey Creator instance that raised the event.
286
+ * - `options.obj` - A survey element instance (question or panel) for which you can disable user interactions.
287
+ * - `options.allowAddToToolbox` - Allows users to save the current survey element configuration in the Toolbox.
288
+ * - `options.allowChangeRequired` - Allows users to make the survey element required.
289
+ * - `options.allowChangeType` - Allows users to change the survey element type.
290
+ * - `options.allowChangeInputType` - Allows users to change the text question inputType property.
291
+ * - `options.allowCopy` - Allows users to duplicate the survey element.
292
+ * - `options.allowDelete` - Allows users to delete the survey element.
293
+ * - `options.allowDragging` - Allows users to drag and drop the survey element.
294
+ * - `options.allowEdit` - 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.
295
+ *
296
+ * To disable a user interaction, set the correponding `allow...` property to `false`.
297
+ */
298
+ onElementAllowOperations: CreatorEvent;
299
+ /**
300
+ * Use this event to add/remove/modify the element (question/panel) menu items.
301
+ *- sender the survey creator object that fires the event
302
+ *- options.obj the survey object which property is edited in the Property Editor.
303
+ *- options.items the list of menu items. It has two required fields: text and onClick: function(obj: Survey.Base) {} and optional name field.
304
+ * @see onElementAllowOperations
305
+ */
306
+ onDefineElementMenuItems: CreatorEvent;
307
+ /**
308
+ * The event is called before showing a property in the Properties Grid or in the Question Editor.
309
+ *- sender the survey creator object that fires the event
310
+ *- options.obj the survey object, Survey, Page, Panel or Question
311
+ *- options.property the object property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties.
312
+ *- 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.
313
+ *- 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).
314
+ *- 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.
315
+ *
316
+ * [Example: Hide a category in the Properties Grid](https://surveyjs.io/Examples/Survey-Creator?id=hidecategoryinpropertiesgrid)
317
+ */
318
+ onShowingProperty: CreatorEvent;
319
+ /**
320
+ * @Deprecated Obsolete, please use onShowingProperty event.
321
+ * The event is called before showing a property in the Property Grid or in Question Editor.
322
+ *- sender the survey creator object that fires the event
323
+ *- options.obj the survey object, Survey, Page, Panel or Question
324
+ *- options.property the object property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties.
325
+ *- 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
326
+ *- 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).
327
+ *- 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.
328
+ */
329
+ onCanShowProperty: CreatorEvent;
330
+ /**
331
+ * The event is called after a survey that represents the Property Grid is created and all its questions (property editors) are setup.
332
+ * You can use this event to modify this survey to change the property grid behavior
333
+ *- options.obj the survey object that is currently editing in the property grid
334
+ *- options.survey the property grid survey
335
+ */
336
+ onPropertyGridSurveyCreated: CreatorEvent;
337
+ /**
338
+ * The event is called after a property editor (in fact a survey question) has been created and all it's properties have been assign.
339
+ * You can use this event to modify the property editor properties or set event handlers to customize it's behavior
340
+ *- options.obj the survey object that is currently editing in the property grid
341
+ *- options.property the property that the current property editor is editing
342
+ *- 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.
343
+ */
344
+ onPropertyEditorCreated: CreatorEvent;
345
+ /**
346
+ * The event is called after a property editor setups its title actions.
347
+ * You can use this event to modify the property editor title actions
348
+ *- options.obj the survey object that is currently editing in the property grid
349
+ *- options.property the property that the current property editor is editing
350
+ *- 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.
351
+ *- options.titleActions the list of title actions.
352
+ */
353
+ onPropertyEditorUpdateTitleActions: CreatorEvent;
354
+ /**
355
+ * An event that is raised before Survey Creator displays a pop-up window called from the Property Grid. This window allows users to edit choices, conditions, and so on.
356
+ *
357
+ * Use this event to customize the pop-up window, for example, add custom action buttons.
358
+ *
359
+ * Parameters:
360
+ *
361
+ * - `sender` - A Survey Creator instance that raised the event.
362
+ * - `options.obj` - An instance of a survey element (question or panel) that users are configuring in the Property Grid.
363
+ * - `options.property`- A `JsonObjectProperty` object with metadata about the property being edited.
364
+ * - `options.editor` - A property editor. It is an object of the [`Question`](https://surveyjs.io/form-library/documentation/question) type because the Property Grid is [built upon a regular survey](https://surveyjs.io/survey-creator/documentation/creator-v2-whats-new#survey-creator-ui-elements-are-surveys).
365
+ * - `options.popupEditor` - An editor inside the pop-up window.
366
+ * - `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.
367
+ */
368
+ onPropertyGridShowModal: CreatorEvent;
369
+ /**
370
+ * The event is called before rendering a delete button in the Property Grid or in Question Editor.
371
+ * @Deprecated Obsolete, please use onCollectionItemAllowOperations
372
+ *- sender the survey creator object that fires the event
373
+ *- options.obj the survey Question
374
+ *- options.item the object property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties
375
+ *- 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
376
+ * @see onCollectionItemAllowOperations
377
+ */
378
+ onCanDeleteItem: CreatorEvent;
379
+ /**
380
+ * 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.
381
+ * @Deprecated Obsolete, please use onCollectionItemAllowOperations
382
+ *- sender the survey creator object that fires the event
383
+ *- options.obj the survey object: Question, Panel, Page or Survey
384
+ *- options.property the collection property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties
385
+ *- options.propertyName the collection property name
386
+ *- 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.
387
+ *- options.item the collection item that we are going to delete
388
+ *- options.allowDelete a boolean value. It is true by default. Set it false to abondome the element removing from the collection
389
+ * @see onCollectionItemAllowOperations
390
+ */
391
+ onCollectionItemDeleting: CreatorEvent;
392
+ /**
393
+ * 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.
394
+ * Use this event to prevent a collection item from being edited or removed from a collection.
395
+ *- sender the survey creator object that fires the event
396
+ *- options.obj the survey object: Question, Panel, Page or Survey
397
+ *- options.property the collection property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties
398
+ *- options.propertyName the collection property name
399
+ *- options.collection a collection where a target item is located. It is can be Columns in Matrices or Choices in Dropdown question and so on.
400
+ *- options.item a target collection item
401
+ *- options.allowDelete a boolean value. It is `true` by default. Set it false to prevent an item from being removed from the collection
402
+ *- options.allowAdd a boolean value. It is `true` by default. Set it false to prevent an item from being added to the collection
403
+ *- options.allowEdit a boolean value. It is `true` by default. Set it `false` to disable editing.
404
+ */
405
+ onCollectionItemAllowOperations: CreatorEvent;
406
+ /**
407
+ * 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.
408
+ * Use this event, to set ItemValue.value and ItemValue.text properties by default or set a value to the custom property.
409
+ *- sender the survey creator object that fires the event
410
+ *- options.obj the object that contains the itemsValues array, for example selector, rating and single choice matrix questions.
411
+ *- 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.
412
+ *- options.newItem a new created Survey.ItemValue object.
413
+ *- options.itemValues an editing Survey.ItemValue array. newItem object is not added yet into this array.
414
+ */
415
+ onItemValueAdded: CreatorEvent;
416
+ /**
417
+ * 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.
418
+ *- sender the survey creator object that fires the event
419
+ *- options.matrix a matrix question where column is located, matrix.columns.
420
+ *- options.newColumn a new created Survey.MatrixDropdownColumn object.
421
+ *- 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.
422
+ */
423
+ onMatrixColumnAdded: CreatorEvent;
424
+ /**
425
+ * Use this event to control Property Editors UI.
426
+ *- sender the survey creator object that fires the event
427
+ *- options.obj the survey object which property is edited in the Property Editor.
428
+ *- options.propertyName the name of the edited property.
429
+ *- options.editorOptions options that can be changed.
430
+ *- 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'.
431
+ *- 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'.
432
+ *- options.editorOptions.allowBatchEdit a boolean property, true by default. Set it false to hide the "Edit" button for the "choices" property.
433
+ *- options.editorOptions.itemsEntryType a string property, 'form' by default. Set it 'fast' to show "Manual Entry" tab for "choices" property by default.
434
+ */
435
+ onSetPropertyEditorOptions: CreatorEvent;
436
+ /**
437
+ * The event is called on generation a new name for a new created element.
438
+ *- sender the survey creator object that fires the event
439
+ *- options.element a new created survey element. It can be question, panel or page
440
+ *- 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.
441
+ *- options.isUnique a boolean property, set this property to false, if you want to ask Creator to generate another name
442
+ */
443
+ onGenerateNewName: CreatorEvent;
444
+ /**
445
+ * 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.
446
+ *- sender the survey creator object that fires the event
447
+ *- options.obj the survey object which property is edited in the Property Editor.
448
+ *- options.propertyName the name of the edited property.
449
+ *- options.value the property value.
450
+ *- options.error the error you want to display. Set the empty string (the default value) or null if there is no errors.
451
+ * @see onPropertyValueChanging
452
+ */
453
+ onPropertyValidationCustomError: CreatorEvent;
454
+ /**
455
+ * An event that is raised each time a user modifies a survey object property. Use this event to validate or correct a property value while the user enters it.
456
+ *
457
+ * The event handler accepts the following arguments:
458
+ *
459
+ * - `sender`- A Survey Creator instance that raised the event.
460
+ * - `options.obj` - A survey object instance (question or panel) whose property is being edited.
461
+ * - `options.propertyName` - The name of the property.
462
+ * - `options.value` - An old property value.
463
+ * - `options.newValue` - A new property value. Specify this field if you want to override the entered value.
464
+ * @see onPropertyValidationCustomError
465
+ * @see onSurveyPropertyValueChanged
466
+ */
467
+ onPropertyValueChanging: CreatorEvent;
468
+ /**
469
+ * An event that is raised after a property in a survey object has changed.
470
+ *
471
+ * - `sender`- A Survey Creator instance that raised the event.
472
+ * - `options.obj` - A survey object instance (question or panel) whose property has changed.
473
+ * - `options.propertyName` - The name of the property.
474
+ * - `options.value` - A new property value.
475
+ * @see onPropertyValidationCustomError
476
+ * @see onPropertyValueChanging
477
+ */
478
+ onSurveyPropertyValueChanged: CreatorEvent;
479
+ /**
480
+ * Use this event to modify the list (name and titles) of the questions available in a condition editor.
481
+ *- sender the survey creator object that fires the event
482
+ *- options.obj the survey object which property is edited in the Property Editor.
483
+ *- options.propertyName the name of the edited property.
484
+ *- options.editor the instance of Property Editor.
485
+ *- options.list the list of the questions available for condition
486
+ *- options.sortOrder "asc" (default) | "none". Change it to "none", if you don't want to sort your condition list
487
+ */
488
+ onConditionQuestionsGetList: CreatorEvent;
489
+ /**
490
+ * 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
491
+ *- sender the survey creator object that fires the event.
492
+ *- options.expression the current expression. If the expression is empty or incorrect then the value is empty.
493
+ *- options.title the default value of the title. You can change the default value.
494
+ */
495
+ onConditionGetTitle: CreatorEvent;
496
+ /**
497
+ * Use this event to modify the display text of a logic item in the Logic tab.
498
+ *
499
+ * The event handler accepts the following arguments:
500
+ *
501
+ * - `sender` - A Survey Creator instance that raised the event.
502
+ * - `options.expression` - A logical expression associated with the logic item.
503
+ * - `options.expressionText` - The same expression in a user-friendly format. It may contain question titles instead of question names.
504
+ * - `options.logicItem` - A logic item object. Contains an array of actions and other properties.
505
+ * - `options.text` - The expression and actions in a user-friendly format. Redefine this property if you want to change the display text.
506
+ */
507
+ onLogicItemDisplayText: CreatorEvent;
508
+ /**
509
+ * 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.
510
+ *- sender the survey creator object that fires the event
511
+ * options object contains the information about certain modifications
512
+ *- options.type contains string constant describing certain modification
513
+ * Available values:
514
+ *
515
+ *- options.type: "ADDED_FROM_TOOLBOX"
516
+ *- options.question: newly added question
517
+ *
518
+ *- options.type: "PAGE_ADDED"
519
+ *- options.newValue: newly created page
520
+ *
521
+ *- options.type: "PAGE_MOVED"
522
+ *- options.page: page has been moved
523
+ *- options.indexFrom: pevious index
524
+ *- options.indexTo: new index
525
+ *
526
+ *- options.type: "QUESTION_CONVERTED"
527
+ *- options.className: the converted class name
528
+ *- options.oldValue: pevious object
529
+ *- options.newValue: the new object, converted from oldVale to the given class name
530
+ *
531
+ *- options.type: "QUESTION_CHANGED_BY_EDITOR"
532
+ *- options.question: question has been edited in the popup question editor
533
+ *
534
+ *- options.type: "PROPERTY_CHANGED"
535
+ *- options.name: the name of the property has been changed
536
+ *- options.target: the object containing the changed property
537
+ *- options.oldValue: the previous value of the changed property
538
+ *- options.newValue: the new value of the changed property
539
+ *
540
+ *- options.type: "OBJECT_DELETED"
541
+ *- options.target: deleted object
542
+ *
543
+ *- options.type: "VIEW_TYPE_CHANGED"
544
+ *- options.newType: new type of the creator view: editor or designer
545
+ *
546
+ *- options.type: "DO_DROP"
547
+ *- options.page: the page of the drap/drop operation
548
+ *- options.source: the source dragged object
549
+ *- options.target: the drop target
550
+ *- options.newElement: a new element. It is defined if a user drops question or panel from the toolbox
551
+ *
552
+ *- options.type: "TRANSLATIONS_CHANGED"
553
+ *- options.type: "JSON_EDITOR"
554
+ */
555
+ onModified: CreatorEvent;
556
+ /**
557
+ * 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.
558
+ *- sender the survey creator object that fires the event
559
+ *- options.question a new added survey question. Survey.Question object
560
+ *- options.page the survey Page object where question has been added.
561
+ *- options.reason how question has been added via UI: ADDED_FROM_TOOLBOX, ADDED_FROM_PAGEBUTTON, ELEMENT_COPIED.
562
+ */
563
+ onQuestionAdded: CreatorEvent;
564
+ /**
565
+ * 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.
566
+ *- sender the survey creator object that fires the event
567
+ *- options.panel a new added survey panel. Survey.Panel object
568
+ *- options.page the survey Page object where question has been added.
569
+ */
570
+ onPanelAdded: CreatorEvent;
571
+ /**
572
+ * The event is called on adding a new page into the survey.
573
+ *- sender the survey creator object that fires the event
574
+ *- options.page the new survey Page object.
575
+ */
576
+ onPageAdded: CreatorEvent;
577
+ /**
578
+ * The event is fired when the survey creator is initialized and a survey object (Survey.Survey) is created.
579
+ *- sender the survey creator object that fires the event
580
+ *- options.survey the survey object showing in the creator.
581
+ */
582
+ onDesignerSurveyCreated: CreatorEvent;
583
+ /**
584
+ * The event is fired when the survey creator creates survey in Preview tab for testing.
585
+ *- sender the survey creator object that fires the event
586
+ *- options.survey the survey object showing in the "Preview" tab.
587
+ */
588
+ onPreviewSurveyCreated: CreatorEvent;
589
+ /**
590
+ * Obsolete. Please use onPreviewSurveyCreated event.
591
+ * @see onPreviewSurveyCreated
592
+ */
593
+ onTestSurveyCreated: CreatorEvent;
594
+ /**
595
+ * The event is called in case of UI notifications. By default all notifications are done via built-in alert () function.
596
+ * In case of any subscriptions to this event all notifications will be redirected into the event handler.
597
+ *- options.message is a message to show.
598
+ */
599
+ onNotify: CreatorEvent;
600
+ /**
601
+ * 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
602
+ *- options.newSelectedElement the element that is going to be selected in the survey desiger: question, panel, page or survey.
603
+ */
604
+ onSelectedElementChanging: CreatorEvent;
605
+ /**
606
+ * The event is called after the selected element is changed.
607
+ *- options.newSelectedElement the new selected element in the survey desiger: question, panel, page or survey.
608
+ */
609
+ onSelectedElementChanged: CreatorEvent;
610
+ /**
611
+ * The event is fired then one need to choose files.
612
+ *
613
+ * - `sender` - the survey creator object that fires the event
614
+ * - `options.input` - file input HTML element
615
+ * - `options.callback` - need to be called after files has been chosen
616
+ * @see uploadFiles
617
+ */
618
+ onOpenFileChooser: CreatorEvent;
619
+ /**
620
+ * The event is fired on uploading the files.
621
+ *
622
+ * - `sender` - the survey creator object that fires the event
623
+ * - `options.files` - the Javascript File objects array
624
+ * - `options.callback(status, imageLink)` - called on upload complete
625
+ * @see uploadFiles
626
+ */
627
+ onUploadFile: CreatorEvent;
628
+ /**
629
+ * Use this event to modify the list of the strings available in the Translation tab.
630
+ *
631
+ * The event handler accepts the following arguments:
632
+ *
633
+ * - `sender` - A Survey Creator instance that raised the event.
634
+ * - `options.obj` - A survey object instance (survey, page, panel, question) whose string translations are being edited in the Translation tab.
635
+ * - `options.propertyName` - The name of a property being translated.
636
+ * - `options.visible` - A Boolean value that specifies the property visibility. Set it to `false` to hide the property.
637
+ */
638
+ onTranslationStringVisibility: CreatorEvent;
639
+ /**
640
+ * Use this event to define is the locale initially selected (default value) and ready for translaion or it is unselected.
641
+ *
642
+ * The event handler accepts the following arguments:
643
+ *
644
+ * - `sender` - A Survey Creator instance that raised the event.
645
+ * - `options.locale` - the locale name, like 'en', 'de' and so on.
646
+ * - `options.isSelected` - it is true by default. Set it to false to make the translation unselected.
647
+ */
648
+ onTranslationLocaleInitiallySelected: CreatorEvent;
649
+ /**
650
+ * Use this event to modify the imported localizable text. To block importing a particular localization text, set the options.text into undefined.
651
+ *
652
+ * The event handler accepts the following arguments:
653
+ *
654
+ * - `sender` - A Survey Creator instance that raised the event.
655
+ * - `options.locale` - the locale name, like 'en', 'de' and so on.
656
+ * - `options.name` - The full name of the localizable string, it can be: "survey.page1.question2.title"
657
+ * - `options.text` - The imported text for the locale for this item. Set it to undefined or empty string to block importing for this item
658
+ */
659
+ onTranslationImportItem: CreatorEvent;
660
+ /**
661
+ * The event is called when the translation from csv file is imported.
662
+ * @see translation
663
+ * @see showTranslationTab
664
+ */
665
+ onTranslationImported: CreatorEvent;
666
+ /**
667
+ * Use this event to modify a translated string before it is exported to CSV.
668
+ *
669
+ * The event handler accepts the following arguments:
670
+ *
671
+ * - `sender` - A Survey Creator instance that raised the event.
672
+ * - `options.obj` - A survey object instance (survey, page, panel, question) whose string translations are being exported to CSV.
673
+ * - `options.locale` - The current locale identifier (`"en"`, `"de"`, etc.). Contains an empty string if the default locale is used.
674
+ * - `options.name` - A full name of the translated string. It is composed of names of all parent elements, for example: `"mySurvey.page1.question2.title"`.
675
+ * - `options.locString` - A `LocalizableString` instance. Call the `options.locString.getLocaleText(locale)` method if you need to get a text string for a specific locale.
676
+ * - `options.text` - A text string to be exported. The string is taken from the current locale. Redefine this property if you want to export a different string.
677
+ */
678
+ onTranslationExportItem: CreatorEvent;
679
+ /**
680
+ * An event that is raised before a string translation is changed. Use this event to override a new translation value.
681
+ *
682
+ * Parameters:
683
+ *
684
+ * - `sender`: `CreatorBase`\
685
+ * A Survey Creator instance that raised the event.
686
+ * - `options.obj`: `any`\
687
+ * A survey object instance (survey, page, panel, question) whose string translation is being changed.
688
+ * - `options.locale`: `String`\
689
+ * The current locale identifier (`"en"`, `"de"`, etc.). Contains an empty string if the default locale is used.
690
+ * - `options.locString`: `LocalizableString`\
691
+ * An object that you can use to manipulate a localization string. Call the `options.locString.getLocaleText(locale)` method if you need to get a text string for a specific locale.
692
+ * - `options.newText`: `String`\
693
+ * A new value for the string translation.
694
+ *
695
+ * Refer to the following help topics for more information on localization:
696
+ *
697
+ * - [Localization & Globalization in SurveyJS Form Library](https://surveyjs.io/form-library/documentation/survey-localization)
698
+ * - [Localization & Globalization in Survey Creator](https://surveyjs.io/survey-creator/documentation/localization)
699
+ */
700
+ onTranslationItemChanging: CreatorEvent;
701
+ /**
702
+ * Use this event to control drag&drop operations.
703
+ *- sender the survey creator object that fires the event.
704
+ *- options.survey the editing survey object.
705
+ *- options.allow set it to false to disable dragging.
706
+ *- options.target a target element that is dragging.
707
+ *- options.source a source element. It can be null, if it is a new element, dragging from toolbox.
708
+ *- options.parent a page or panel where target element is dragging.
709
+ *- 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.
710
+ *- 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.
711
+ */
712
+ onDragDropAllow: CreatorEvent;
713
+ /**
714
+ * This callback is used internally for providing survey JSON text.
715
+ */
716
+ getSurveyJSONTextCallback: () => {
717
+ text: string;
718
+ isModified: boolean;
719
+ };
720
+ /**
721
+ * This callback is used internally for setting survey JSON text.
722
+ */
723
+ setSurveyJSONTextCallback: (text: string) => void;
724
+ /**
725
+ * Limits the number of items in a logical expression.
726
+ *
727
+ * Default value: -1 (unlimited)
728
+ */
729
+ maxLogicItemsInCondition: number;
730
+ /**
731
+ * Specifies whether UI elements display survey, page, and question titles instead of their names.
732
+ *
733
+ * Default value: `false`
734
+ *
735
+ * @see onGetObjectDisplayName
736
+ */
737
+ showObjectTitles: boolean;
738
+ /**
739
+ * Limits the number of visible choices. Users can click "Show more" to view hidden choices.
740
+ *
741
+ * Set this property to -1 if you do not want to hide any choices.
742
+ *
743
+ * Default value: 10
744
+ */
745
+ maxVisibleChoices: number;
746
+ /**
747
+ * Specifies whether to display question titles instead of names when users edit logical expressions.
748
+ *
749
+ * Default value: `false`
750
+ */
751
+ showTitlesInExpressions: boolean;
752
+ /**
753
+ * Specifies whether users can edit expressions in the Logic tab as plain text.
754
+ *
755
+ * If you set this property to `false`, users can only use UI elements to edit logical expressions.
756
+ *
757
+ * Default value: `true`
758
+ *
759
+ * @see showLogicTab
760
+ */
761
+ allowEditExpressionsInTextEditor: boolean;
762
+ /**
763
+ * 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.
764
+ *
765
+ * Default value: 0 (unlimited, taken from `settings.propertyGrid.maximumColumnsCount`)
766
+ */
767
+ maximumColumnsCount: number;
768
+ /**
769
+ * 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.
770
+ *
771
+ * Default value: 0 (unlimited, taken from `settings.propertyGrid.maximumChoicesCount`)
772
+ */
773
+ maximumChoicesCount: number;
774
+ /**
775
+ * 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.
776
+ *
777
+ * Default value: 0 (unlimited, taken from `settings.propertyGrid.maximumRowsCount`)
778
+ */
779
+ maximumRowsCount: number;
780
+ /**
781
+ * Limits the number of rate value that users can add to [Rating](https://surveyjs.io/Documentation/Library?id=questionratingmodel) questions.
782
+ *
783
+ * Default value: 0 (unlimited, taken from `settings.propertyGrid.maximumRateValues`)
784
+ */
785
+ maximumRateValues: number;
786
+ /**
787
+ * Obsolete. Use the [`showPagesInPreviewTab`](https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#showPagesInPreviewTab) property instead.
788
+ */
789
+ showPagesInTestSurveyTab: boolean;
790
+ /**
791
+ * Specifies whether to show the page selector at the bottom of the Preview tab.
792
+ *
793
+ * Default value: `true`
794
+ */
795
+ get showPagesInPreviewTab(): boolean;
796
+ set showPagesInPreviewTab(val: boolean);
797
+ /**
798
+ * Obsolete. Use the [`showSimulatorInPreviewTab`](https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#showSimulatorInPreviewTab) property instead.
799
+ */
800
+ showSimulatorInTestSurveyTab: boolean;
801
+ /**
802
+ * Specifies whether the Preview tab displays the Device button that allows users to preview the survey on different device types.
803
+ *
804
+ * Default value: `true`
805
+ */
806
+ get showSimulatorInPreviewTab(): boolean;
807
+ set showSimulatorInPreviewTab(val: boolean);
808
+ /**
809
+ * A [UI theme](https://surveyjs.io/Documentation/Library?id=get-started-react#configure-styles) used to display the survey in the Preview tab.
810
+ *
811
+ * Accepted values: `"modern"`, `"default"`, `"defaultV2"`
812
+ *
813
+ * Default value: `"defaultV2"`
814
+ */
815
+ themeForPreview: string;
816
+ private _allowModifyPages;
817
+ /**
818
+ * Specifies whether users can add, edit, and delete survey pages.
819
+ *
820
+ * Default value: `true`
821
+ */
822
+ get allowModifyPages(): boolean;
823
+ set allowModifyPages(val: boolean);
824
+ /**
825
+ * Obsolete. Use the [`showDefaultLanguageInPreviewTab`](https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#showDefaultLanguageInPreviewTab) property instead.
826
+ */
827
+ showDefaultLanguageInTestSurveyTab: boolean | string;
828
+ /**
829
+ * Specifies whether the Preview tab displays the language selector.
830
+ *
831
+ * Accepted values:
832
+ *
833
+ * - `"auto"` (default)
834
+ * Display the language selector only if the survey is translated into more than one language.
835
+ *
836
+ * - `true`
837
+ * Always display the language selector regardless of how many languages are used in the survey.
838
+ *
839
+ * - `false`
840
+ * Never display the language selector.
841
+ *
842
+ * - `"all"`
843
+ * Always display the language selector with [all supported languages](https://github.com/surveyjs/survey-creator/tree/master/packages/survey-creator-core/src/localization).
844
+ *
845
+ * **See also**: [Localization & Globalization](https://surveyjs.io/Documentation/Survey-Creator?id=localization)
846
+ */
847
+ get showDefaultLanguageInPreviewTab(): boolean | string;
848
+ set showDefaultLanguageInPreviewTab(val: boolean | string);
849
+ /**
850
+ * Obsolete. Use the [`showInvisibleElementsInPreviewTab`](https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#showInvisibleElementsInPreviewTab) property instead.
851
+ */
852
+ showInvisibleElementsInTestSurveyTab: boolean;
853
+ /**
854
+ * Specifies whether the Preview tab displays a checkbox that allows users to show or hide invisible survey elements.
855
+ *
856
+ * Default value: `true`
857
+ */
858
+ get showInvisibleElementsInPreviewTab(): boolean;
859
+ set showInvisibleElementsInPreviewTab(val: boolean);
860
+ /**
861
+ * Set this property to true if you want to show "page selector" in the toolabar instead of "pages editor"
862
+ */
863
+ showPageSelectorInToolbar: boolean;
864
+ /**
865
+ * Specifies whether users can switch between UI themes in the Preview tab.
866
+ *
867
+ * Default value: `true`
868
+ *
869
+ * [View Demo](https://surveyjs.io/Examples/Creator?id=theme-switcher (linkStyle))
870
+ */
871
+ allowChangeThemeInPreview: boolean;
872
+ tabbedMenu: AdaptiveActionContainer<TabbedMenuItem>;
873
+ get tabs(): Array<TabbedMenuItem>;
874
+ set tabs(val: Array<TabbedMenuItem>);
875
+ /**
876
+ * Returns the localized string by its id
877
+ * @param str the string id.
878
+ */
879
+ getLocString(str: string): string;
880
+ /**
881
+ * Specifies whether to show an error message if a survey is not saved in the database.
882
+ *
883
+ * Default value: `true`
884
+ */
885
+ showErrorOnFailedSave: boolean;
886
+ protected onSetReadOnly(newVal: boolean): void;
887
+ /**
888
+ * Gets or sets the survey locale. The default value it is empty, this means the 'en' locale is used.
889
+ * You can set it to 'de' - German, 'fr' - French and so on.
890
+ */
891
+ get locale(): string;
892
+ set locale(value: string);
893
+ locStrsChanged(): void;
894
+ private refreshPlugin;
895
+ /**
896
+ * Enables the read-only mode. If you set this property to `true`, users cannot change the initial survey configuration.
897
+ *
898
+ * Default value: `false`
899
+ */
900
+ get readOnly(): boolean;
901
+ set readOnly(newVal: boolean);
902
+ /**
903
+ * Specifies whether to enable support for right-to-left languages.
904
+ *
905
+ * Default value: `false`
906
+ */
907
+ get isRTL(): boolean;
908
+ set isRTL(value: boolean);
909
+ /**
910
+ * The event is called when creator is going to change the active tab.
911
+ *- sender the survey creator object that fires the event
912
+ *- options.tabName the name of new active tab
913
+ */
914
+ onActiveTabChanging: CreatorEvent;
915
+ /**
916
+ * The event is called when creator active tab is changed.
917
+ *- sender the survey creator object that fires the event
918
+ *- options.tabName the name of new active tab
919
+ *- options.model the instance of the model of the new active tab
920
+ */
921
+ onActiveTabChanged: CreatorEvent;
922
+ /**
923
+ * Get/set the active tab.
924
+ * The following values are available: "designer", "editor", "test", "embed", "logic" and "translation".
925
+ * Please note, not all tabs are visible.
926
+ */
927
+ get activeTab(): string;
928
+ set activeTab(val: string);
929
+ /**
930
+ * Change the active view/tab. It will return false if it can't change the current tab.
931
+ * @param viewName name of new active view (tab). The following values are available: "designer", "editor", "test", "embed", "logic" and "translation".
932
+ */
933
+ makeNewViewActive(viewName: string): boolean;
934
+ private switchViewType;
935
+ private canSwitchViewType;
936
+ private activatePlugin;
937
+ private get currentPlugin();
938
+ toolbox: QuestionToolbox;
939
+ get toolboxCategories(): Array<any>;
940
+ sidebar: SidebarModel;
941
+ constructor(options: ICreatorOptions, options2?: ICreatorOptions);
942
+ updateToolboxIsCompact(newVal?: boolean): void;
943
+ showToolboxValue: boolean;
944
+ get showToolbox(): boolean;
945
+ set showToolbox(val: boolean);
946
+ private showSidebarValue;
947
+ onShowSidebarVisibilityChanged: CreatorEvent;
948
+ /**
949
+ * Set this this property grid false to hide the property grid.
950
+ */
951
+ get showSidebar(): boolean;
952
+ set showSidebar(val: boolean);
953
+ setShowSidebar(value: boolean, isManualMode?: boolean): void;
954
+ onShowPropertyGridVisiblityChanged: CreatorEvent;
955
+ get showPropertyGrid(): boolean;
956
+ set showPropertyGrid(val: boolean);
957
+ rightContainerActiveItem(name: string): void;
958
+ leftContainerActiveItem(name: string): void;
959
+ /**
960
+ * The event is called before undo happens.
961
+ *- options.canUndo a boolean value. It is true by default. Set it false to hide prevent undo operation.
962
+ */
963
+ onBeforeUndo: CreatorEvent;
964
+ /**
965
+ * The event is called before redo happens.
966
+ *- options.canRedo a boolean value. It is true by default. Set it false to hide prevent redo operation.
967
+ */
968
+ onBeforeRedo: CreatorEvent;
969
+ /**
970
+ * The event is called after undo happens.
971
+ *- options.state is an undo/redo item.
972
+ */
973
+ onAfterUndo: CreatorEvent;
974
+ /**
975
+ * The event is called after redo happens.
976
+ *- options.state is an undo/redo item.
977
+ */
978
+ onAfterRedo: CreatorEvent;
979
+ get undoRedoManager(): UndoRedoManager;
980
+ get undoRedoController(): UndoRedoController;
981
+ /**
982
+ * This method starts undo/redo transaction: all changes will be stored as one undo/redo item.
983
+ */
984
+ startUndoRedoTransaction(name?: string): void;
985
+ /**
986
+ * This method stops undo/redo transaction.
987
+ */
988
+ stopUndoRedoTransaction(): void;
989
+ /**
990
+ * Returns true if Creator is currently doing undo or redo opertaions
991
+ */
992
+ get isProcessingUndoRedo(): boolean;
993
+ /**
994
+ * This method performs undo uperation if possible.
995
+ */
996
+ undo(): void;
997
+ /**
998
+ * This method performs redo uperation if possible.
999
+ */
1000
+ redo(): void;
1001
+ get selectionHistoryController(): SelectionHistory;
1002
+ get currentPage(): PageModel;
1003
+ set currentPage(value: PageModel);
1004
+ /**
1005
+ * An event that is raised before a new page is added to the survey.
1006
+ *
1007
+ * Parameters:
1008
+ *
1009
+ * - `sender`: `CreatorBase`\
1010
+ * A Survey Creator instance that raised the event.
1011
+ * - `options.page`: [`PageModel`](https://surveyjs.io/form-library/documentation/api-reference/page-model)\
1012
+ * An added page.
1013
+ * - `options.allow`: `Boolean`\
1014
+ * Set this property to `false` if you do not want to add the page.
1015
+ */
1016
+ onPageAdding: CreatorEvent;
1017
+ addPage(pageToAdd?: PageModel, changeSelection?: boolean, beforeAdd?: () => boolean): PageModel;
1018
+ private addNewPageIntoSurvey;
1019
+ protected initTabs(): void;
1020
+ private initPlugins;
1021
+ private initFooterToolbar;
1022
+ getOptions(): ICreatorOptions;
1023
+ protected setOptions(options: ICreatorOptions): void;
1024
+ private setPropertyPlaceHolder;
1025
+ private setPropertyVisibility;
1026
+ private patchMetadata;
1027
+ isCanModifyProperty(obj: Base, propertyName: string): boolean;
1028
+ onIsPropertyReadOnlyCallback(obj: Base, property: JsonObjectProperty, readOnly: boolean, parentObj: Base, parentProperty: JsonObjectProperty): boolean;
1029
+ /**
1030
+ * The editing survey object (Survey.Survey)
1031
+ */
1032
+ get survey(): SurveyModel;
1033
+ private existingPages;
1034
+ private isInitialSurveyEmptyValue;
1035
+ /**
1036
+ * Returns true if initial survey was empty. It was not set via JSON property and default new survey is empty as well.
1037
+ * @returns true if initial survey doesn't have any elements or properties
1038
+ */
1039
+ get isInitialSurveyEmpty(): boolean;
1040
+ protected initSurveyWithJSON(json: any, clearState: boolean): void;
1041
+ private updatePlugin;
1042
+ protected initDragDrop(): void;
1043
+ /**
1044
+ * An event that is raised when users start to drag a survey element within the design surface.
1045
+ *
1046
+ * Parameters:
1047
+ *
1048
+ * - `sender`: `CreatorBase`\
1049
+ * A Survey Creator instance that raised the event.
1050
+ * - `options.draggedElement`: `any`\
1051
+ * A survey element being dragged.
1052
+ * - `options.fromElement`: `any`\
1053
+ * A survey element from which `draggedElement` is being dragged.
1054
+ * - `options.toElement`: `any`\
1055
+ * A survey element to which `draggedElement` is being dragged.
1056
+ * @see onDragEnd
1057
+ */
1058
+ onDragStart: Survey.Event<() => any, any, any>;
1059
+ onBeforeDrop: Survey.Event<() => any, any, any>;
1060
+ /**
1061
+ * An event that is raised when users finish dragging a survey element within the design surface.
1062
+ *
1063
+ * Parameters:
1064
+ *
1065
+ * - `sender`: `CreatorBase`\
1066
+ * A Survey Creator instance that raised the event.
1067
+ * - `options.draggedElement`: `any`\
1068
+ * A survey element that was dragged.
1069
+ * - `options.fromElement`: `any`\
1070
+ * A survey element from which `draggedElement` was dragged.
1071
+ * - `options.toElement`: `any`\
1072
+ * A survey element to which `draggedElement` was dragged.
1073
+ */
1074
+ onDragEnd: Survey.Event<() => any, any, any>;
1075
+ onAfterDrop: Survey.Event<() => any, any, any>;
1076
+ private initDragDropSurveyElements;
1077
+ private initDragDropChoices;
1078
+ updateElementsOnLocaleChanged(obj: Base, propertyName: string): void;
1079
+ updateConditionsOnNameChanged(obj: Base, propertyName: string, oldValue: any): void;
1080
+ private surveyLogicForUpdate;
1081
+ private surveyLogicRenaming;
1082
+ private getSurveyLogicForUpdate;
1083
+ private clearSurveyLogicForUpdate;
1084
+ private needClearSurveyLogicForUpdate;
1085
+ private updateSurveyLogicValues;
1086
+ private updateSurveyLogicItemValue;
1087
+ protected createSurveyLogicForUpdate(): SurveyLogic;
1088
+ private updateLogicOnQuestionNameChanged;
1089
+ private updateLogicOnColumnNameChanged;
1090
+ private updateChoicesFromQuestionOnColumnNameChanged;
1091
+ isObjQuestion(obj: Base): boolean;
1092
+ isObjPage(obj: Base): boolean;
1093
+ private isObjThisType;
1094
+ private addNewElementReason;
1095
+ private doOnQuestionAdded;
1096
+ private doOnPanelAdded;
1097
+ private doOnPageAdded;
1098
+ private getPageByElement;
1099
+ private getDefaultSurveyJson;
1100
+ protected setSurvey(survey: SurveyModel): void;
1101
+ private getSurveyTextFromDesigner;
1102
+ protected setTextValue(value: string): void;
1103
+ /**
1104
+ * Set JSON as text into survey. Clear undo/redo states optionally.
1105
+ * @param value JSON as text
1106
+ * @param clearState default false. Set this parameter to true to clear undo/redo states.
1107
+ */
1108
+ changeText(value: string, clearState?: boolean): void;
1109
+ /**
1110
+ * The Survey JSON as a text. Use it to get Survey JSON or change it.
1111
+ * @see JSON
1112
+ */
1113
+ get text(): string;
1114
+ set text(value: string);
1115
+ getSurveyJSON(): any;
1116
+ getObjectDisplayName(obj: Base, area: string, reason?: string, displayName?: string): string;
1117
+ createSurvey(json?: any, reason?: string): SurveyModel;
1118
+ protected createSurveyCore(json: any, reason: string): SurveyModel;
1119
+ private _stateValue;
1120
+ /**
1121
+ * Returns the creator state. It may return empty string or "saving" and "saved".
1122
+ */
1123
+ get state(): string;
1124
+ protected setState(value: string): void;
1125
+ onStateChanged: CreatorEvent;
1126
+ notifier: Survey.Notifier;
1127
+ setModified(options?: any): void;
1128
+ notifySurveyPropertyChanged(options: any): void;
1129
+ /**
1130
+ * This function triggers user notification (via the alert() function if no onNotify event handler added).
1131
+ * @see onNotify
1132
+ */
1133
+ notify(msg: string, type?: "info" | "error"): void;
1134
+ protected convertQuestion(obj: Question, className: string): Question;
1135
+ private getDefaultElementJSON;
1136
+ private singlePageJSON;
1137
+ /**
1138
+ * The Survey JSON. Use it to get Survey JSON or change it.
1139
+ * @see text
1140
+ */
1141
+ get JSON(): any;
1142
+ set JSON(val: any);
1143
+ loadSurvey(surveyId: string): void;
1144
+ protected doClickQuestionCore(element: IElement, modifiedType?: string, index?: number, panel?: IPanel): void;
1145
+ private isRowMultiline;
1146
+ private findRowByElement;
1147
+ private addElemenMultiline;
1148
+ setNewNames(element: Survey.ISurveyElement): void;
1149
+ private updateNewElementExpressions;
1150
+ protected getAllQuestions(): Array<any>;
1151
+ protected getAllPanels(): Array<any>;
1152
+ protected addElements(elements: Array<any>, isPanel: boolean, result: Array<any>): void;
1153
+ protected getNewName(type: string, isPanel?: boolean): string;
1154
+ protected getNewQuestionName(): string;
1155
+ protected getNewPanelName(): string;
1156
+ protected setNewNamesCore(element: Survey.ISurveyElement): void;
1157
+ createNewElement(json: any): IElement;
1158
+ copyElement(element: Base): IElement;
1159
+ /**
1160
+ * Copy a question to the active page
1161
+ * @param question A copied Survey.Question
1162
+ */
1163
+ fastCopyQuestion(question: Base): Survey.IElement;
1164
+ /**
1165
+ * Get or set the current selected object in the Creator. It can be a question, panel, page or survey itself.
1166
+ */
1167
+ get selectedElement(): Base;
1168
+ set selectedElement(val: Base);
1169
+ /**
1170
+ * @Deprecated Obsolete. Please use deleteCurrentElement.
1171
+ * @see deleteCurrentElement
1172
+ */
1173
+ deleteCurrentObject(): void;
1174
+ /**
1175
+ * Delete a currently selected element in the survey. It can be a question, a panel or a page.
1176
+ */
1177
+ deleteCurrentElement(): void;
1178
+ /**
1179
+ * Delete an element in the survey. It can be a question, a panel or a page.
1180
+ * @param element a survey element.
1181
+ */
1182
+ deleteElement(element: Base): void;
1183
+ /**
1184
+ * Create a new page with the same elements and place it next to the current one. It returns the new created Survey.Page
1185
+ * @param page A copied Survey.Page
1186
+ */
1187
+ copyPage(page: PageModel): PageModel;
1188
+ protected deleteObjectCore(obj: any): void;
1189
+ private getNextPage;
1190
+ protected deleteObject(obj: any): void;
1191
+ protected updateConditionsOnRemove(obj: any): void;
1192
+ isElementSelected(element: Base): boolean;
1193
+ selectElement(element: any, propertyName?: string, focus?: boolean | string, startEdit?: boolean): void;
1194
+ focusElement(element: any, focus: string | boolean, selEl?: any, propertyName?: string, startEdit?: boolean): void;
1195
+ private getSelectedSurveyElement;
1196
+ private onSelectingElement;
1197
+ protected get designerPropertyGrid(): PropertyGridModel;
1198
+ get propertyGrid(): SurveyModel;
1199
+ /**
1200
+ * Collapse certain property editor tab (category) in properties panel/grid
1201
+ * name - tab category name
1202
+ * @see collapseAllPropertyGridCategories
1203
+ * @see expandPropertyGridCategory
1204
+ * @see expandAllPropertyGridCategories
1205
+ */
1206
+ collapsePropertyGridCategory(name: string): void;
1207
+ /**
1208
+ * Expand certain property editor tab (category) in properties panel/grid
1209
+ * name - tab category name
1210
+ * @see collapsePropertyGridCategory
1211
+ * @see collapseAllPropertyGridCategories
1212
+ * @see expandAllPropertyGridCategories
1213
+ */
1214
+ expandPropertyGridCategory(name: string): void;
1215
+ /**
1216
+ * Expand all property editor tabs (categories) in properties panel/grid
1217
+ * @see collapsePropertyGridCategory
1218
+ * @see expandPropertyGridCategory
1219
+ * @see expandAllPropertyGridCategories
1220
+ */
1221
+ collapseAllPropertyGridCategories(): void;
1222
+ /**
1223
+ * Expand all property editor tabs (categories) in properties panel/grid
1224
+ * @see collapsePropertyGridCategory
1225
+ * @see collapseAllPropertyGridCategories
1226
+ * @see expandPropertyGridCategory
1227
+ */
1228
+ expandAllPropertyGridCategories(): void;
1229
+ /**
1230
+ * @Deprecated Obsolete. Collapse all property editor tabs (categories) in properties panel/grid
1231
+ * @see collapseAllPropertyGridCategories
1232
+ *
1233
+ */
1234
+ collapseAllPropertyTabs(): void;
1235
+ /**
1236
+ * @Deprecated Obsolete. Expand all property editor tabs (categories) in properties panel/grid
1237
+ * @see expandAllPropertyGridCategories
1238
+ */
1239
+ expandAllPropertyTabs(): void;
1240
+ /**
1241
+ * @Deprecated Obsolete. Expand certain property editor tab (category) in properties panel/grid
1242
+ * name - tab category name
1243
+ * @see expandPropertyGridCategory
1244
+ */
1245
+ expandPropertyTab(name: string): void;
1246
+ /**
1247
+ * @Deprecated Obsolete. Collapse certain property editor tab (category) in properties panel/grid
1248
+ * name - tab category name
1249
+ * @see collapsePropertyGridCategory
1250
+ */
1251
+ collapsePropertyTab(name: string): void;
1252
+ /**
1253
+ * Check for errors in property grid and adorners of the selected elements.
1254
+ * Returns true if selected element is null or there is no errors.
1255
+ */
1256
+ validateSelectedElement(): boolean;
1257
+ /**
1258
+ * Deletes all custom translation strings for the passed locale from Survey Creator and from the generated survey JSON schema.
1259
+ * @param locale A locale code (for example, "en").
1260
+ */
1261
+ deleteLocaleStrings(locale: string): void;
1262
+ private getPropertyGridExpandedCategory;
1263
+ private expandCategoryIfNeeded;
1264
+ private selectionChanged;
1265
+ private getCurrentPageByElement;
1266
+ clickToolboxItem(newElement: any, panel?: IPanel, modifiedType?: string): void;
1267
+ getJSONForNewElement(json: any): any;
1268
+ /**
1269
+ * Open file chooser dialog
1270
+ * @param input file input element
1271
+ * @param onFilesChosen a call back function to process chosen files
1272
+ */
1273
+ chooseFiles(input: HTMLInputElement, onFilesChosen: (files: File[]) => void): void;
1274
+ /**
1275
+ * Upload the files on a server
1276
+ * @param files files to upload
1277
+ * @param uploadingCallback a call back function to get the status on uploading the file and operation result - URI of the uploaded file
1278
+ */
1279
+ uploadFiles(files: File[], question: Question, uploadingCallback: (status: string, data: any) => any): void;
1280
+ initKeyboardShortcuts(rootNode: HTMLElement): void;
1281
+ removeKeyboardShortcuts(rootNode: HTMLElement): void;
1282
+ protected onKeyDownHandler: (event: KeyboardEvent) => void;
1283
+ private shortcuts;
1284
+ registerShortcut(name: string, shortcut: IKeyboardShortcut): void;
1285
+ unRegisterShortcut(name: string): void;
1286
+ protected deletePanelOrQuestion(obj: Base): void;
1287
+ protected onCanShowObjectProperty(object: any, property: JsonObjectProperty, showMode: string, parentObj: any, parentProperty: JsonObjectProperty): boolean;
1288
+ protected canDeleteItem(object: any, item: Base, allowDelete: boolean): boolean;
1289
+ private getErrorOnPropertyChanging;
1290
+ protected generateUniqueName(el: Base, newName: string): string;
1291
+ protected isNameUnique(el: Base, newName: string): boolean;
1292
+ private isNameUniqueInArray;
1293
+ protected doPropertyGridChanged(): void;
1294
+ get alwaySaveTextInPropertyEditors(): boolean;
1295
+ set alwaySaveTextInPropertyEditors(value: boolean);
1296
+ onCanShowPropertyCallback(object: any, property: JsonObjectProperty, showMode: string, parentObj: any, parentProperty: JsonObjectProperty): boolean;
1297
+ onPropertyGridSurveyCreatedCallback(object: any, survey: SurveyModel): void;
1298
+ onPropertyEditorCreatedCallback(object: any, property: JsonObjectProperty, editor: Question): void;
1299
+ onPropertyEditorUpdateTitleActionsCallback(object: any, property: JsonObjectProperty, editor: Question, titleActions: IAction[]): void;
1300
+ onPropertyGridShowModalCallback(object: any, property: JsonObjectProperty, editor: Question, popupEditor: any, popupModel: PopupBaseViewModel): void;
1301
+ onCanDeleteItemCallback(object: any, item: Base, allowDelete: boolean): boolean;
1302
+ onCollectionItemDeletingCallback(obj: Base, property: JsonObjectProperty, collection: Array<Base>, item: Base): boolean;
1303
+ onCollectionItemAllowingCallback(obj: Base, property: JsonObjectProperty, collection: Array<Base>, item: Base, itemOptions: ICollectionItemAllowOperations): void;
1304
+ onItemValueAddedCallback(obj: Base, propertyName: string, itemValue: Survey.ItemValue, itemValues: Array<Survey.ItemValue>): void;
1305
+ onMatrixDropdownColumnAddedCallback(matrix: Survey.Question, column: Survey.MatrixDropdownColumn, columns: Array<Survey.MatrixDropdownColumn>): void;
1306
+ onSetPropertyEditorOptionsCallback(propertyName: string, obj: Base, editorOptions: any): void;
1307
+ onGetErrorTextOnValidationCallback(propertyName: string, obj: Base, value: any): string;
1308
+ onValueChangingCallback(options: any): void;
1309
+ onGetElementEditorTitleCallback(obj: Base, title: string): string;
1310
+ onConditionQuestionsGetListCallback(propertyName: string, obj: Base, editor: any, list: any[]): string;
1311
+ onConditionGetTitleCallback(expression: string, title: string): string;
1312
+ onLogicGetTitleCallback(expression: string, expressionText: string, text: string, logicItem: any): string;
1313
+ getProcessedTranslationItemText(locale: string, locString: ILocalizableString, newText: string, obj: any): string;
1314
+ getTranslationExportedText(obj: Base, name: string, locString: ILocalizableString, locale: string, text: string): string;
1315
+ /**
1316
+ * The delay on saving survey JSON on autoSave in ms. It is 500 ms by default.
1317
+ * If during this period of time an end-user modify survey, then the last version will be saved only. Set to 0 to save immediately.
1318
+ * @see isAutoSave
1319
+ */
1320
+ autoSaveDelay: number;
1321
+ private autoSaveTimerId;
1322
+ protected doAutoSave(): void;
1323
+ saveNo: number;
1324
+ doSave(): void;
1325
+ showSaveButton: boolean;
1326
+ /**
1327
+ * Assign to this property a function that will be called on clicking the 'Save' button or on any change if isAutoSave equals true.
1328
+ * @see isAutoSave
1329
+ */
1330
+ get saveSurveyFunc(): any;
1331
+ set saveSurveyFunc(value: any);
1332
+ convertCurrentQuestion(newType: string): void;
1333
+ getAddNewQuestionText(currentAddQuestionType?: string): any;
1334
+ get addNewQuestionText(): any;
1335
+ getQuestionTypeSelectorModel(beforeAdd: (type: string) => void, panel?: IPanel): any;
1336
+ addNewQuestionInPage(beforeAdd: (string: any) => void, panel?: IPanel, type?: string): void;
1337
+ createIActionBarItemByClass(className: string, title: string, iconName: string, needSeparator: boolean): Action;
1338
+ onElementMenuItemsChanged(element: any, items: Action[]): void;
1339
+ getElementAllowOperations(element: SurveyElement): any;
1340
+ getChoicesItemBaseTitle(): any;
1341
+ getNextItemValue(question: QuestionSelectBase): string | number;
1342
+ createNewItemValue(question: QuestionSelectBase): ItemValue;
1343
+ protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
1344
+ initResponsivityManager(container: HTMLDivElement): void;
1345
+ resetResponsivityManager(): void;
1346
+ showHeaderInEmptySurvey: any;
1347
+ showPageNavigator: any;
1348
+ showTabs: any;
1349
+ showToolbar: any;
1350
+ allowCollapseSidebar: any;
1351
+ isMobileView: any;
1352
+ toolboxLocation: toolboxLocationType;
1353
+ sidebarLocation: "left" | "right";
1354
+ selectFromStringEditor: boolean;
1355
+ isCreatorDisposed: boolean;
1356
+ dispose(): void;
1357
+ }
1358
+ export declare class SurveyCreatorModel extends CreatorBase {
1359
+ }
1360
+ export declare class StylesManager {
1361
+ static get currentTheme(): string;
1362
+ static set currentTheme(val: string);
1363
+ static applyTheme(name?: string): void;
1364
+ }
1365
+ export declare function initializeDesignTimeSurveyModel(model: any, creator: CreatorBase): void;
1366
+ export declare const editableStringRendererName = "svc-string-editor";
1367
+ export declare function getElementWrapperComponentName(element: any, reason: string, isPopupEditorContent: boolean): string;
1368
+ export declare function getQuestionContentWrapperComponentName(element: any): string;
1369
+ export declare function getElementWrapperComponentData(element: any, reason: string, creator: CreatorBase): any;
1370
+ export declare function getItemValueWrapperComponentName(item: ItemValue, question: QuestionSelectBase): string;
1371
+ export declare function getItemValueWrapperComponentData(item: ItemValue, question: QuestionSelectBase, creator: CreatorBase): any;
1372
+ export declare function isStringEditable(element: any, name: string): boolean;
1373
+ export declare function isTextInput(target: any): boolean;
1374
+ export declare function registerAdorner(name: any, adorner: any): void;
1375
+ export declare function removeAdorners(names?: string[]): void;