survey-creator-core 1.9.39 → 1.9.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/survey-creator-core.css +103 -77
- package/survey-creator-core.d.ts +88 -34
- package/survey-creator-core.i18n.js +3 -3
- package/survey-creator-core.i18n.min.js +2 -2
- package/survey-creator-core.js +549 -365
- package/survey-creator-core.min.css +11 -11
- package/survey-creator-core.min.js +2 -2
package/survey-creator-core.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Type definition for Survey Creatorlibrary. Platform independent (core) v1.9.
|
|
2
|
+
* Type definition for Survey Creatorlibrary. Platform independent (core) v1.9.42
|
|
3
3
|
* Copyright (c) 2015-2022 Devsoft Baltic OÜ - https://surveyjs.io/
|
|
4
4
|
* License: https://surveyjs.io/Licenses#SurveyCreator
|
|
5
5
|
*/
|
|
@@ -62,6 +62,7 @@ export interface ISurveyCreatorOptions {
|
|
|
62
62
|
createSurvey(json: any, reason: string, surveyType?: any): any;
|
|
63
63
|
onConditionQuestionsGetListCallback(propertyName: string, obj: Base, editor: any, list: any): any;
|
|
64
64
|
onConditionGetTitleCallback(expression: string, title: string): string;
|
|
65
|
+
onLogicGetTitleCallback(expression: string, displayExpression: string, text: string, logicItem: any): string;
|
|
65
66
|
}
|
|
66
67
|
/*
|
|
67
68
|
* Survey Creator configuration. Pass it as an argument to the `SurveyCreator` constructor:
|
|
@@ -192,13 +193,13 @@ export interface ICreatorOptions {
|
|
|
192
193
|
*
|
|
193
194
|
* Accepted values:
|
|
194
195
|
*
|
|
195
|
-
* - `"auto"` (default)
|
|
196
|
-
* Display the language selector only if the survey is translated
|
|
196
|
+
* - `"auto"` (default)
|
|
197
|
+
* Display the language selector only if the survey is translated into more than one language.
|
|
197
198
|
*
|
|
198
|
-
* - `true`
|
|
199
|
+
* - `true`
|
|
199
200
|
* Always display the language selector regardless of how many languages are used in the survey.
|
|
200
|
-
*
|
|
201
|
-
* - `false`
|
|
201
|
+
*
|
|
202
|
+
* - `false`
|
|
202
203
|
* Never display the language selector.
|
|
203
204
|
*
|
|
204
205
|
* - `"all"`
|
|
@@ -220,6 +221,14 @@ export interface ICreatorOptions {
|
|
|
220
221
|
*/
|
|
221
222
|
showObjectTitles?: boolean;
|
|
222
223
|
/*
|
|
224
|
+
* Limits the number of visible choices. Users can click "Show more" to view hidden choices.
|
|
225
|
+
*
|
|
226
|
+
* Set this property to -1 if you do not want any choices to hide.
|
|
227
|
+
*
|
|
228
|
+
* Default value: 10
|
|
229
|
+
*/
|
|
230
|
+
maxVisibleChoices?: number;
|
|
231
|
+
/*
|
|
223
232
|
* Specifies whether the design surface displays the survey title and description when the survey does not contain any elements.
|
|
224
233
|
*
|
|
225
234
|
* Default value: `false`
|
|
@@ -269,6 +278,27 @@ export interface ICreatorOptions {
|
|
|
269
278
|
* [View the "Switch Between Themes" demo](https://surveyjs.io/Examples/Creator?id=theme-switcher)
|
|
270
279
|
*/
|
|
271
280
|
allowChangeThemeInPreview?: boolean;
|
|
281
|
+
/*
|
|
282
|
+
* Limits question and panels types available in the Toolbox and Add Question menu.
|
|
283
|
+
*
|
|
284
|
+
* 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.
|
|
285
|
+
*/
|
|
286
|
+
questionTypes?: any;
|
|
287
|
+
/*
|
|
288
|
+
* Specifies how Survey Creator users edit survey pages.
|
|
289
|
+
*
|
|
290
|
+
* Accepted values:
|
|
291
|
+
*
|
|
292
|
+
* - `"standard"` (default)
|
|
293
|
+
* Questions and panels are divided between pages. Users can scroll the design surface to reach a required page.
|
|
294
|
+
*
|
|
295
|
+
* - `"single"`
|
|
296
|
+
* All questions and panels belong to a single page. Users cannot add or remove pages.
|
|
297
|
+
*
|
|
298
|
+
* - `"bypage"`
|
|
299
|
+
* Questions and panels are divided between pages. Users can use the page navigator to switch to a required page.
|
|
300
|
+
*/
|
|
301
|
+
pageEditMode?: "standard" | "single" | "bypage";
|
|
272
302
|
}
|
|
273
303
|
/*
|
|
274
304
|
* The Toolbox item description.
|
|
@@ -421,6 +451,7 @@ export interface ICreatorPlugin {
|
|
|
421
451
|
update?: any;
|
|
422
452
|
deactivate?: any;
|
|
423
453
|
dispose?: any;
|
|
454
|
+
onDesignerSurveyPropertyChanged?: (obj: Base, propName: string) => void;
|
|
424
455
|
model: Base;
|
|
425
456
|
}
|
|
426
457
|
export interface ICreatorAction extends IAction {
|
|
@@ -558,8 +589,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
558
589
|
footerToolbar: any;
|
|
559
590
|
pageEditModeValue: "standard" | "single" | "bypage";
|
|
560
591
|
/*
|
|
561
|
-
*
|
|
562
|
-
* You can set this option in creator constructor only
|
|
592
|
+
* Contains the value of the [`pageEditMode`](https://surveyjs.io/Documentation/Survey-Creator?id=ICreatorOptions#pageEditMode) property specified in the constructor.
|
|
563
593
|
*/
|
|
564
594
|
get pageEditMode(): "standard" | "single" | "bypage";
|
|
565
595
|
set pageEditMode(val: "standard" | "single" | "bypage");
|
|
@@ -834,6 +864,18 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
834
864
|
*/
|
|
835
865
|
onConditionGetTitle: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
836
866
|
/*
|
|
867
|
+
* Use this event to modify the display text of a logic item in the Logic tab.
|
|
868
|
+
*
|
|
869
|
+
* The event handler accepts the following arguments:
|
|
870
|
+
*
|
|
871
|
+
* - `sender` - A Survey Creator instance that raised the event.
|
|
872
|
+
* - `options.expression` - A logical expression associated with the logic item.
|
|
873
|
+
* - `options.expressionText` - The same expression in a user-friendly format. It may contain question titles instead of question names.
|
|
874
|
+
* - `options.logicItem` - A logic item object. Contains an array of actions and other properties.
|
|
875
|
+
* - `options.text` - The expression and actions in a user-friendly format. Redefine this property if you want to change the display text.
|
|
876
|
+
*/
|
|
877
|
+
onLogicItemDisplayText: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
878
|
+
/*
|
|
837
879
|
* 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.
|
|
838
880
|
* - sender the survey creator object that fires the event
|
|
839
881
|
* options object contains the information about certain modifications
|
|
@@ -999,22 +1041,6 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
999
1041
|
*/
|
|
1000
1042
|
onDragDropAllow: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
1001
1043
|
/*
|
|
1002
|
-
* Use this event to override/disable element adorners - wrapping component name.
|
|
1003
|
-
* - sender the survey creator object that fires the event.
|
|
1004
|
-
* - options.element a survey object to be wrapped.
|
|
1005
|
-
* - options.reason why we need to wrap an element.
|
|
1006
|
-
* - options.conponentName component wrapper name.
|
|
1007
|
-
*/
|
|
1008
|
-
onGetElementWrapperComponentName: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
1009
|
-
/*
|
|
1010
|
-
* Use this event to override/disable element adorners - wrapping component data.
|
|
1011
|
-
* - sender the survey creator object that fires the event.
|
|
1012
|
-
* - options.element a survey object to be wrapped.
|
|
1013
|
-
* - options.reason why we need to wrap an element.
|
|
1014
|
-
* - options.conponentData component wrapper data.
|
|
1015
|
-
*/
|
|
1016
|
-
onGetElementWrapperComponentData: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
1017
|
-
/*
|
|
1018
1044
|
* This callback is used internally for providing survey JSON text.
|
|
1019
1045
|
*/
|
|
1020
1046
|
getSurveyJSONTextCallback: any;
|
|
@@ -1035,6 +1061,14 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1035
1061
|
*/
|
|
1036
1062
|
showObjectTitles: boolean;
|
|
1037
1063
|
/*
|
|
1064
|
+
* Limits the number of visible choices. Users can click "Show more" to view hidden choices.
|
|
1065
|
+
*
|
|
1066
|
+
* Set this property to -1 if you do not want any choices to hide.
|
|
1067
|
+
*
|
|
1068
|
+
* Default value: 10
|
|
1069
|
+
*/
|
|
1070
|
+
maxVisibleChoices: number;
|
|
1071
|
+
/*
|
|
1038
1072
|
* Specifies whether to display question titles instead of names when users edit logical expressions.
|
|
1039
1073
|
*
|
|
1040
1074
|
* Default value: `false`
|
|
@@ -1102,12 +1136,14 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1102
1136
|
* Default value: `"defaultV2"`
|
|
1103
1137
|
*/
|
|
1104
1138
|
themeForPreview: string;
|
|
1139
|
+
_allowModifyPages: boolean;
|
|
1105
1140
|
/*
|
|
1106
1141
|
* Specifies whether users can add, edit, and delete survey pages.
|
|
1107
1142
|
*
|
|
1108
1143
|
* Default value: `true`
|
|
1109
1144
|
*/
|
|
1110
|
-
allowModifyPages: boolean;
|
|
1145
|
+
get allowModifyPages(): boolean;
|
|
1146
|
+
set allowModifyPages(val: boolean);
|
|
1111
1147
|
/*
|
|
1112
1148
|
* Obsolete. Use the [`showDefaultLanguageInPreviewTab`](https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#showDefaultLanguageInPreviewTab) property instead.
|
|
1113
1149
|
*/
|
|
@@ -1117,16 +1153,16 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1117
1153
|
*
|
|
1118
1154
|
* Accepted values:
|
|
1119
1155
|
*
|
|
1120
|
-
* - `"auto"` (default)
|
|
1121
|
-
* Display the language selector only if the survey is translated
|
|
1156
|
+
* - `"auto"` (default)
|
|
1157
|
+
* Display the language selector only if the survey is translated into more than one language.
|
|
1122
1158
|
*
|
|
1123
|
-
* - `true`
|
|
1159
|
+
* - `true`
|
|
1124
1160
|
* Always display the language selector regardless of how many languages are used in the survey.
|
|
1125
1161
|
*
|
|
1126
|
-
* - `false`
|
|
1162
|
+
* - `false`
|
|
1127
1163
|
* Never display the language selector.
|
|
1128
1164
|
*
|
|
1129
|
-
* - `"all"`
|
|
1165
|
+
* - `"all"`
|
|
1130
1166
|
* Always display the language selector with [all supported languages](https://github.com/surveyjs/survey-creator/tree/master/packages/survey-creator-core/src/localization).
|
|
1131
1167
|
*
|
|
1132
1168
|
* **See also**: [Localization & Globalization](https://surveyjs.io/Documentation/Survey-Creator?id=localization)
|
|
@@ -1441,6 +1477,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1441
1477
|
onGetElementEditorTitleCallback(obj: Base, title: string): string;
|
|
1442
1478
|
onConditionQuestionsGetListCallback(propertyName: string, obj: Base, editor: any, list: any): void;
|
|
1443
1479
|
onConditionGetTitleCallback(expression: string, title: string): string;
|
|
1480
|
+
onLogicGetTitleCallback(expression: string, expressionText: string, text: string, logicItem: any): string;
|
|
1444
1481
|
/*
|
|
1445
1482
|
* The delay on saving survey JSON on autoSave in ms. It is 500 ms by default.
|
|
1446
1483
|
* 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.
|
|
@@ -1631,6 +1668,7 @@ export declare class LogoImageViewModel extends Base {
|
|
|
1631
1668
|
constructor(creator: CreatorBase, root: any);
|
|
1632
1669
|
root: any;
|
|
1633
1670
|
get allowEdit(): boolean;
|
|
1671
|
+
get containerCss(): string;
|
|
1634
1672
|
get survey(): SurveyModel;
|
|
1635
1673
|
chooseFile(model: LogoImageViewModel): void;
|
|
1636
1674
|
remove(model: LogoImageViewModel): void;
|
|
@@ -2060,6 +2098,7 @@ export declare class StringEditorViewModelBase extends Base {
|
|
|
2060
2098
|
onClick(event: any): void;
|
|
2061
2099
|
onFocus(event: any): void;
|
|
2062
2100
|
onInput(event: any): void;
|
|
2101
|
+
onBlur(event: any): void;
|
|
2063
2102
|
done(event: any): void;
|
|
2064
2103
|
onKeyDown(event: any): boolean;
|
|
2065
2104
|
onKeyUp(event: any): boolean;
|
|
@@ -2443,9 +2482,6 @@ export declare class SurveyTextWorker {
|
|
|
2443
2482
|
export declare class TabDesignerViewModel extends Base {
|
|
2444
2483
|
constructor(creator: CreatorBase);
|
|
2445
2484
|
widthUpdater: any;
|
|
2446
|
-
checkNewPageHandler: (sender: SurveyModel, options: any) => void;
|
|
2447
|
-
checkRemovePageHandler: (sender: SurveyModel, options: any) => void;
|
|
2448
|
-
surveyOnPropertyChanged: (sender: SurveyModel, options: any) => void;
|
|
2449
2485
|
pagesControllerValue: PagesController;
|
|
2450
2486
|
newPage: PageModel;
|
|
2451
2487
|
showNewPage: boolean;
|
|
@@ -2457,8 +2493,9 @@ export declare class TabDesignerViewModel extends Base {
|
|
|
2457
2493
|
get pagesController(): PagesController;
|
|
2458
2494
|
get isToolboxVisible(): boolean;
|
|
2459
2495
|
get placeholderText(): string;
|
|
2496
|
+
isUpdatingNewPage: boolean;
|
|
2497
|
+
onDesignerSurveyPropertyChanged(obj: Base, propName: string): void;
|
|
2460
2498
|
initSurvey(): void;
|
|
2461
|
-
dispose(): void;
|
|
2462
2499
|
clickDesigner(): void;
|
|
2463
2500
|
getDesignerCss(): string;
|
|
2464
2501
|
getRootCss(): string;
|
|
@@ -2604,6 +2641,7 @@ export declare class UndoRedoController extends Base {
|
|
|
2604
2641
|
undoAction: Action;
|
|
2605
2642
|
redoAction: Action;
|
|
2606
2643
|
undoRedoManager: UndoRedoManager;
|
|
2644
|
+
updateSurvey(): void;
|
|
2607
2645
|
undo(): void;
|
|
2608
2646
|
redo(): void;
|
|
2609
2647
|
startTransaction(name?: string): void;
|
|
@@ -2698,6 +2736,7 @@ export declare class EmptySurveyCreatorOptions implements ISurveyCreatorOptions
|
|
|
2698
2736
|
createSurvey(json: any, reason: string, surveyType?: any): SurveyModel;
|
|
2699
2737
|
onConditionQuestionsGetListCallback(propertyName: string, obj: Base, editor: any, list: any): void;
|
|
2700
2738
|
onConditionGetTitleCallback(expression: string, title: string): string;
|
|
2739
|
+
onLogicGetTitleCallback(expression: string, displayExpression: string, text: string, logicItem: any): string;
|
|
2701
2740
|
}
|
|
2702
2741
|
export declare class ImageItemValueWrapperViewModel extends ItemValueWrapperViewModel {
|
|
2703
2742
|
constructor(creator: CreatorBase, question: QuestionSelectBase, item: ImageItemValue, templateData: any, itemsRoot: any);
|
|
@@ -2871,6 +2910,7 @@ export declare class TabDesignerPlugin implements ICreatorPlugin {
|
|
|
2871
2910
|
previewAction: Action;
|
|
2872
2911
|
activate(): void;
|
|
2873
2912
|
deactivate(): boolean;
|
|
2913
|
+
onDesignerSurveyPropertyChanged(obj: Base, propName: string): void;
|
|
2874
2914
|
update(): void;
|
|
2875
2915
|
createActions(): any;
|
|
2876
2916
|
selectSurvey(): void;
|
|
@@ -3231,6 +3271,20 @@ export declare class PropertyGridValueEditorBase extends PropertyGridEditor {
|
|
|
3231
3271
|
protected isValueEmpty(val: any): boolean;
|
|
3232
3272
|
isSupportGrouping(): boolean;
|
|
3233
3273
|
}
|
|
3274
|
+
export declare class QuestionDropdownAdornerViewModel extends QuestionAdornerViewModel {
|
|
3275
|
+
constructor(creator: CreatorBase, surveyElement: SurveyElement, templateData: SurveyTemplateRendererTemplateData);
|
|
3276
|
+
isCollapsed: boolean;
|
|
3277
|
+
visibleCount: number;
|
|
3278
|
+
get question(): QuestionDropdownModel;
|
|
3279
|
+
get needToCollapse(): boolean;
|
|
3280
|
+
get isCollapseView(): boolean;
|
|
3281
|
+
leftFocus(): void;
|
|
3282
|
+
getChoiceCss(): string;
|
|
3283
|
+
getRenderedItems(): any;
|
|
3284
|
+
getButtonText(): string;
|
|
3285
|
+
switchCollapse: any;
|
|
3286
|
+
dispose(): void;
|
|
3287
|
+
}
|
|
3234
3288
|
export declare class QuestionImageAdornerViewModel extends QuestionAdornerViewModel {
|
|
3235
3289
|
constructor(creator: CreatorBase, surveyElement: SurveyElement, templateData: SurveyTemplateRendererTemplateData, questionRoot: any);
|
|
3236
3290
|
questionRoot: any;
|