survey-creator-core 1.9.110 → 1.9.112

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 (126) hide show
  1. package/fonts.fontless.css +1 -1
  2. package/fonts.fontless.min.css +1 -1
  3. package/i18n/arabic.js +1717 -0
  4. package/i18n/arabic.js.map +1 -0
  5. package/i18n/arabic.min.js +7 -0
  6. package/i18n/bulgarian.js +1354 -0
  7. package/i18n/bulgarian.js.map +1 -0
  8. package/i18n/bulgarian.min.js +7 -0
  9. package/i18n/croatian.js +1801 -0
  10. package/i18n/croatian.js.map +1 -0
  11. package/i18n/croatian.min.js +7 -0
  12. package/i18n/czech.js +1356 -0
  13. package/i18n/czech.js.map +1 -0
  14. package/i18n/czech.min.js +7 -0
  15. package/i18n/danish.js +1992 -0
  16. package/i18n/danish.js.map +1 -0
  17. package/i18n/danish.min.js +7 -0
  18. package/i18n/dutch.js +1787 -0
  19. package/i18n/dutch.js.map +1 -0
  20. package/i18n/dutch.min.js +7 -0
  21. package/i18n/english.js +1244 -0
  22. package/i18n/english.js.map +1 -0
  23. package/i18n/english.min.js +7 -0
  24. package/i18n/finnish.js +1807 -0
  25. package/i18n/finnish.js.map +1 -0
  26. package/i18n/finnish.min.js +7 -0
  27. package/i18n/french.js +1864 -0
  28. package/i18n/french.js.map +1 -0
  29. package/i18n/french.min.js +7 -0
  30. package/i18n/german.js +1527 -0
  31. package/i18n/german.js.map +1 -0
  32. package/i18n/german.min.js +7 -0
  33. package/i18n/hungarian.js +1961 -0
  34. package/i18n/hungarian.js.map +1 -0
  35. package/i18n/hungarian.min.js +7 -0
  36. package/i18n/index.js +45735 -0
  37. package/i18n/index.js.map +1 -0
  38. package/i18n/index.min.js +7 -0
  39. package/i18n/indonesian.js +1961 -0
  40. package/i18n/indonesian.js.map +1 -0
  41. package/i18n/indonesian.min.js +7 -0
  42. package/i18n/italian.js +1549 -0
  43. package/i18n/italian.js.map +1 -0
  44. package/i18n/italian.min.js +7 -0
  45. package/i18n/japanese.js +1806 -0
  46. package/i18n/japanese.js.map +1 -0
  47. package/i18n/japanese.min.js +7 -0
  48. package/i18n/korean.js +2011 -0
  49. package/i18n/korean.js.map +1 -0
  50. package/i18n/korean.min.js +7 -0
  51. package/i18n/malay.js +1760 -0
  52. package/i18n/malay.js.map +1 -0
  53. package/i18n/malay.min.js +7 -0
  54. package/i18n/mongolian.js +1448 -0
  55. package/i18n/mongolian.js.map +1 -0
  56. package/i18n/mongolian.min.js +7 -0
  57. package/i18n/norwegian.js +1811 -0
  58. package/i18n/norwegian.js.map +1 -0
  59. package/i18n/norwegian.min.js +7 -0
  60. package/i18n/persian.js +1746 -0
  61. package/i18n/persian.js.map +1 -0
  62. package/i18n/persian.min.js +7 -0
  63. package/i18n/polish.js +2079 -0
  64. package/i18n/polish.js.map +1 -0
  65. package/i18n/polish.min.js +7 -0
  66. package/i18n/portuguese.js +1457 -0
  67. package/i18n/portuguese.js.map +1 -0
  68. package/i18n/portuguese.min.js +7 -0
  69. package/i18n/russian.js +1868 -0
  70. package/i18n/russian.js.map +1 -0
  71. package/i18n/russian.min.js +7 -0
  72. package/i18n/simplified-chinese.js +1948 -0
  73. package/i18n/simplified-chinese.js.map +1 -0
  74. package/i18n/simplified-chinese.min.js +7 -0
  75. package/i18n/slovak.js +1760 -0
  76. package/i18n/slovak.js.map +1 -0
  77. package/i18n/slovak.min.js +7 -0
  78. package/i18n/spanish.js +1573 -0
  79. package/i18n/spanish.js.map +1 -0
  80. package/i18n/spanish.min.js +7 -0
  81. package/i18n/swedish.js +1985 -0
  82. package/i18n/swedish.js.map +1 -0
  83. package/i18n/swedish.min.js +7 -0
  84. package/i18n/tajik.js +1037 -0
  85. package/i18n/tajik.js.map +1 -0
  86. package/i18n/tajik.min.js +7 -0
  87. package/i18n/traditional-chinese.js +2084 -0
  88. package/i18n/traditional-chinese.js.map +1 -0
  89. package/i18n/traditional-chinese.min.js +7 -0
  90. package/i18n/turkish.js +1802 -0
  91. package/i18n/turkish.js.map +1 -0
  92. package/i18n/turkish.min.js +7 -0
  93. package/package.json +2 -2
  94. package/survey-creator-core.css +619 -582
  95. package/survey-creator-core.fontless.css +618 -581
  96. package/survey-creator-core.fontless.css.map +1 -1
  97. package/survey-creator-core.fontless.min.css +37 -37
  98. package/survey-creator-core.i18n.js +2566 -18
  99. package/survey-creator-core.i18n.js.map +1 -1
  100. package/survey-creator-core.i18n.min.js +2 -2
  101. package/survey-creator-core.js +1499 -370
  102. package/survey-creator-core.js.map +1 -1
  103. package/survey-creator-core.min.css +38 -38
  104. package/survey-creator-core.min.js +46 -46
  105. package/typings/components/tabs/designer-plugin.d.ts +1 -1
  106. package/typings/components/tabs/logic-actions-model.d.ts +9 -1
  107. package/typings/components/tabs/test-plugin.d.ts +2 -0
  108. package/typings/components/tabs/theme-builder.d.ts +33 -0
  109. package/typings/components/tabs/theme-plugin.d.ts +7 -0
  110. package/typings/components/tabs/themes.d.ts +1 -0
  111. package/typings/components/tabs/translation-plugin.d.ts +0 -1
  112. package/typings/components/tabs/translation-theme.d.ts +1 -0
  113. package/typings/components/tabs/translation.d.ts +36 -1
  114. package/typings/creator-base.d.ts +172 -110
  115. package/typings/creator-options.d.ts +14 -2
  116. package/typings/creator-settings.d.ts +13 -0
  117. package/typings/custom-questions/question-file.d.ts +5 -0
  118. package/typings/editorLocalization.d.ts +48 -0
  119. package/typings/localization/english.d.ts +48 -0
  120. package/typings/plugins/undo-redo/undo-redo-manager.d.ts +3 -0
  121. package/typings/property-grid/index.d.ts +1 -5
  122. package/typings/property-grid/matrices.d.ts +6 -3
  123. package/typings/questionconverter.d.ts +4 -3
  124. package/typings/survey-elements.d.ts +1 -0
  125. package/typings/survey-helper.d.ts +2 -1
  126. package/typings/toolbox.d.ts +2 -0
