survey-creator-core 1.9.50 → 1.9.52
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 +2 -2
- package/survey-creator-core.css +15 -6
- package/survey-creator-core.d.ts +62 -12
- package/survey-creator-core.i18n.js +4 -4
- package/survey-creator-core.i18n.min.js +2 -2
- package/survey-creator-core.js +325 -101
- package/survey-creator-core.min.css +2 -2
- package/survey-creator-core.min.js +3 -3
package/survey-creator-core.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Type definition for Survey Creatorlibrary. Platform independent (core) v1.9.
|
|
2
|
+
* Type definition for Survey Creatorlibrary. Platform independent (core) v1.9.52
|
|
3
3
|
* Copyright (c) 2015-2022 Devsoft Baltic OÜ - https://surveyjs.io/
|
|
4
4
|
* License: https://surveyjs.io/Licenses#SurveyCreator
|
|
5
5
|
*/
|
|
6
6
|
import { Base, JsonObjectProperty, Question, SurveyModel, ItemValue } from "survey-core";
|
|
7
|
-
import { MatrixDropdownColumn, IAction, Action, ILocalizableOwner
|
|
8
|
-
import { ActionContainer, DragDropSurveyElements, DragDropChoices, Event
|
|
9
|
-
import { PageModel, IElement, IPanel, ISurveyElement
|
|
10
|
-
import { QuestionSelectBase, Operand, DragOrClickHelper, PanelModel
|
|
11
|
-
import { ListModel, PopupModel, EventBase, PanelModelBase
|
|
12
|
-
import { SurveyTemplateRendererTemplateData, QuestionRatingModel, QuestionRowModel, ComputedUpdater
|
|
13
|
-
import {
|
|
7
|
+
import { MatrixDropdownColumn, ILocalizableString, IAction, Action, ILocalizableOwner } from "survey-core";
|
|
8
|
+
import { LocalizableString, ActionContainer, DragDropSurveyElements, DragDropChoices, Event } from "survey-core";
|
|
9
|
+
import { AdaptiveActionContainer, PageModel, IElement, IPanel, ISurveyElement } from "survey-core";
|
|
10
|
+
import { SurveyElement, QuestionSelectBase, Operand, DragOrClickHelper, PanelModel } from "survey-core";
|
|
11
|
+
import { QuestionDropdownModel, ListModel, PopupModel, EventBase, PanelModelBase } from "survey-core";
|
|
12
|
+
import { QuestionNonValue, SurveyTemplateRendererTemplateData, QuestionRatingModel, QuestionRowModel, ComputedUpdater } from "survey-core";
|
|
13
|
+
import { QuestionCheckboxModel, ArrayChanges, ImageItemValue, HashTable, QuestionMatrixDynamicModel } from "survey-core";
|
|
14
14
|
import { QuestionMatrixModel, QuestionMatrixDropdownModel, QuestionPanelDynamicModel, QuestionCommentModel, MatrixDynamicRowModel } from "survey-core";
|
|
15
15
|
|
|
16
16
|
export { editorLocalization as localization };
|
|
@@ -63,6 +63,7 @@ export interface ISurveyCreatorOptions {
|
|
|
63
63
|
onConditionQuestionsGetListCallback(propertyName: string, obj: Base, editor: any, list: any): string;
|
|
64
64
|
onConditionGetTitleCallback(expression: string, title: string): string;
|
|
65
65
|
onLogicGetTitleCallback(expression: string, displayExpression: string, text: string, logicItem: any): string;
|
|
66
|
+
getTranslationExportedText(obj: Base, name: string, locString: ILocalizableString, locale: string, text: string): string;
|
|
66
67
|
}
|
|
67
68
|
/*
|
|
68
69
|
* Survey Creator configuration. Pass it as an argument to the `SurveyCreator` constructor:
|
|
@@ -1037,10 +1038,23 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1037
1038
|
*/
|
|
1038
1039
|
onTranslationImportItem: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
1039
1040
|
/*
|
|
1040
|
-
* The
|
|
1041
|
+
* The event is called when the translation from csv file is imported.
|
|
1041
1042
|
*/
|
|
1042
1043
|
onTranslationImported: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
1043
1044
|
/*
|
|
1045
|
+
* Use this event to modify a translated string before it is exported to CSV.
|
|
1046
|
+
*
|
|
1047
|
+
* The event handler accepts the following arguments:
|
|
1048
|
+
*
|
|
1049
|
+
* - `sender` - A Survey Creator instance that raised the event.
|
|
1050
|
+
* - `options.obj` - A survey object instance (survey, page, panel, question) whose string translations are being exported to CSV.
|
|
1051
|
+
* - `options.locale` - The current locale identifier (`"en"`, `"de"`, etc.). Contains an empty string if the default locale is used.
|
|
1052
|
+
* - `options.name` - A full name of the translated string. It is composed of names of all parent elements, for example: `"mySurvey.page1.question2.title"`.
|
|
1053
|
+
* - `options.locString` - A `LocalizableString` instance. Call the `options.locString.getLocaleText(locale)` method if you need to get a text string for a specific locale.
|
|
1054
|
+
* - `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.
|
|
1055
|
+
*/
|
|
1056
|
+
onTranslationExportItem: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
1057
|
+
/*
|
|
1044
1058
|
* Use this event to control drag&drop operations.
|
|
1045
1059
|
* - sender the survey creator object that fires the event.
|
|
1046
1060
|
* - options.survey the editing survey object.
|
|
@@ -1429,7 +1443,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1429
1443
|
protected deleteObject(obj: any): void;
|
|
1430
1444
|
protected updateConditionsOnRemove(obj: any): void;
|
|
1431
1445
|
isElementSelected(element: Base): boolean;
|
|
1432
|
-
selectElement(element: any, propertyName?: string, focus?: boolean): void;
|
|
1446
|
+
selectElement(element: any, propertyName?: string, focus?: boolean, startEdit?: boolean): void;
|
|
1433
1447
|
protected get designerPropertyGrid(): any;
|
|
1434
1448
|
/*
|
|
1435
1449
|
* Collapse certain property editor tab (category) in properties panel/grid
|
|
@@ -1498,6 +1512,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1498
1512
|
onConditionQuestionsGetListCallback(propertyName: string, obj: Base, editor: any, list: any): string;
|
|
1499
1513
|
onConditionGetTitleCallback(expression: string, title: string): string;
|
|
1500
1514
|
onLogicGetTitleCallback(expression: string, expressionText: string, text: string, logicItem: any): string;
|
|
1515
|
+
getTranslationExportedText(obj: Base, name: string, locString: ILocalizableString, locale: string, text: string): string;
|
|
1501
1516
|
/*
|
|
1502
1517
|
* The delay on saving survey JSON on autoSave in ms. It is 500 ms by default.
|
|
1503
1518
|
* 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.
|
|
@@ -1518,7 +1533,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1518
1533
|
get addNewQuestionText(): any;
|
|
1519
1534
|
getQuestionTypeSelectorModel(beforeAdd: (type: string) => void, panel?: IPanel): any;
|
|
1520
1535
|
addNewQuestionInPage(beforeAdd: (string: any) => void, panel?: IPanel, type?: string): void;
|
|
1521
|
-
createIActionBarItemByClass(className: string, title: string, iconName: string): Action;
|
|
1536
|
+
createIActionBarItemByClass(className: string, title: string, iconName: string, needSeparator: boolean): Action;
|
|
1522
1537
|
onElementMenuItemsChanged(element: any, items: any): void;
|
|
1523
1538
|
getElementAllowOperations(element: SurveyElement): any;
|
|
1524
1539
|
getNextItemValue(question: QuestionSelectBase): string | number;
|
|
@@ -1633,6 +1648,7 @@ export declare class ItemValueWrapperViewModel extends Base {
|
|
|
1633
1648
|
get isDraggable(): boolean;
|
|
1634
1649
|
isDraggableItem(item: ItemValue): boolean;
|
|
1635
1650
|
add(model: ItemValueWrapperViewModel): void;
|
|
1651
|
+
addNewItem(item: ItemValue, question: QuestionSelectBase, creator: CreatorBase): void;
|
|
1636
1652
|
remove(model: ItemValueWrapperViewModel): void;
|
|
1637
1653
|
get allowRemove(): boolean;
|
|
1638
1654
|
get tooltip(): string;
|
|
@@ -1869,11 +1885,13 @@ export declare class QuestionRatingAdornerViewModel extends Base {
|
|
|
1869
1885
|
* The list of Toolbox items.
|
|
1870
1886
|
*/
|
|
1871
1887
|
export declare class QuestionToolbox extends AdaptiveActionContainer<QuestionToolboxItem> implements IQuestionToolbox {
|
|
1872
|
-
constructor(supportedQuestions?: any, creator?: CreatorBase);
|
|
1888
|
+
constructor(supportedQuestions?: any, creator?: CreatorBase, useDefaultCategories?: boolean);
|
|
1873
1889
|
creator: CreatorBase;
|
|
1874
1890
|
static hiddenTypes: any;
|
|
1875
1891
|
static defaultIconName: string;
|
|
1892
|
+
static defaultCategories: any;
|
|
1876
1893
|
_orderedQuestions: any;
|
|
1894
|
+
showTitleOnCategoryChange: boolean;
|
|
1877
1895
|
static getQuestionDefaultSettings(questionType: string): any;
|
|
1878
1896
|
/*
|
|
1879
1897
|
* Modify this array to change the toolbox items order.
|
|
@@ -1886,6 +1904,7 @@ export declare class QuestionToolbox extends AdaptiveActionContainer<QuestionToo
|
|
|
1886
1904
|
copiedItemMaxCount: number;
|
|
1887
1905
|
allowExpandMultipleCategoriesValue: boolean;
|
|
1888
1906
|
keepAllCategoriesExpandedValue: boolean;
|
|
1907
|
+
showCategoryTitlesValue: boolean;
|
|
1889
1908
|
dragOrClickHelper: DragOrClickHelper;
|
|
1890
1909
|
/*
|
|
1891
1910
|
* Contains toolbox categories and allows you to modify them.
|
|
@@ -1974,6 +1993,13 @@ export declare class QuestionToolbox extends AdaptiveActionContainer<QuestionToo
|
|
|
1974
1993
|
*/
|
|
1975
1994
|
get keepAllCategoriesExpanded(): boolean;
|
|
1976
1995
|
set keepAllCategoriesExpanded(val: boolean);
|
|
1996
|
+
/*
|
|
1997
|
+
* Specifies whether to display category titles in the Toolbox.
|
|
1998
|
+
*
|
|
1999
|
+
* If you disable this property, the Toolbox hides the titles but continues to display horizontal lines that divide categories. To remove these lines as well, call the `removeCategories()` method.
|
|
2000
|
+
*/
|
|
2001
|
+
get showCategoryTitles(): boolean;
|
|
2002
|
+
set showCategoryTitles(val: boolean);
|
|
1977
2003
|
updateTitles(): void;
|
|
1978
2004
|
/*
|
|
1979
2005
|
* Change the category of the toolbox item
|
|
@@ -1983,6 +2009,10 @@ export declare class QuestionToolbox extends AdaptiveActionContainer<QuestionToo
|
|
|
1983
2009
|
* Change categories for several toolbox items.
|
|
1984
2010
|
*/
|
|
1985
2011
|
changeCategories(changedItems: any): void;
|
|
2012
|
+
/*
|
|
2013
|
+
* Removes categories from the Toolbox.
|
|
2014
|
+
*/
|
|
2015
|
+
removeCategories(): void;
|
|
1986
2016
|
toggleCategoryState(categoryName: string): void;
|
|
1987
2017
|
/*
|
|
1988
2018
|
* Expand a category by its name. If allowExpandMultipleCategories is false (default value), all other categories become collapsed
|
|
@@ -2097,15 +2127,30 @@ export declare class SidebarTabModel extends Base {
|
|
|
2097
2127
|
model: any;
|
|
2098
2128
|
componentName: string;
|
|
2099
2129
|
}
|
|
2130
|
+
export declare class StringEditorConnector extends Base {
|
|
2131
|
+
constructor(locString: LocalizableString);
|
|
2132
|
+
static get(locString: LocalizableString): StringEditorConnector;
|
|
2133
|
+
setAutoFocus(): void;
|
|
2134
|
+
hasEditCompleteHandler: boolean;
|
|
2135
|
+
focusOnEditor: boolean;
|
|
2136
|
+
activateEditor(): void;
|
|
2137
|
+
setItemValue(item: ItemValueWrapperViewModel): void;
|
|
2138
|
+
onDoActivate: Event<(sender: StringEditorViewModelBase, options: any) => any, any>;
|
|
2139
|
+
onEditComplete: Event<(sender: StringEditorViewModelBase, options: any) => any, any>;
|
|
2140
|
+
}
|
|
2100
2141
|
export declare class StringEditorViewModelBase extends Base {
|
|
2101
2142
|
constructor(locString: LocalizableString, creator: CreatorBase);
|
|
2102
2143
|
blurredByEscape: boolean;
|
|
2103
2144
|
focusedProgram: boolean;
|
|
2104
2145
|
valueBeforeEdit: string;
|
|
2146
|
+
connector: StringEditorConnector;
|
|
2147
|
+
getEditorElement: any;
|
|
2105
2148
|
errorText: string;
|
|
2106
2149
|
focused: boolean;
|
|
2107
2150
|
editAsText: boolean;
|
|
2108
2151
|
compostionInProgress: boolean;
|
|
2152
|
+
afterRender(): void;
|
|
2153
|
+
activate(): void;
|
|
2109
2154
|
setLocString(locString: LocalizableString): void;
|
|
2110
2155
|
checkConstraints(event: any): void;
|
|
2111
2156
|
blurEditor: any;
|
|
@@ -2762,6 +2807,7 @@ export declare class EmptySurveyCreatorOptions implements ISurveyCreatorOptions
|
|
|
2762
2807
|
onConditionQuestionsGetListCallback(propertyName: string, obj: Base, editor: any, list: any): string;
|
|
2763
2808
|
onConditionGetTitleCallback(expression: string, title: string): string;
|
|
2764
2809
|
onLogicGetTitleCallback(expression: string, displayExpression: string, text: string, logicItem: any): string;
|
|
2810
|
+
getTranslationExportedText(obj: Base, name: string, locString: ILocalizableString, locale: string, text: string): string;
|
|
2765
2811
|
}
|
|
2766
2812
|
export declare class ImageItemValueWrapperViewModel extends ItemValueWrapperViewModel {
|
|
2767
2813
|
constructor(creator: CreatorBase, question: QuestionSelectBase, item: ImageItemValue, templateData: any, itemsRoot: any);
|
|
@@ -3055,6 +3101,7 @@ export declare class TranslationItem extends TranslationItemBase {
|
|
|
3055
3101
|
name: string;
|
|
3056
3102
|
locString: ILocalizableString;
|
|
3057
3103
|
defaultValue: string;
|
|
3104
|
+
context: any;
|
|
3058
3105
|
hashValues: any;
|
|
3059
3106
|
customText: string;
|
|
3060
3107
|
afterRender: any;
|
|
@@ -3070,6 +3117,9 @@ export declare class TranslationItem extends TranslationItemBase {
|
|
|
3070
3117
|
fillLocales(locales: any): void;
|
|
3071
3118
|
toJSON(): any;
|
|
3072
3119
|
mergeLocaleWithDefault(loc: string): void;
|
|
3120
|
+
getPlaceholder(locale: string): string;
|
|
3121
|
+
getTextForExport(loc: string): string;
|
|
3122
|
+
getPlaceholderText(loc: string): string;
|
|
3073
3123
|
}
|
|
3074
3124
|
export declare class UndoRedoAction implements IUndoRedoAction {
|
|
3075
3125
|
constructor(_propertyName: string, _oldValue: any, _newValue: any, _sender: Base);
|