survey-creator-core 1.11.5 → 1.11.7

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 (91) hide show
  1. package/fonts.fontless.css +1 -1
  2. package/fonts.fontless.min.css +1 -1
  3. package/i18n/arabic.js +1 -1
  4. package/i18n/arabic.min.js +1 -1
  5. package/i18n/bulgarian.js +1 -1
  6. package/i18n/bulgarian.min.js +1 -1
  7. package/i18n/croatian.js +1 -1
  8. package/i18n/croatian.min.js +1 -1
  9. package/i18n/czech.js +1 -1
  10. package/i18n/czech.min.js +1 -1
  11. package/i18n/danish.js +1 -1
  12. package/i18n/danish.min.js +1 -1
  13. package/i18n/dutch.js +1 -1
  14. package/i18n/dutch.min.js +1 -1
  15. package/i18n/english.js +7 -3
  16. package/i18n/english.js.map +1 -1
  17. package/i18n/english.min.js +2 -2
  18. package/i18n/finnish.js +1 -1
  19. package/i18n/finnish.min.js +1 -1
  20. package/i18n/french.js +1 -1
  21. package/i18n/french.min.js +1 -1
  22. package/i18n/german.js +1 -1
  23. package/i18n/german.min.js +1 -1
  24. package/i18n/hebrew.js +1 -1
  25. package/i18n/hebrew.min.js +1 -1
  26. package/i18n/hungarian.js +1 -1
  27. package/i18n/hungarian.min.js +1 -1
  28. package/i18n/index.js +1 -1
  29. package/i18n/index.min.js +1 -1
  30. package/i18n/indonesian.js +1 -1
  31. package/i18n/indonesian.min.js +1 -1
  32. package/i18n/italian.js +1 -1
  33. package/i18n/italian.min.js +1 -1
  34. package/i18n/japanese.js +1 -1
  35. package/i18n/japanese.min.js +1 -1
  36. package/i18n/korean.js +1 -1
  37. package/i18n/korean.min.js +1 -1
  38. package/i18n/malay.js +1 -1
  39. package/i18n/malay.min.js +1 -1
  40. package/i18n/mongolian.js +1 -1
  41. package/i18n/mongolian.min.js +1 -1
  42. package/i18n/norwegian.js +1 -1
  43. package/i18n/norwegian.min.js +1 -1
  44. package/i18n/persian.js +1 -1
  45. package/i18n/persian.min.js +1 -1
  46. package/i18n/polish.js +1 -1
  47. package/i18n/polish.min.js +1 -1
  48. package/i18n/portuguese.js +1 -1
  49. package/i18n/portuguese.min.js +1 -1
  50. package/i18n/russian.js +1 -1
  51. package/i18n/russian.min.js +1 -1
  52. package/i18n/simplified-chinese.js +1 -1
  53. package/i18n/simplified-chinese.min.js +1 -1
  54. package/i18n/slovak.js +1 -1
  55. package/i18n/slovak.min.js +1 -1
  56. package/i18n/spanish.js +1 -1
  57. package/i18n/spanish.min.js +1 -1
  58. package/i18n/swedish.js +1 -1
  59. package/i18n/swedish.min.js +1 -1
  60. package/i18n/tajik.js +1 -1
  61. package/i18n/tajik.min.js +1 -1
  62. package/i18n/traditional-chinese.js +1 -1
  63. package/i18n/traditional-chinese.min.js +1 -1
  64. package/i18n/turkish.js +1 -1
  65. package/i18n/turkish.min.js +1 -1
  66. package/package.json +2 -2
  67. package/survey-creator-core.css +247 -39
  68. package/survey-creator-core.fontless.css +246 -38
  69. package/survey-creator-core.fontless.css.map +1 -1
  70. package/survey-creator-core.fontless.min.css +10 -10
  71. package/survey-creator-core.i18n.js +1 -1
  72. package/survey-creator-core.i18n.min.js +1 -1
  73. package/survey-creator-core.js +653 -186
  74. package/survey-creator-core.js.map +1 -1
  75. package/survey-creator-core.min.css +11 -11
  76. package/survey-creator-core.min.js +4 -4
  77. package/typings/components/action-container-view-model.d.ts +9 -1
  78. package/typings/components/question.d.ts +4 -2
  79. package/typings/components/tabs/designer-plugin.d.ts +2 -0
  80. package/typings/components/tabs/designer-state-manager.d.ts +17 -0
  81. package/typings/components/tabs/theme-plugin.d.ts +2 -0
  82. package/typings/components/toolbox/toolbox-tool.d.ts +8 -4
  83. package/typings/creator-base.d.ts +30 -6
  84. package/typings/creator-events-api.d.ts +21 -20
  85. package/typings/creator-options.d.ts +12 -0
  86. package/typings/editorLocalization.d.ts +4 -0
  87. package/typings/localization/english.d.ts +4 -0
  88. package/typings/property-grid/index.d.ts +6 -0
  89. package/typings/questionconverter.d.ts +2 -1
  90. package/typings/survey-helper.d.ts +1 -0
  91. package/typings/toolbox.d.ts +133 -86