@@ -1,7 +1,7 @@
1
1
  import { Base, SurveyModel, Question, PageModel, IElement, JsonObjectProperty, ActionContainer, AdaptiveActionContainer, IAction, Action, IPanel, SurveyElement, ItemValue, QuestionSelectBase, LocalizableString, ILocalizableString, ILocalizableOwner, PopupBaseViewModel, EventBase, Event, MatrixDropdownColumn, ISurveyElement, ITheme } from "survey-core";
2
2
  import { ISurveyCreatorOptions, ICollectionItemAllowOperations } from "./creator-settings";
3
3
  import { DragDropChoices } from "survey-core";
4
- import { QuestionToolbox } from "./toolbox";
4
+ import { QuestionToolbox, QuestionToolboxItem } from "./toolbox";
5
5
  import { PropertyGridModel } from "./property-grid";
6
6
  import { ICreatorSelectionOwner } from "./selection-owner";
7
7
  import { SelectionHistory } from "./selection-history";
@@ -15,6 +15,7 @@ import { DragDropSurveyElements } from "./survey-elements";
15
15
  import { PageAdorner } from "./components/page";
16
16
  export interface IKeyboardShortcut {
17
17
  name?: string;
18
+ affectedTab?: string;
18
19
  hotKey: {
19
20
  ctrlKey?: boolean;
20
21
  keyCode: number;
@@ -71,23 +72,24 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
71
72
  * Specifies whether to display the Designer tab.
72
73
  *
73
74
  * Default value: `true`
75
+ * @see activeTab
76
+ * @see onDesignerSurveyCreated
74
77
  */
75
78
  showDesignerTab: boolean;
76
79
  /**
77
80
  * Specifies whether to display the JSON Editor tab.
78
81
  *
79
82
  * Default value: `true`
83
+ * @see activeTab
80
84
  */
81
85
  showJSONEditorTab: boolean;
82
- /**
83
- * Obsolete. Please use showPreviewTab property
84
- * @see showPreviewTab
85
- */
86
86
  showTestSurveyTab: boolean;
87
87
  /**
88
88
  * Specifies whether to display the Preview tab.
89
89
  *
90
90
  * Default value: `true`
91
+ * @see activeTab
92
+ * @see onPreviewSurveyCreated
91
93
  */
92
94
  get showPreviewTab(): boolean;
93
95
  set showPreviewTab(val: boolean);
@@ -95,36 +97,39 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
95
97
  * Specifies whether to display the Themes tab.
96
98
  *
97
99
  * Default value: `false`
100
+ * @see activeTab
101
+ * @see saveThemeFunc
98
102
  */
99
103
  showThemeTab: boolean;
100
104
  /**
101
105
  * Specifies whether to display the Translation tab.
102
106
  *
103
107
  * Default value: `false`
108
+ * @see activeTab
104
109
  */
105
110
  showTranslationTab: boolean;
106
111
  /**
107
112
  * Specifies whether to display the Logic tab.
108
113
  *
109
114
  * Default value: `false`
115
+ * @see activeTab
110
116
  */
111
117
  showLogicTab: boolean;
112
118
  useTableViewInLogicTab: boolean;
113
- /**
114
- * Set delay for page hover
115
- */
116
119
  pageHoverDelay: number;
117
120
  /**
118
- * You need to set this property to true if you want to inplace edit item values instead of texts.
121
+ * Allows users to edit choice values instead of choice texts on the design surface.
122
+ *
123
+ * Default value: `false` (users edit choice texts)
124
+ *
125
+ * If you enable this property, users cannot edit choice texts because the Property Grid hides the Text column for choices, rate values, columns and rows in [Single-Select Matrix](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-question-model), and rows in [Multi-Select Matrix](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-with-dropdown-list) questions.
126
+ * @see showObjectTitles
119
127
  */
120
128
  inplaceEditForValues: boolean;
121
- /**
122
- * Obsolete. Use the [`showSurveyTitle`](https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#showSurveyTitle) property instead.
123
- */
124
129
  get allowEditSurveyTitle(): boolean;
125
130
  set allowEditSurveyTitle(val: boolean);
126
131
  /**
127
- * Specifies whether users can see and edit the survey title and related survey properties.
132
+ * Specifies whether users can see and edit the survey header and related survey properties.
128
133
  *
129
134
  * Default value: `true`
130
135
  */
@@ -134,9 +139,11 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
134
139
  set haveCommercialLicense(val: boolean);
135
140
  get licenseText(): string;
136
141
  /**
137
- * Specifies whether to call the [saveSurveyFunc](https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#saveSurveyFunc) each time survey settings are changed.
142
+ * Specifies whether to automatically save a survey or theme JSON schema each time survey or theme settings are changed.
138
143
  *
139
144
  * Default value: `false`
145
+ *
146
+ * If you enable this property, Survey Creator calls the [`saveSurveyFunc`](#saveSurveyFunc) or [`saveThemeFunc`](#saveThemeFunc) function to save the survey or theme JSON schema. The schemas are saved with a 500-millisecond delay after users change settings. You can specify the [`autoSaveDelay`](#autoSaveDelay) property to increase or descrease the delay.
140
147
  */
141
148
  isAutoSave: boolean;
142
149
  showOptions: boolean;
@@ -162,7 +169,19 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
162
169
  private changePageModifications;
163
170
  private pageEditModeValue;
164
171
  /**
165
- * Contains the value of the [`pageEditMode`](https://surveyjs.io/Documentation/Survey-Creator?id=ICreatorOptions#pageEditMode) property specified in the constructor.
172
+ * Specifies how Survey Creator users edit survey pages.
173
+ *
174
+ * Accepted values:
175
+ *
176
+ * - `"standard"` (default)
177
+ * Questions and panels are divided between pages. Users can scroll the design surface to reach a required page.
178
+ *
179
+ * - `"single"`
180
+ * All questions and panels belong to a single page. Users cannot add or remove pages.
181
+ *
182
+ * - `"bypage"`
183
+ * Questions and panels are divided between pages. Users can use the page navigator to switch to a required page.
184
+ * @see allowModifyPages
166
185
  */
167
186
  get pageEditMode(): "standard" | "single" | "bypage";
168
187
  set pageEditMode(val: "standard" | "single" | "bypage");
@@ -179,16 +198,6 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
179
198
  private saveSurveyFuncValue;
180
199
  private saveThemeFuncValue;
181
200
  viewType: string;
182
- /**
183
- * Returns the current show view name. The possible returns values are:
184
- * "designer", "editor", "test", "embed", "logic" and "translation".
185
- * @see showDesigner
186
- * @see showPreview
187
- * @see showJsonEditor
188
- * @see showLogicEditor
189
- * @see showTranslationEditor
190
- * @see showEmbedEditor
191
- */
192
201
  get showingViewName(): string;
193
202
  get isDesignerShowing(): boolean;
194
203
  showDesigner(): void;
@@ -504,7 +513,6 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
504
513
  * - `options.questionName`: `String`\
505
514
  * The name of a question for which conditions are displayed.
506
515
  * - `options.questionName`: `String`\
507
- * The type of a question for which conditions are displayed.
508
516
  * The name of a question for which conditions are displayed.
509
517
  * - `options.operator`: `"empty"` | `"notempty"` | `"equal"` | `"notequal"` | `"contains"` | `"notcontains"` | `"anyof"` | `"allof"` | `"greater"` | `"less"` | `"greaterorequal"` | `"lessorequal"`\
510
518
  * A condition opeator for which the event is raised.
@@ -584,24 +592,50 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
584
592
  */
585
593
  onModified: CreatorEvent;
586
594
  /**
587
- * 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.
588
- *- sender the survey creator object that fires the event
589
- *- options.question a new added survey question. Survey.Question object
590
- *- options.page the survey Page object where question has been added.
591
- *- options.reason how question has been added via UI: ADDED_FROM_TOOLBOX, ADDED_FROM_PAGEBUTTON, ELEMENT_COPIED.
595
+ * An event that is raised when users add a question to the survey. Use this event to customize the question.
596
+ *
597
+ * Parameters:
598
+ *
599
+ * - `sender`: `CreatorBase`\
600
+ * A Survey Creator instance that raised the event.
601
+ * - `options.question`: [`Question`](https://surveyjs.io/form-library/documentation/api-reference/question)\
602
+ * The question users added.
603
+ * - `options.page`: [`PageModel`](https://surveyjs.io/form-library/documentation/api-reference/page-model)\
604
+ * A page to which the question was added.
605
+ * - `options.reason`: `"DROPPED_FROM_TOOLBOX"` | `"ADDED_FROM_PAGEBUTTON"` | `"ELEMENT_COPIED"`\
606
+ * A value that indicates how the question was added: dragged from the [Toolbox](https://surveyjs.io/survey-creator/documentation/toolbox-customization), created using the Add Question button, or duplicated.
607
+ *
608
+ * [Customize Survey Elements on Creation](https://surveyjs.io/survey-creator/documentation/customize-survey-creation-process#customize-survey-elements-on-creation (linkStyle))
592
609
  */
593
610
  onQuestionAdded: CreatorEvent;
594
611
  /**
595
- * 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.
596
- *- sender the survey creator object that fires the event
597
- *- options.panel a new added survey panel. Survey.Panel object
598
- *- options.page the survey Page object where question has been added.
612
+ * An event that is raised when users add a [Panel](https://surveyjs.io/form-library/documentation/api-reference/panel-model) element to the survey. Use this event to customize the panel.
613
+ *
614
+ * Parameters:
615
+ *
616
+ * - `sender`: `CreatorBase`\
617
+ * A Survey Creator instance that raised the event.
618
+ * - `options.panel`: [`PanelModel`](https://surveyjs.io/form-library/documentation/api-reference/panel-model)\
619
+ * The panel users added.
620
+ * - `options.page`: [`PageModel`](https://surveyjs.io/form-library/documentation/api-reference/page-model)\
621
+ * A page to which the panel was added.
622
+ * - `options.reason`: `"DROPPED_FROM_TOOLBOX"` | `"ADDED_FROM_PAGEBUTTON"` | `"ELEMENT_COPIED"`\
623
+ * A value that indicates how the panel was added: dragged from the [Toolbox](https://surveyjs.io/survey-creator/documentation/toolbox-customization), created using the Add Question button, or duplicated.
624
+ *
625
+ * [Customize Survey Elements on Creation](https://surveyjs.io/survey-creator/documentation/customize-survey-creation-process#customize-survey-elements-on-creation (linkStyle))
599
626
  */
600
627
  onPanelAdded: CreatorEvent;
601
628
  /**
602
- * The event is called on adding a new page into the survey.
603
- *- sender the survey creator object that fires the event
604
- *- options.page the new survey Page object.
629
+ * An event that is raised when a new page is added to the survey. Use this event to customize the page.
630
+ *
631
+ * Parameters:
632
+ *
633
+ * - `sender`: `CreatorBase`\
634
+ * A Survey Creator instance that raised the event.
635
+ * - `options.page`: [`PageModel`](https://surveyjs.io/form-library/documentation/api-reference/page-model)\
636
+ * The page users added.
637
+ *
638
+ * [Customize Survey Elements on Creation](https://surveyjs.io/survey-creator/documentation/customize-survey-creation-process#customize-survey-elements-on-creation (linkStyle))
605
639
  */
606
640
  onPageAdded: CreatorEvent;
607
641
  /**
@@ -620,21 +654,35 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
620
654
  */
621
655
  onGetPageActions: CreatorEvent;
622
656
  /**
623
- * The event is fired when the survey creator is initialized and a survey object (Survey.Survey) is created.
624
- *- sender the survey creator object that fires the event
625
- *- options.survey the survey object showing in the creator.
657
+ * An event that is raised when Survey Creator instantiates a survey for the [Designer](https://surveyjs.io/survey-creator/documentation/end-user-guide#designer-tab) tab. Use this event to customize the survey.
658
+ *
659
+ * Parameters:
660
+ *
661
+ * - `sender`: `CreatorBase`\
662
+ * A Survey Creator instance that raised the event.
663
+ * - `options.survey`: [`SurveyModel`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model)\
664
+ * A survey to be displayed in the Designer tab.
665
+ *
666
+ * [Design Mode Survey Instance](https://surveyjs.io/survey-creator/documentation/customize-survey-creation-process#design-mode-survey-instance (linkStyle))
667
+ *
668
+ * > If you want this event raised at startup, assign a survey JSON schema to the [`JSON`](#JSON) property *after* you add a handler to the event. If the JSON schema should be empty, specify the `JSON` property with an empty object.
626
669
  */
627
670
  onDesignerSurveyCreated: CreatorEvent;
628
671
  /**
629
- * The event is fired when the survey creator creates survey in Preview tab for testing.
630
- *- sender the survey creator object that fires the event
631
- *- options.survey the survey object showing in the "Preview" tab.
672
+ * An event that is raised when Survey Creator instantiates a survey for the [Preview](https://surveyjs.io/survey-creator/documentation/end-user-guide#preview-tab) tab. Use this event to customize the survey.
673
+ *
674
+ * Parameters:
675
+ *
676
+ * - `sender`: `CreatorBase`\
677
+ * A Survey Creator instance that raised the event.
678
+ * - `options.survey`: [`SurveyModel`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model)\
679
+ * A survey to be displayed in the Preview tab.
680
+ *
681
+ * [Preview Mode Survey Instance](https://surveyjs.io/survey-creator/documentation/customize-survey-creation-process#preview-mode-survey-instance (linkStyle))
682
+ *
683
+ * > If you want this event raised at startup, assign a survey JSON schema to the [`JSON`](#JSON) property *after* you add a handler to the event. If the JSON schema should be empty, specify the `JSON` property with an empty object.
632
684
  */
633
685
  onPreviewSurveyCreated: CreatorEvent;
634
- /**
635
- * Obsolete. Please use onPreviewSurveyCreated event.
636
- * @see onPreviewSurveyCreated
637
- */
638
686
  onTestSurveyCreated: CreatorEvent;
639
687
  /**
640
688
  * The event is called in case of UI notifications. By default all notifications are done via built-in alert () function.
@@ -723,6 +771,27 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
723
771
  * - `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.
724
772
  */
725
773
  onTranslationExportItem: CreatorEvent;
774
+ /**
775
+ * An event that allows you to integrate a machine translation service, such as Google Translate or Microsoft Translator, into Survey Creator.
776
+ *
777
+ * Within the event handler, you need to pass translation strings and locale information to the translation service API. The service should return an array of translated strings that you need to pass to the `options.callback` function. If the translation failed, pass an empty array or call this function without arguments.
778
+ *
779
+ * Parameters:
780
+ *
781
+ * - `sender`: `CreatorBase`\
782
+ * A Survey Creator instance that raised the event.
783
+ * - `options.fromLocale`: `string`\
784
+ * A locale from which you want to translate strings. Contains a locale identifier (`"en"`, `"de"`, etc.).
785
+ * - `options.toLocale`: `string`\
786
+ * A locale to which you want to translate strings. Contains a locale identifier (`"en"`, `"de"`, etc.).
787
+ * - `options.strings`: `Array<string>`\
788
+ * Strings to translate.
789
+ * - `options.callback: (strings: Array<string>)`: `Function`\
790
+ * A callback function that accepts translated strings. If the translation failed, pass an empty array or call this function without arguments.
791
+ *
792
+ * > Survey Creator does not include a machine translation service out of the box. Our component only provides a UI for calling the service API.
793
+ */
794
+ onMachineTranslate: CreatorEvent;
726
795
  /**
727
796
  * An event that is raised before a string translation is changed. Use this event to override a new translation value.
728
797
  *
@@ -818,6 +887,12 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
818
887
  * Default value: 0 (unlimited, taken from `settings.propertyGrid.maximumChoicesCount`)
819
888
  */
820
889
  maximumChoicesCount: number;
890
+ /**
891
+ * Limits the minimum number of choices in [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. Set this property if users should not delete choices below the specified limit.
892
+ *
893
+ * Default value: 0 (unlimited, taken from `settings.propertyGrid.minimumChoicesCount`)
894
+ */
895
+ minimumChoicesCount: number;
821
896
  /**
822
897
  * 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.
823
898
  *
@@ -825,28 +900,28 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
825
900
  */
826
901
  maximumRowsCount: number;
827
902
  /**
828
- * Limits the number of rate value that users can add to [Rating](https://surveyjs.io/Documentation/Library?id=questionratingmodel) questions.
903
+ * Limits the number of rate values that users can add to [Rating](https://surveyjs.io/Documentation/Library?id=questionratingmodel) questions.
829
904
  *
830
905
  * Default value: 0 (unlimited, taken from `settings.propertyGrid.maximumRateValues`)
831
906
  */
832
907
  maximumRateValues: number;
833
908
  /**
834
- * Obsolete. Use the [`showPagesInPreviewTab`](https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#showPagesInPreviewTab) property instead.
909
+ * Limits the number of nested panels within a [Panel](/form-library/documentation/api-reference/panel-model) element.
910
+ *
911
+ * Default value: -1 (unlimited)
835
912
  */
913
+ maxNestedPanels: number;
836
914
  showPagesInTestSurveyTab: boolean;
837
915
  /**
838
- * Specifies whether to show the page selector at the bottom of the Preview tab.
916
+ * Specifies whether to show a page selector at the bottom of the Preview tab.
839
917
  *
840
918
  * Default value: `true`
841
919
  */
842
920
  get showPagesInPreviewTab(): boolean;
843
921
  set showPagesInPreviewTab(val: boolean);
844
- /**
845
- * Obsolete. Use the [`showSimulatorInPreviewTab`](https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#showSimulatorInPreviewTab) property instead.
846
- */
847
922
  showSimulatorInTestSurveyTab: boolean;
848
923
  /**
849
- * Specifies whether the Preview tab displays the Device button that allows users to preview the survey on different device types.
924
+ * Specifies whether the Preview tab displays a Device button that allows users to preview the survey on different device types.
850
925
  *
851
926
  * Default value: `true`
852
927
  */
@@ -858,6 +933,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
858
933
  * Accepted values: `"modern"`, `"default"`, `"defaultV2"`
859
934
  *
860
935
  * Default value: `"defaultV2"`
936
+ * @see allowChangeThemeInPreview
861
937
  */
862
938
  themeForPreview: string;
863
939
  hasPendingThemeChanges: boolean;
@@ -865,21 +941,20 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
865
941
  private _theme;
866
942
  get theme(): ITheme;
867
943
  set theme(newTheme: ITheme);
944
+ getCurrentTheme(content?: "full" | "changes"): ITheme;
868
945
  raiseThemeChanged(): void;
869
946
  private _allowModifyPages;
870
947
  /**
871
948
  * Specifies whether users can add, edit, and delete survey pages.
872
949
  *
873
950
  * Default value: `true`
951
+ * @see pageEditMode
874
952
  */
875
953
  get allowModifyPages(): boolean;
876
954
  set allowModifyPages(val: boolean);
877
- /**
878
- * Obsolete. Use the [`showDefaultLanguageInPreviewTab`](https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#showDefaultLanguageInPreviewTab) property instead.
879
- */
880
955
  showDefaultLanguageInTestSurveyTab: boolean | string;
881
956
  /**
882
- * Specifies whether the Preview tab displays the language selector.
957
+ * Specifies whether the Preview tab displays a language selector.
883
958
  *
884
959
  * Accepted values:
885
960
  *
@@ -887,7 +962,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
887
962
  * Display the language selector only if the survey is translated into more than one language.
888
963
  *
889
964
  * - `true`
890
- * Always display the language selector regardless of how many languages are used in the survey.
965
+ * Always display the language selector regardless of how many languages the survey uses.
891
966
  *
892
967
  * - `false`
893
968
  * Never display the language selector.
@@ -895,16 +970,13 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
895
970
  * - `"all"`
896
971
  * Always display the language selector with [all supported languages](https://github.com/surveyjs/survey-creator/tree/master/packages/survey-creator-core/src/localization).
897
972
  *
898
- * **See also**: [Localization & Globalization](https://surveyjs.io/Documentation/Survey-Creator?id=localization)
973
+ * [Localization & Globalization](https://surveyjs.io/survey-creator/documentation/survey-localization-translate-surveys-to-different-languages (linkStyle))
899
974
  */
900
975
  get showDefaultLanguageInPreviewTab(): boolean | string;
901
976
  set showDefaultLanguageInPreviewTab(val: boolean | string);
902
- /**
903
- * Obsolete. Use the [`showInvisibleElementsInPreviewTab`](https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#showInvisibleElementsInPreviewTab) property instead.
904
- */
905
977
  showInvisibleElementsInTestSurveyTab: boolean;
906
978
  /**
907
- * Specifies whether the Preview tab displays a checkbox that allows users to show or hide invisible survey elements.
979
+ * Specifies whether the Preview tab displays a toggle that allows users to show or hide invisible survey elements.
908
980
  *
909
981
  * Default value: `true`
910
982
  */
@@ -920,6 +992,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
920
992
  * Default value: `true`
921
993
  *
922
994
  * [View Demo](https://surveyjs.io/Examples/Creator?id=theme-switcher (linkStyle))
995
+ * @see themeForPreview
923
996
  */
924
997
  allowChangeThemeInPreview: boolean;
925
998
  tabbedMenu: AdaptiveActionContainer<TabbedMenuItem>;
@@ -966,10 +1039,11 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
966
1039
  *
967
1040
  * - `sender`: `CreatorBase`\
968
1041
  * A Survey Creator instance that raised the event.
969
- * - `options.tabName`: `"designer"` | `"test"` | `"theme"` | `"editor"` | `"embed"` | `"logic"` | `"translation"`\
1042
+ * - `options.tabName`: `"designer"` | `"test"` | `"theme"` | `"editor"` | `"logic"` | `"translation"`\
970
1043
  * A tab that is going to become active.
971
1044
  * - `options.allow`: `Boolean`\
972
1045
  * Specifies whether the active tab can be switched. Set this property to `false` if you want to cancel the switch.
1046
+ * @see makeNewViewActive
973
1047
  */
974
1048
  onActiveTabChanging: CreatorEvent;
975
1049
  /**
@@ -979,22 +1053,32 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
979
1053
  *
980
1054
  * - `sender`: `CreatorBase`\
981
1055
  * A Survey Creator instance that raised the event.
982
- * - `options.tabName`: `"designer"` | `"test"` | `"theme"` | `"editor"` | `"embed"` | `"logic"` | `"translation"`\
1056
+ * - `options.tabName`: `"designer"` | `"test"` | `"theme"` | `"editor"` | `"logic"` | `"translation"`\
983
1057
  * A tab that has become active.
1058
+ * @see makeNewViewActive
984
1059
  */
985
1060
  onActiveTabChanged: CreatorEvent;
986
1061
  /**
987
- * Get/set the active tab.
988
- * The following values are available: "designer", "editor", "test", "embed", "logic" and "translation".
989
- * Please note, not all tabs are visible.
1062
+ * Gets or sets the currently displayed tab.
1063
+ *
1064
+ * Possible values:
1065
+ *
1066
+ * - [`"designer"`](#showDesignerTab)
1067
+ * - [`"test"`](#showPreviewTab)
1068
+ * - [`"theme"`](#showThemeTab)
1069
+ * - [`"editor"`](#showJSONEditorTab)
1070
+ * - [`"logic"`](#showLogicTab)
1071
+ * - [`"translation"`](#showLogicTab)
1072
+ * @see makeNewViewActive
990
1073
  */
991
1074
  get activeTab(): string;
992
1075
  set activeTab(val: string);
993
1076
  /**
994
- * Change the active view/tab. It will return false if it can't change the current tab.
995
- * @param viewName name of new active view (tab). The following values are available: "designer", "editor", "test", "embed", "logic" and "translation".
1077
+ * Switches the [active tab](#activeTab). Returns `false` if the tab cannot be switched.
1078
+ * @param tabName A tab that you want to make active: `"designer"`, `"test"`, `"theme"`, `"editor"`, `"logic"`, or `"translation"`.
1079
+ * @returns `false` if the active tab cannot be switched, `true` otherwise.
996
1080
  */
997
- makeNewViewActive(viewName: string): boolean;
1081
+ makeNewViewActive(tabName: string): boolean;
998
1082
  private switchViewType;
999
1083
  private canSwitchViewType;
1000
1084
  private activatePlugin;
@@ -1266,57 +1350,30 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
1266
1350
  protected get designerPropertyGrid(): PropertyGridModel;
1267
1351
  get propertyGrid(): SurveyModel;
1268
1352
  /**
1269
- * Collapse certain property editor tab (category) in properties panel/grid
1270
- * name - tab category name
1271
- * @see collapseAllPropertyGridCategories
1353
+ * Collapses a specified category in Property Grid.
1354
+ * @param name A [category name](https://surveyjs.io/survey-creator/documentation/property-grid-customization#category).
1272
1355
  * @see expandPropertyGridCategory
1273
- * @see expandAllPropertyGridCategories
1274
1356
  */
1275
1357
  collapsePropertyGridCategory(name: string): void;
1276
1358
  /**
1277
- * Expand certain property editor tab (category) in properties panel/grid
1278
- * name - tab category name
1359
+ * Expands a specified category in Property Grid.
1360
+ * @param name A [category name](https://surveyjs.io/survey-creator/documentation/property-grid-customization#category).
1279
1361
  * @see collapsePropertyGridCategory
1280
- * @see collapseAllPropertyGridCategories
1281
- * @see expandAllPropertyGridCategories
1282
1362
  */
1283
1363
  expandPropertyGridCategory(name: string): void;
1284
1364
  /**
1285
- * Expand all property editor tabs (categories) in properties panel/grid
1286
- * @see collapsePropertyGridCategory
1287
- * @see expandPropertyGridCategory
1365
+ * Collapses all categories in Property Grid.
1288
1366
  * @see expandAllPropertyGridCategories
1289
1367
  */
1290
1368
  collapseAllPropertyGridCategories(): void;
1291
1369
  /**
1292
- * Expand all property editor tabs (categories) in properties panel/grid
1293
- * @see collapsePropertyGridCategory
1370
+ * Expands all categories in Property Grid.
1294
1371
  * @see collapseAllPropertyGridCategories
1295
- * @see expandPropertyGridCategory
1296
1372
  */
1297
1373
  expandAllPropertyGridCategories(): void;
1298
- /**
1299
- * @Deprecated Obsolete. Collapse all property editor tabs (categories) in properties panel/grid
1300
- * @see collapseAllPropertyGridCategories
1301
- *
1302
- */
1303
1374
  collapseAllPropertyTabs(): void;
1304
- /**
1305
- * @Deprecated Obsolete. Expand all property editor tabs (categories) in properties panel/grid
1306
- * @see expandAllPropertyGridCategories
1307
- */
1308
1375
  expandAllPropertyTabs(): void;
1309
- /**
1310
- * @Deprecated Obsolete. Expand certain property editor tab (category) in properties panel/grid
1311
- * name - tab category name
1312
- * @see expandPropertyGridCategory
1313
- */
1314
1376
  expandPropertyTab(name: string): void;
1315
- /**
1316
- * @Deprecated Obsolete. Collapse certain property editor tab (category) in properties panel/grid
1317
- * name - tab category name
1318
- * @see collapsePropertyGridCategory
1319
- */
1320
1377
  collapsePropertyTab(name: string): void;
1321
1378
  /**
1322
1379
  * Check for errors in property grid and adorners of the selected elements.
@@ -1386,10 +1443,14 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
1386
1443
  onLogicGetTitleCallback(expression: string, expressionText: string, text: string, logicItem: any): string;
1387
1444
  getProcessedTranslationItemText(locale: string, locString: ILocalizableString, newText: string, obj: any): string;
1388
1445
  getTranslationExportedText(obj: Base, name: string, locString: ILocalizableString, locale: string, text: string): string;
1446
+ getHasMachineTranslation(): boolean;
1447
+ doMachineTranslation(fromLocale: string, toLocale: string, strings: Array<string>, callback: (translated: Array<string>) => void): void;
1389
1448
  /**
1390
- * The delay on saving survey JSON on autoSave in ms. It is 500 ms by default.
1391
- * 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.
1392
- * @see isAutoSave
1449
+ * A delay between changing survey or theme settings and saving the survey or theme JSON schema, measured in milliseconds. Applies only when the [`isAutoSave`](#isAutoSave) property is `true`.
1450
+ *
1451
+ * Default value: 500 (taken from `settings.autoSave.delay`)
1452
+ *
1453
+ * If a user changes the settings once again during the delay, only the latest version will be saved.
1393
1454
  */
1394
1455
  autoSaveDelay: number;
1395
1456
  private autoSaveTimerId;
@@ -1422,7 +1483,8 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
1422
1483
  convertCurrentQuestion(newType: string): void;
1423
1484
  getAddNewQuestionText(currentAddQuestionType?: string): any;
1424
1485
  get addNewQuestionText(): any;
1425
- getQuestionTypeSelectorModel(beforeAdd: (type: string) => void, panel?: IPanel): any;
1486
+ getAvailableToolboxItems(element?: SurveyElement, isAddNew?: boolean): Array<QuestionToolboxItem>;
1487
+ getQuestionTypeSelectorModel(beforeAdd: (type: string) => void, element?: SurveyElement): any;
1426
1488
  getUpdatedPageAdornerFooterActions(pageAdorner: PageAdorner, actions: Array<IAction>): IAction[];
1427
1489
  addNewQuestionInPage(beforeAdd: (string: any) => void, panel?: IPanel, type?: string): void;
1428
1490
  createIActionBarItemByClass(className: string, title: string, iconName: string, needSeparator: boolean): Action;
@@ -176,6 +176,12 @@ export interface ICreatorOptions {
176
176
  * Default value: 0 (unlimited, taken from `settings.propertyGrid.maximumColumnsCount`)
177
177
  */
178
178
  maximumColumnsCount?: number;
179
+ /**
180
+ * Limits the minimum number of choices in [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. Set this property if users should not delete choices below the specified limit.
181
+ *
182
+ * Default value: 0 (unlimited, taken from `settings.propertyGrid.minimumChoicesCount`)
183
+ */
184
+ minimumChoicesCount?: number;
179
185
  /**
180
186
  * 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.
181
187
  *
@@ -189,7 +195,7 @@ export interface ICreatorOptions {
189
195
  */
190
196
  maximumRowsCount?: number;
191
197
  /**
192
- * Limits the number of rate value that users can add to [Rating](https://surveyjs.io/Documentation/Library?id=questionratingmodel) questions.
198
+ * Limits the number of rate values that users can add to [Rating](https://surveyjs.io/Documentation/Library?id=questionratingmodel) questions.
193
199
  *
194
200
  * Default value: 0 (unlimited, taken from `settings.propertyGrid.maximumRateValues`)
195
201
  */
@@ -200,6 +206,12 @@ export interface ICreatorOptions {
200
206
  * Default value: -1 (unlimited)
201
207
  */
202
208
  maxLogicItemsInCondition?: number;
209
+ /**
210
+ * Limits the number of nested panels within a [Panel](/form-library/documentation/api-reference/panel-model) element.
211
+ *
212
+ * Default value: -1 (unlimited)
213
+ */
214
+ maxNestedPanels?: number;
203
215
  /**
204
216
  * Specifies whether users can switch between UI themes in the Preview tab.
205
217
  *
@@ -217,7 +229,7 @@ export interface ICreatorOptions {
217
229
  */
218
230
  previewOrientation?: "landscape" | "portrait";
219
231
  /**
220
- * Limits question and panels types available in the Toolbox and Add Question menu.
232
+ * Limits question and panel types available in the Toolbox and Add Question menu.
221
233
  *
222
234
  * 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.
223
235
  */
@@ -22,6 +22,7 @@ export declare var settings: {
22
22
  theme: {
23
23
  exportFileName: string;
24
24
  fontFamily: string;
25
+ allowEditHeaderSettings: boolean;
25
26
  };
26
27
  operators: {
27
28
  empty: any[];
@@ -77,6 +78,7 @@ export declare var settings: {
77
78
  maxCharsInButtonGroup: number;
78
79
  showNavigationButtons: boolean;
79
80
  maximumColumnsCount: number;
81
+ minimumChoicesCount: number;
80
82
  maximumChoicesCount: number;
81
83
  maximumRowsCount: number;
82
84
  maximumRateValues: number;
@@ -162,10 +164,13 @@ export interface ISurveyCreatorOptions {
162
164
  showObjectTitles: boolean;
163
165
  allowEditExpressionsInTextEditor: boolean;
164
166
  maximumColumnsCount: number;
167
+ minimumChoicesCount: number;
165
168
  maximumChoicesCount: number;
166
169
  maximumRowsCount: number;
167
170
  maximumRateValues: number;
171
+ maxNestedPanels: number;
168
172
  enableLinkFileEditor: boolean;
173
+ inplaceEditForValues: boolean;
169
174
  rootElement?: HTMLElement;
170
175
  getObjectDisplayName(obj: Base, area: string, reason: string, displayName: string): string;
171
176
  onCanShowPropertyCallback(object: any, property: JsonObjectProperty, showMode: string, parentObj: any, parentProperty: JsonObjectProperty): boolean;
@@ -193,6 +198,8 @@ export interface ISurveyCreatorOptions {
193
198
  getProcessedTranslationItemText(locale: string, locString: ILocalizableString, newText: string, obj: any): string;
194
199
  getTranslationExportedText(obj: Base, name: string, locString: ILocalizableString, locale: string, text: string): string;
195
200
  uploadFiles(files: File[], question: Question, uploadingCallback: (status: string, data: any) => any): void;
201
+ getHasMachineTranslation(): boolean;
202
+ doMachineTranslation(fromLocale: string, toLocale: string, strings: Array<string>, callback: (translated: Array<string>) => void): void;
196
203
  }
197
204
  export declare class EmptySurveyCreatorOptions implements ISurveyCreatorOptions {
198
205
  rootElement: HTMLElement;
@@ -206,9 +213,13 @@ export declare class EmptySurveyCreatorOptions implements ISurveyCreatorOptions
206
213
  showObjectTitles: boolean;
207
214
  allowEditExpressionsInTextEditor: boolean;
208
215
  maximumColumnsCount: number;
216
+ minimumChoicesCount: number;
209
217
  maximumChoicesCount: number;
210
218
  maximumRowsCount: number;
211
219
  maximumRateValues: number;
220
+ machineTranslationValue: boolean;
221
+ inplaceEditForValues: boolean;
222
+ maxNestedPanels: number;
212
223
  getObjectDisplayName(obj: Base, area: string, reason: string, displayName: string): string;
213
224
  onCanShowPropertyCallback(object: any, property: JsonObjectProperty, showMode: string, parentObj: any, parentProperty: JsonObjectProperty): boolean;
214
225
  onPropertyGridSurveyCreatedCallback(object: any, survey: SurveyModel): void;
@@ -234,4 +245,6 @@ export declare class EmptySurveyCreatorOptions implements ISurveyCreatorOptions
234
245
  onLogicGetTitleCallback(expression: string, displayExpression: string, text: string, logicItem: any): string;
235
246
  getTranslationExportedText(obj: Base, name: string, locString: ILocalizableString, locale: string, text: string): string;
236
247
  uploadFiles(files: File[], question: Question, uploadingCallback: (status: string, data: any) => any): void;
248
+ getHasMachineTranslation(): boolean;
249
+ doMachineTranslation(fromLocale: string, toLocale: string, strings: Array<string>, callback: (translated: Array<string>) => void): void;
237
250
  }