@@ -1,5 +1,6 @@
1
- import { Base, AdaptiveActionContainer, Action, SurveyElement } from "survey-core";
1
+ import { Base, AdaptiveActionContainer, Action, SurveyElement, ActionContainer } from "survey-core";
2
2
  import { SurveyCreatorModel } from "../creator-base";
3
+ import { DesignerStateManager } from "./tabs/designer-state-manager";
3
4
  export declare class SurveyElementActionContainer extends AdaptiveActionContainer {
4
5
  private needToShrink;
5
6
  private setModeForActions;
@@ -10,7 +11,11 @@ export declare class SurveyElementAdornerBase<T extends SurveyElement = SurveyEl
10
11
  creator: SurveyCreatorModel;
11
12
  protected surveyElement: T;
12
13
  actionContainer: SurveyElementActionContainer;
14
+ topActionContainer: ActionContainer;
15
+ protected designerStateManager: DesignerStateManager;
13
16
  allowDragging: boolean;
17
+ collapsed: boolean;
18
+ renderedCollapsed: boolean;
14
19
  private allowEditOption;
15
20
  private selectedPropPageFunc;
16
21
  private sidebarFlyoutModeChangedFunc;
@@ -27,6 +32,9 @@ export declare class SurveyElementAdornerBase<T extends SurveyElement = SurveyEl
27
32
  protected updateActionVisibility(id: string, isVisible: boolean): void;
28
33
  getActionById(id: string): Action;
29
34
  protected buildActions(items: Array<Action>): void;
35
+ isDisableSelecting: boolean;
36
+ protected disableActionFocusing(isMouse: boolean, event: any): void;
37
+ protected canSelectElement(): boolean;
30
38
  get allowEdit(): boolean;
31
39
  get showAddQuestionButton(): boolean;
32
40
  protected setShowAddQuestionButton(val: boolean): void;
@@ -16,8 +16,9 @@ export declare class QuestionAdornerViewModel extends SurveyElementAdornerBase {
16
16
  private dragOrClickHelper;
17
17
  constructor(creator: SurveyCreatorModel, surveyElement: SurveyElement, templateData: SurveyTemplateRendererTemplateData);
18
18
  get element(): SurveyElement<any>;
19
+ protected canSelectElement(): boolean;
19
20
  select(model: QuestionAdornerViewModel, event: IPortableEvent): boolean;
20
- rootCss(): "" | " svc-question__adorner--start-with-new-line";
21
+ rootCss(): string;
21
22
  css(): string;
22
23
  get isDragMe(): boolean;
23
24
  get dragTypeOverMe(): DragTypeOverMeEnum;
@@ -43,7 +44,8 @@ export declare class QuestionAdornerViewModel extends SurveyElementAdornerBase {
43
44
  set isRequired(newVal: any);
44
45
  onPointerDown(pointerDownEvent: PointerEvent): void;
45
46
  startDragSurveyElement: (event: PointerEvent) => boolean;
46
- getConvertToTypesActions(): Array<IAction>;
47
+ private getConvertToTypes;
48
+ getConvertToTypesActions(parentAction?: Action): Array<IAction>;
47
49
  private get currentType();
48
50
  private createConvertToAction;
49
51
  private createConvertInputType;
@@ -3,6 +3,7 @@ import { SurveyCreatorModel } from "../../creator-base";
3
3
  import { ICreatorPlugin } from "../../creator-settings";
4
4
  import { PropertyGridViewModel } from "../../property-grid/property-grid-view-model";
5
5
  import { TabDesignerViewModel } from "./designer";
6
+ import { DesignerStateManager } from "./designer-state-manager";
6
7
  export declare class TabDesignerPlugin implements ICreatorPlugin {
7
8
  private creator;
8
9
  model: TabDesignerViewModel;
@@ -13,6 +14,7 @@ export declare class TabDesignerPlugin implements ICreatorPlugin {
13
14
  private saveSurveyAction;
14
15
  previewAction: Action;
15
16
  private designerAction;
17
+ designerStateManager: DesignerStateManager;
16
18
  private get isSurveySelected();
17
19
  private get isSettingsActive();
18
20
  private createVisibleUpdater;
@@ -0,0 +1,17 @@
1
+ import { SurveyElement, SurveyModel } from "survey-core";
2
+ declare class ElementState {
3
+ collapsed: boolean;
4
+ }
5
+ export declare class DesignerStateManager {
6
+ private elementState;
7
+ private pageState;
8
+ private getStateMapForElement;
9
+ private onQuestionAddedHandler;
10
+ private onPageAddedHandler;
11
+ private onPanelAddedHandler;
12
+ initForSurvey(survey: SurveyModel): void;
13
+ initForElement(element: SurveyElement): void;
14
+ getElementState(element: SurveyElement): ElementState;
15
+ constructor();
16
+ }
17
+ export {};
@@ -20,6 +20,8 @@ import { ThemeModel } from "./theme-model";
20
20
  * const creator = new SurveyCreatorModel(creatorOptions);
21
21
  * creator.themeEditor.settingName = "value";
22
22
  * ```
23
+ *
24
+ * [Theme Editor Documentation](https://surveyjs.io/survey-creator/documentation/theme-editor (linkStyle))
23
25
  */
24
26
  export declare class ThemeTabPlugin implements ICreatorPlugin {
25
27
  private creator;
@@ -1,16 +1,20 @@
1
- import { Base } from "survey-core";
2
- import { IQuestionToolboxItem } from "../../toolbox";
1
+ import { Base, ActionContainer } from "survey-core";
2
+ import { IQuestionToolboxItem, QuestionToolboxItem } from "../../toolbox";
3
3
  import { SurveyCreatorModel } from "../../creator-base";
4
4
  export declare class ToolboxToolViewModel extends Base {
5
5
  protected item: IQuestionToolboxItem;
6
6
  protected creator: SurveyCreatorModel;
7
+ protected model: ActionContainer;
7
8
  private dragOrClickHelper;
8
- constructor(item: IQuestionToolboxItem, creator: SurveyCreatorModel);
9
+ constructor(item: IQuestionToolboxItem, creator: SurveyCreatorModel, model: ActionContainer);
9
10
  click: (event: any) => void;
11
+ get toolboxItem(): QuestionToolboxItem;
10
12
  get allowAdd(): boolean;
13
+ onMouseOver(itemValue: any, mouseoverEvent: any): void;
14
+ onMouseLeave(itemValue: any, mouseoverEvent: any): void;
11
15
  onPointerDown(pointerDownEvent: any): boolean;
12
- private _node;
13
16
  private onPointerUp;
14
17
  private startDragToolboxItem;
18
+ private hidePopup;
15
19
  private get dragDropHelper();
16
20
  }
@@ -14,7 +14,7 @@ import { ICreatorOptions } from "./creator-options";
14
14
  import { ThemeTabPlugin } from "./components/tabs/theme-plugin";
15
15
  import { DragDropSurveyElements } from "./survey-elements";
16
16
  import { PageAdorner } from "./components/page";
17
- import { ElementDeletingEvent, PropertyGetReadOnlyEvent, ElementGetDisplayNameEvent, HtmlToMarkdownEvent, ElementAllowOperationsEvent, ElementGetActionsEvent, PropertyAddingEvent, PropertyGridSurveyCreatedEvent, PropertyEditorCreatedEvent, PropertyEditorUpdateTitleActionsEvent, PropertyGridShowPopupEvent, CollectionItemAllowOperationsEvent, CollectionItemAddedEvent, FastEntryItemsEvent as FastEntryFinishedEvent, MatrixColumnAddedEvent, ConfigureTablePropertyEditorEvent, PropertyDisplayCustomErrorEvent, PropertyValueChangingEvent, PropertyValueChangedEvent, ConditionGetQuestionListEvent, GetConditionOperatorEvent, LogicRuleGetDisplayTextEvent, ModifiedEvent, QuestionAddedEvent, PanelAddedEvent, PageAddedEvent, PageGetFooterActionsEvent, SurveyInstanceCreatedEvent, DesignerSurveyCreatedEvent, PreviewSurveyCreatedEvent, NotifyEvent, ElementFocusingEvent, ElementFocusedEvent, OpenFileChooserEvent, UploadFileEvent, TranslationStringVisibilityEvent, TranslationImportItemEvent, TranslationImportedEvent, TranslationExportItemEvent, MachineTranslateEvent, TranslationItemChangingEvent, DragDropAllowEvent, CreateCustomMessagePanelEvent, ActiveTabChangingEvent, ActiveTabChangedEvent, BeforeUndoEvent, BeforeRedoEvent, PageAddingEvent, DragStartEndEvent } from "./creator-events-api";
17
+ import { ElementDeletingEvent, PropertyGetReadOnlyEvent, ElementGetDisplayNameEvent, HtmlToMarkdownEvent, ElementAllowOperationsEvent, ElementGetActionsEvent, PropertyAddingEvent, PropertyGridSurveyCreatedEvent, PropertyEditorCreatedEvent, PropertyEditorUpdateTitleActionsEvent, PropertyGridShowPopupEvent, CollectionItemAllowOperationsEvent, CollectionItemAddedEvent, FastEntryItemsEvent as FastEntryFinishedEvent, MatrixColumnAddedEvent, ConfigureTablePropertyEditorEvent, PropertyDisplayCustomErrorEvent, PropertyValueChangingEvent, PropertyValueChangedEvent, ConditionGetQuestionListEvent, GetConditionOperatorEvent, LogicRuleGetDisplayTextEvent, ModifiedEvent, QuestionAddedEvent, PanelAddedEvent, PageAddedEvent, QuestionConvertingEvent, PageGetFooterActionsEvent, SurveyInstanceCreatedEvent, DesignerSurveyCreatedEvent, PreviewSurveyCreatedEvent, NotifyEvent, ElementFocusingEvent, ElementFocusedEvent, OpenFileChooserEvent, UploadFileEvent, TranslationStringVisibilityEvent, TranslationImportItemEvent, TranslationImportedEvent, TranslationExportItemEvent, MachineTranslateEvent, TranslationItemChangingEvent, DragDropAllowEvent, CreateCustomMessagePanelEvent, ActiveTabChangingEvent, ActiveTabChangedEvent, BeforeUndoEvent, BeforeRedoEvent, PageAddingEvent, DragStartEndEvent } from "./creator-events-api";
18
18
  export interface IKeyboardShortcut {
19
19
  name?: string;
20
20
  affectedTab?: string;
@@ -146,7 +146,7 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
146
146
  *
147
147
  * Default value: `false`
148
148
  *
149
- * 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.
149
+ * 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 decrease the delay.
150
150
  */
151
151
  isAutoSave: boolean;
152
152
  showOptions: boolean;
@@ -403,6 +403,10 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
403
403
  * [Customize Survey Elements on Creation](https://surveyjs.io/survey-creator/documentation/customize-survey-creation-process#customize-survey-elements-on-creation (linkStyle))
404
404
  */
405
405
  onPageAdded: EventBase<SurveyCreatorModel, PageAddedEvent>;
406
+ /**
407
+ * An event that is raised when a [question's type is being changed](https://surveyjs.io/survey-creator/documentation/end-user-guide/user-interface#how-to-change-the-question-type).
408
+ */
409
+ onQuestionConverting: EventBase<SurveyCreatorModel, QuestionConvertingEvent>;
406
410
  /**
407
411
  * An event that is raised when Survey Creator renders action buttons under each page on the design surface. Use this event to add, remove, or modify the buttons.
408
412
  * @see onDefineElementMenuItems
@@ -847,6 +851,11 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
847
851
  private canSwitchViewType;
848
852
  private activatePlugin;
849
853
  private get currentPlugin();
854
+ /**
855
+ * Provides access to the [Toolbox API](https://surveyjs.io/survey-creator/documentation/api-reference/questiontoolbox).
856
+ *
857
+ * [Toolbox Customization](https://surveyjs.io/survey-creator/documentation/toolbox-customization (linkStyle))
858
+ */
850
859
  toolbox: QuestionToolbox;
851
860
  get toolboxCategories(): Array<any>;
852
861
  sidebar: SidebarModel;
@@ -1013,6 +1022,7 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
1013
1022
  private getDefaultSurveyJson;
1014
1023
  protected setSurvey(survey: SurveyModel): void;
1015
1024
  private getSurveyTextFromDesigner;
1025
+ private moveElementsToTheEnd;
1016
1026
  protected setTextValue(value: string): void;
1017
1027
  changeText(value: string, clearState?: boolean): void;
1018
1028
  /**
@@ -1065,6 +1075,18 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
1065
1075
  get JSON(): any;
1066
1076
  set JSON(val: any);
1067
1077
  loadSurvey(surveyId: string): void;
1078
+ /**
1079
+ * Specifies where to add new questions when users click the "Add Question" button.
1080
+ *
1081
+ * Accepted values:
1082
+ *
1083
+ * - `true` (default)
1084
+ * New questions are added to the end of a survey page.
1085
+ *
1086
+ * - `false`
1087
+ * New questions are added after the currently selected question on the design surface.
1088
+ */
1089
+ addNewQuestionLast: boolean;
1068
1090
  protected doClickQuestionCore(element: IElement, modifiedType?: string, index?: number, panel?: IPanel): void;
1069
1091
  private isRowMultiline;
1070
1092
  private findRowByElement;
@@ -1081,11 +1103,12 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
1081
1103
  createNewElement(json: any): IElement;
1082
1104
  copyElement(element: Base): IElement;
1083
1105
  /**
1084
- * Creates a copy of a specified question and inserts the copy next to this question.
1106
+ * Creates a copy of a specified question, inserts the copy next to this question, and (optionally) selects it on the design surface.
1085
1107
  * @param question A question to copy.
1108
+ * @param selectCopy *(Optional)* Pass `true` if you want to select the copy on the design surface. Default value: `false`.
1086
1109
  * @returns The instance of a new question.
1087
1110
  */
1088
- fastCopyQuestion(question: Base): IElement;
1111
+ fastCopyQuestion(question: Base, selectCopy?: boolean): IElement;
1089
1112
  /**
1090
1113
  * Gets or sets the focused survey element: a question, panel, page, or the survey itself.
1091
1114
  * @see onSelectedElementChanging
@@ -1309,8 +1332,8 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
1309
1332
  getAvailableToolboxItems(element?: SurveyElement, isAddNew?: boolean): Array<QuestionToolboxItem>;
1310
1333
  getQuestionTypeSelectorModel(beforeAdd: (type: string) => void, element?: SurveyElement): Action;
1311
1334
  getUpdatedPageAdornerFooterActions(pageAdorner: PageAdorner, actions: Array<IAction>): IAction[];
1312
- addNewQuestionInPage(beforeAdd: (string: any) => void, panel?: IPanel, type?: string): void;
1313
- createIActionBarItemByClass(className: string, title: string, iconName: string, needSeparator: boolean): Action;
1335
+ addNewQuestionInPage(beforeAdd: (string: any) => void, panel?: IPanel, type?: string, subtype?: string): void;
1336
+ createIActionBarItemByClass(item: QuestionToolboxItem, needSeparator: boolean, onSelectQuestionType?: (questionType: string, subtype?: string) => void): Action;
1314
1337
  onElementMenuItemsChanged(element: any, items: Action[]): void;
1315
1338
  getElementAllowOperations(element: SurveyElement): any;
1316
1339
  getChoicesItemBaseTitle(): any;
@@ -1349,6 +1372,7 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
1349
1372
  * @see toolboxLocation
1350
1373
  */
1351
1374
  sidebarLocation: "left" | "right";
1375
+ expandCollapseButtonVisibility?: "never" | "onhover" | "always";
1352
1376
  selectFromStringEditor: boolean;
1353
1377
  isCreatorDisposed: boolean;
1354
1378
  dispose(): void;
@@ -423,29 +423,21 @@ export interface LogicRuleGetDisplayTextEvent {
423
423
  }
424
424
  export interface ModifiedEvent {
425
425
  /**
426
- * A value that indicates the modification: `"ADDED_FROM_TOOLBOX"`, `"PAGE_ADDED"`, `"PAGE_MOVED"`, `"QUESTION_CONVERTED"`, `"QUESTION_CHANGED_BY_EDITOR"`, `"PROPERTY_CHANGED"`, `"ELEMENT_REORDERED"`, `"OBJECT_DELETED"`, `"VIEW_TYPE_CHANGED"`, `"DO_DROP"`, `"TRANSLATIONS_CHANGED"`, `"JSON_EDITOR"`, `"THEME_MODIFIED"`
426
+ * A value that indicates the modification: `"ADDED_FROM_TOOLBOX"`, "ADDED_FROM_PAGEBUTTON", `"PAGE_ADDED"`, `"QUESTION_CONVERTED"`, `"ELEMENT_COPIED"`, `"PROPERTY_CHANGED"`, `"ELEMENT_REORDERED"`, `"OBJECT_DELETED"`, `"JSON_EDITOR"`
427
427
  *
428
428
  * Depending on the `options.type` value, the `options` object contains parameters listed below:
429
429
  *
430
- * `options.type`: `"ADDED_FROM_TOOLBOX"`
431
- * - `options.question` - An added question.
430
+ * `options.type`: `"ADDED_FROM_TOOLBOX"` | `"ADDED_FROM_PAGEBUTTON"` | `"ELEMENT_COPIED"`
431
+ * - `options.question` - An added or copied survey element.
432
432
  *
433
433
  * `options.type`: `"PAGE_ADDED"`
434
434
  * - `options.newValue` - An added page.
435
435
  *
436
- * `options.type`: `"PAGE_MOVED"`
437
- * - `options.page` - A moved page.
438
- * - `options.indexFrom` - A previous index.
439
- * - `options.indexTo` - A current index.
440
- *
441
436
  * `options.type`: `"QUESTION_CONVERTED"`
442
437
  * - `options.className` - The name of a class to which a question has been converted.
443
438
  * - `options.oldValue` - An object of a previous class.
444
439
  * - `options.newValue` - An object of a class specified by `options.className`.
445
440
  *
446
- * `options.type`: `"QUESTION_CHANGED_BY_EDITOR"`
447
- * - `options.question` - A question that has been edited in a pop-up editor.
448
- *
449
441
  * `options.type`: `"PROPERTY_CHANGED"`
450
442
  * - `options.name` - The name of the changed property.
451
443
  * - `options.target` - An object that contains the changed property.
@@ -461,15 +453,6 @@ export interface ModifiedEvent {
461
453
  *
462
454
  * `options.type`: `"OBJECT_DELETED"`
463
455
  * - `options.target` - A deleted object.
464
- *
465
- * `options.type`: `"VIEW_TYPE_CHANGED"`
466
- * - `options.newType` - A current view: `"editor"` or `"designer"`.
467
- *
468
- * `options.type`: `"DO_DROP"`
469
- * - `options.page` - A parent page of the dragged element.
470
- * - `options.source` - A dragged element.
471
- * - `options.target` - A drop target.
472
- * - `options.newElement` - A new element. This parameter is defined only if users drag a question or panel from the Toolbox.
473
456
  */
474
457
  type: string;
475
458
  question?: Question;
@@ -522,6 +505,20 @@ export interface PageAddedEvent {
522
505
  */
523
506
  page: PageModel;
524
507
  }
508
+ export interface QuestionConvertingEvent {
509
+ /**
510
+ * A question of the previous type.
511
+ */
512
+ sourceQuestion: Question;
513
+ /**
514
+ * A target [type](https://surveyjs.io/form-library/documentation/api-reference/question#getType).
515
+ */
516
+ targetType: string;
517
+ /**
518
+ * A JSON object produced by the previous question. You can modify this object to decide which properties should be copied to a new question. Set this parameter to `undefined` if you want to create the new question with a default JSON object.
519
+ */
520
+ json: any;
521
+ }
525
522
  export interface PageGetFooterActionsEvent {
526
523
  /**
527
524
  * An array of actions. You can add, modify, or remove actions from this array.
@@ -777,6 +774,10 @@ export interface DragDropAllowEvent {
777
774
  * A survey within which the drag and drop operation occured.
778
775
  */
779
776
  survey?: SurveyModel;
777
+ /**
778
+ * A Boolean property that you can set to `false` if you want to disallow placing `draggedElement` on the same line with any other survey element.
779
+ */
780
+ allowDropNextToAnother?: boolean;
780
781
  /**
781
782
  * A Boolean property that you can set to `false` if you want to cancel the drag and drop operation.
782
783
  */
@@ -242,6 +242,18 @@ export interface ICreatorOptions {
242
242
  * Refer to the [Limit Available Question and Panel Types](https://surveyjs.io/Documentation/Survey-Creator?id=toolbox#limit-available-question-and-panel-types) help topic for more information.
243
243
  */
244
244
  questionTypes?: Array<string>;
245
+ /**
246
+ * Specifies where to add new questions when users click the "Add Question" button.
247
+ *
248
+ * Accepted values:
249
+ *
250
+ * - `true` (default)
251
+ * New questions are added to the end of a survey page.
252
+ *
253
+ * - `false`
254
+ * New questions are added after the currently selected question on the design surface.
255
+ */
256
+ addNewQuestionLast?: boolean;
245
257
  /**
246
258
  * Specifies how Survey Creator users edit survey pages.
247
259
  *
@@ -448,6 +448,9 @@ export declare var defaultStrings: {
448
448
  rateDescriptionLocation: string;
449
449
  size: string;
450
450
  cellErrorLocation: string;
451
+ enabled: string;
452
+ disabled: string;
453
+ inherit: string;
451
454
  apply: string;
452
455
  ok: string;
453
456
  save: string;
@@ -1469,6 +1472,7 @@ export declare var defaultStrings: {
1469
1472
  filePlaceholder: string;
1470
1473
  photoPlaceholder: string;
1471
1474
  fileOrPhotoPlaceholder: string;
1475
+ colCount: string;
1472
1476
  masksettings: {
1473
1477
  saveMaskedValue: string;
1474
1478
  };
@@ -406,6 +406,9 @@ export declare var enStrings: {
406
406
  rateDescriptionLocation: string;
407
407
  size: string;
408
408
  cellErrorLocation: string;
409
+ enabled: string;
410
+ disabled: string;
411
+ inherit: string;
409
412
  apply: string;
410
413
  ok: string;
411
414
  save: string;
@@ -1427,6 +1430,7 @@ export declare var enStrings: {
1427
1430
  filePlaceholder: string;
1428
1431
  photoPlaceholder: string;
1429
1432
  fileOrPhotoPlaceholder: string;
1433
+ colCount: string;
1430
1434
  masksettings: {
1431
1435
  saveMaskedValue: string;
1432
1436
  };
@@ -177,6 +177,12 @@ export declare class PropertyGridEditorBoolean extends PropertyGridEditor {
177
177
  getJSON(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
178
178
  isSupportGrouping(): boolean;
179
179
  }
180
+ export declare class PropertyGridEditorUndefinedBoolean extends PropertyGridEditor {
181
+ fit(prop: JsonObjectProperty, context?: string): boolean;
182
+ getJSON(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
183
+ onCreated(obj: Base, question: Question, prop: JsonObjectProperty, options: ISurveyCreatorOptions, propGridDefinition?: ISurveyPropertyGridDefinition): void;
184
+ onSetup(obj: Base, question: Question, prop: JsonObjectProperty, options: ISurveyCreatorOptions): void;
185
+ }
180
186
  export declare abstract class PropertyGridEditorStringBase extends PropertyGridEditor {
181
187
  protected updateMaxLength(prop: JsonObjectProperty, json: any): any;
182
188
  protected updateType(prop: JsonObjectProperty, obj: Base, json: any): any;
@@ -6,7 +6,8 @@ export declare class QuestionConverter {
6
6
  static addConvertInfo(className: string, convertToClassName: string): void;
7
7
  private static getConvertableClasses;
8
8
  static getConvertToClasses(className: string, availableTypes?: Array<string>, includeCurrent?: boolean): Array<string>;
9
- static convertObject(obj: Question, convertToClass: string, defaultObjJSON?: any, defaultJSON?: any): Question;
9
+ static getObjJSON(obj: Question, defaultObjJSON: any): any;
10
+ static convertObject(obj: Question, convertToClass: string, objJSON: any, defaultJSON?: any): Question;
10
11
  private static updateJSON;
11
12
  private static updateJSONForMatrices;
12
13
  private static getColumnName;
@@ -35,6 +35,7 @@ export declare class SurveyHelper {
35
35
  static warnNonSupported(name: string, newPropertyName?: string): void;
36
36
  static warnText(text: string): void;
37
37
  private static deleteConditionProperties;
38
+ private static deleteRandomProperties;
38
39
  static updateQuestionJson(questionJson: any): void;
39
40
  private static deleteConditionPropertiesFromArray;
40
41
  static convertMatrixRowsToText(rows: any): string;