survey-creator-core 1.9.110 → 1.9.111
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/fonts.fontless.css +1 -1
- package/fonts.fontless.min.css +1 -1
- package/package.json +2 -2
- package/survey-creator-core.css +611 -581
- package/survey-creator-core.fontless.css +610 -580
- package/survey-creator-core.fontless.css.map +1 -1
- package/survey-creator-core.fontless.min.css +37 -37
- package/survey-creator-core.i18n.js +479 -3
- package/survey-creator-core.i18n.js.map +1 -1
- package/survey-creator-core.i18n.min.js +2 -2
- package/survey-creator-core.js +830 -82
- package/survey-creator-core.js.map +1 -1
- package/survey-creator-core.min.css +38 -38
- package/survey-creator-core.min.js +46 -46
- package/typings/components/tabs/designer-plugin.d.ts +0 -1
- package/typings/components/tabs/theme-builder.d.ts +26 -0
- package/typings/components/tabs/translation-plugin.d.ts +0 -1
- package/typings/components/tabs/translation-theme.d.ts +1 -0
- package/typings/components/tabs/translation.d.ts +36 -1
- package/typings/creator-base.d.ts +40 -3
- package/typings/creator-options.d.ts +14 -2
- package/typings/creator-settings.d.ts +11 -0
- package/typings/editorLocalization.d.ts +37 -0
- package/typings/localization/english.d.ts +37 -0
- package/typings/property-grid/matrices.d.ts +2 -0
- package/typings/survey-elements.d.ts +1 -0
- package/typings/survey-helper.d.ts +2 -1
- package/typings/toolbox.d.ts +2 -0
|
@@ -14,7 +14,6 @@ export declare class TabDesignerPlugin implements ICreatorPlugin {
|
|
|
14
14
|
private get isSurveySelected();
|
|
15
15
|
private get isSettingsActive();
|
|
16
16
|
private createVisibleUpdater;
|
|
17
|
-
private updatePropertyGridTabCaption;
|
|
18
17
|
constructor(creator: CreatorBase);
|
|
19
18
|
activate(): void;
|
|
20
19
|
deactivate(): boolean;
|
|
@@ -75,19 +75,45 @@ export declare class ThemeBuilder extends Base {
|
|
|
75
75
|
set availableThemes(availebleThemes: string[]);
|
|
76
76
|
private setActivePageItem;
|
|
77
77
|
private getPageItemByPage;
|
|
78
|
+
private getPredefinedColorsItemValues;
|
|
78
79
|
private initializeColorCalculator;
|
|
79
80
|
private generalPropertiesChanged;
|
|
81
|
+
private headerViewContainerPropertiesChanged;
|
|
80
82
|
private cssVariablePropertiesChanged;
|
|
81
83
|
private updateDependentQuestionValues;
|
|
82
84
|
private setThemeCssVariablesChanges;
|
|
83
85
|
protected createThemeEditorSurvey(): SurveyModel;
|
|
84
86
|
findSuitableTheme(themeName: string): ITheme;
|
|
87
|
+
private getCoverJson;
|
|
88
|
+
private setCoverCssVariables;
|
|
85
89
|
private loadThemeIntoPropertyGrid;
|
|
90
|
+
private getBackgroundColorSwitchByValue;
|
|
91
|
+
private updateHeaderViewContainerEditors;
|
|
86
92
|
private updatePropertyGridEditorsAvailability;
|
|
87
93
|
private updatePropertyGridEditors;
|
|
88
94
|
private raiseThemeChanged;
|
|
89
95
|
private raiseThemeModified;
|
|
90
96
|
private updateSimulatorTheme;
|
|
91
97
|
private getThemeEditorSurveyJSON;
|
|
98
|
+
getHorizontalAlignment(questionName: string, title: string, defaultValue: string): {
|
|
99
|
+
type: string;
|
|
100
|
+
name: string;
|
|
101
|
+
title: string;
|
|
102
|
+
choices: {
|
|
103
|
+
value: string;
|
|
104
|
+
text: string;
|
|
105
|
+
}[];
|
|
106
|
+
defaultValue: string;
|
|
107
|
+
};
|
|
108
|
+
getVerticalAlignment(questionName: string, defaultValue: string): {
|
|
109
|
+
type: string;
|
|
110
|
+
name: string;
|
|
111
|
+
titleLocation: string;
|
|
112
|
+
choices: {
|
|
113
|
+
value: string;
|
|
114
|
+
text: string;
|
|
115
|
+
}[];
|
|
116
|
+
defaultValue: string;
|
|
117
|
+
};
|
|
92
118
|
dispose(): void;
|
|
93
119
|
}
|
|
@@ -8,7 +8,6 @@ export declare class TabTranslationPlugin implements ICreatorPlugin {
|
|
|
8
8
|
private mergeLocaleWithDefaultAction;
|
|
9
9
|
private importCsvAction;
|
|
10
10
|
private exportCsvAction;
|
|
11
|
-
private inputFileElement;
|
|
12
11
|
private sidebarTab;
|
|
13
12
|
model: Translation;
|
|
14
13
|
constructor(creator: CreatorBase);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Base, SurveyModel, JsonObjectProperty, PageModel, ILocalizableString, IAction, QuestionMatrixDynamicModel } from "survey-core";
|
|
1
|
+
import { Base, SurveyModel, JsonObjectProperty, PageModel, ILocalizableString, Action, IAction, QuestionMatrixDynamicModel } from "survey-core";
|
|
2
2
|
import { ISurveyCreatorOptions } from "../../creator-settings";
|
|
3
3
|
export declare class TranslationItemBase extends Base {
|
|
4
4
|
name: string;
|
|
@@ -9,12 +9,14 @@ export declare class TranslationItemBase extends Base {
|
|
|
9
9
|
mergeLocaleWithDefault(loc: string): void;
|
|
10
10
|
makeObservable(): void;
|
|
11
11
|
deleteLocaleStrings(locale: string): void;
|
|
12
|
+
applyEditLocale(locale: string): void;
|
|
12
13
|
protected fireOnObjCreating(obj?: Base): void;
|
|
13
14
|
}
|
|
14
15
|
export declare class TranslationItemString extends Base {
|
|
15
16
|
locString: ILocalizableString;
|
|
16
17
|
locale: string;
|
|
17
18
|
constructor(locString: ILocalizableString, locale: string);
|
|
19
|
+
isReadOnly: boolean;
|
|
18
20
|
text: string;
|
|
19
21
|
placeholder: string;
|
|
20
22
|
protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
|
|
@@ -38,6 +40,7 @@ export declare class TranslationItem extends TranslationItemBase {
|
|
|
38
40
|
get localizableName(): string;
|
|
39
41
|
getLocText(loc: string): string;
|
|
40
42
|
setLocText(loc: string, newValue: string): void;
|
|
43
|
+
applyEditLocale(locale: string): void;
|
|
41
44
|
values(loc: string): TranslationItemString;
|
|
42
45
|
fillLocales(locales: Array<string>): void;
|
|
43
46
|
toJSON(): any;
|
|
@@ -45,6 +48,7 @@ export declare class TranslationItem extends TranslationItemBase {
|
|
|
45
48
|
private getKeys;
|
|
46
49
|
mergeLocaleWithDefault(loc: string): void;
|
|
47
50
|
deleteLocaleStrings(locale: string): void;
|
|
51
|
+
getDefaultLocaleText(): string;
|
|
48
52
|
getPlaceholder(locale: string): string;
|
|
49
53
|
getTextForExport(loc: string): string;
|
|
50
54
|
getPlaceholderText(loc: string): string;
|
|
@@ -62,6 +66,7 @@ export interface ITranslationLocales {
|
|
|
62
66
|
fireOnObjCreating(obj: Base): any;
|
|
63
67
|
removeLocale(loc: string): void;
|
|
64
68
|
canShowProperty(obj: Base, prop: JsonObjectProperty, isEmpty: boolean): boolean;
|
|
69
|
+
getEditLocale(): string;
|
|
65
70
|
getProcessedTranslationItemText(locale: string, name: ILocalizableString, newValue: string, context: any): string;
|
|
66
71
|
}
|
|
67
72
|
export declare class TranslationGroup extends TranslationItemBase {
|
|
@@ -100,6 +105,7 @@ export declare class TranslationGroup extends TranslationItemBase {
|
|
|
100
105
|
get hasItems(): boolean;
|
|
101
106
|
mergeLocaleWithDefault(loc: string): void;
|
|
102
107
|
deleteLocaleStrings(locale: string): void;
|
|
108
|
+
applyEditLocale(locale: string): void;
|
|
103
109
|
private fillItems;
|
|
104
110
|
private sortItems;
|
|
105
111
|
private getLocalizedProperties;
|
|
@@ -145,6 +151,11 @@ export declare class Translation extends Base implements ITranslationLocales {
|
|
|
145
151
|
stringsSurvey: SurveyModel;
|
|
146
152
|
stringsHeaderSurvey: SurveyModel;
|
|
147
153
|
isEmpty: boolean;
|
|
154
|
+
private editLocale;
|
|
155
|
+
getEditLocale(): string;
|
|
156
|
+
setEditMode(locale: string): void;
|
|
157
|
+
get isEditMode(): boolean;
|
|
158
|
+
applyEditLocale(): void;
|
|
148
159
|
makeObservable(onBaseObjCreating: (obj: Base) => void): void;
|
|
149
160
|
fireOnObjCreating(obj: Base): void;
|
|
150
161
|
get settingsSurvey(): SurveyModel;
|
|
@@ -157,6 +168,8 @@ export declare class Translation extends Base implements ITranslationLocales {
|
|
|
157
168
|
private updateLocales;
|
|
158
169
|
private getSettingsSurveyJSON;
|
|
159
170
|
getSurveyLocales(): any[];
|
|
171
|
+
private inputFileElement;
|
|
172
|
+
importFromCSVFileDOM(): void;
|
|
160
173
|
private updateSettingsSurveyLocales;
|
|
161
174
|
private resetStringsSurvey;
|
|
162
175
|
private createStringsSurvey;
|
|
@@ -165,6 +178,7 @@ export declare class Translation extends Base implements ITranslationLocales {
|
|
|
165
178
|
private addTranslationGroupIntoStringsSurvey;
|
|
166
179
|
private addLocaleColumns;
|
|
167
180
|
private getStringsSurveyData;
|
|
181
|
+
updateStringsSurveyData(): void;
|
|
168
182
|
private getStringsQuestionData;
|
|
169
183
|
private updateHeaderStringsSurveyColumns;
|
|
170
184
|
private updateStringsSurveyColumns;
|
|
@@ -198,6 +212,8 @@ export declare class Translation extends Base implements ITranslationLocales {
|
|
|
198
212
|
exportToSCVFile(fileName: string): void;
|
|
199
213
|
importFromCSVFile(file: File): void;
|
|
200
214
|
mergeLocaleWithDefault(): void;
|
|
215
|
+
createTranslationEditor(locale: string): TranslationEditor;
|
|
216
|
+
showTranslationEditor(locale: string): void;
|
|
201
217
|
translateItemAfterRender(item: TranslationItem, el: any, locale: string): void;
|
|
202
218
|
/**
|
|
203
219
|
* Update a translation item with given values
|
|
@@ -206,3 +222,22 @@ export declare class Translation extends Base implements ITranslationLocales {
|
|
|
206
222
|
private fillItemsHash;
|
|
207
223
|
dispose(): void;
|
|
208
224
|
}
|
|
225
|
+
export declare class TranslationEditor {
|
|
226
|
+
private survey;
|
|
227
|
+
private translationValue;
|
|
228
|
+
private options;
|
|
229
|
+
private locale;
|
|
230
|
+
onApply: () => void;
|
|
231
|
+
constructor(survey: SurveyModel, locale: string, options: ISurveyCreatorOptions);
|
|
232
|
+
get translation(): Translation;
|
|
233
|
+
showDialog(): void;
|
|
234
|
+
doMachineTranslation(): void;
|
|
235
|
+
apply(): void;
|
|
236
|
+
cancel(): void;
|
|
237
|
+
dispose(): void;
|
|
238
|
+
private setupNavigationButtons;
|
|
239
|
+
private createStringsToTranslate;
|
|
240
|
+
private addStringsToTranlate;
|
|
241
|
+
}
|
|
242
|
+
export declare function createImportCSVAction(action: () => void, needSeparator: boolean, isInEditor?: boolean): Action;
|
|
243
|
+
export declare function createExportCSVAction(action: () => void, isInEditor?: boolean): Action;
|
|
@@ -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;
|
|
@@ -723,6 +724,27 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
723
724
|
* - `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
725
|
*/
|
|
725
726
|
onTranslationExportItem: CreatorEvent;
|
|
727
|
+
/**
|
|
728
|
+
* An event that allows you to integrate a machine translation service, such as Google Translate or Microsoft Translator, into Survey Creator.
|
|
729
|
+
*
|
|
730
|
+
* 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.
|
|
731
|
+
*
|
|
732
|
+
* Parameters:
|
|
733
|
+
*
|
|
734
|
+
* - `sender`: `CreatorBase`\
|
|
735
|
+
* A Survey Creator instance that raised the event.
|
|
736
|
+
* - `options.fromLocale`: `string`\
|
|
737
|
+
* A locale from which you want to translate strings. Contains a locale identifier (`"en"`, `"de"`, etc.).
|
|
738
|
+
* - `options.toLocale`: `string`\
|
|
739
|
+
* A locale to which you want to translate strings. Contains a locale identifier (`"en"`, `"de"`, etc.).
|
|
740
|
+
* - `options.strings`: `Array<string>`\
|
|
741
|
+
* Strings to translate.
|
|
742
|
+
* - `options.callback: (strings: Array<string>)`: `Function`\
|
|
743
|
+
* A callback function that accepts translated strings. If the translation failed, pass an empty array or call this function without arguments.
|
|
744
|
+
*
|
|
745
|
+
* > Survey Creator does not include a machine translation service out of the box. Our component only provides a UI for calling the service API.
|
|
746
|
+
*/
|
|
747
|
+
onMachineTranslate: CreatorEvent;
|
|
726
748
|
/**
|
|
727
749
|
* An event that is raised before a string translation is changed. Use this event to override a new translation value.
|
|
728
750
|
*
|
|
@@ -818,6 +840,12 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
818
840
|
* Default value: 0 (unlimited, taken from `settings.propertyGrid.maximumChoicesCount`)
|
|
819
841
|
*/
|
|
820
842
|
maximumChoicesCount: number;
|
|
843
|
+
/**
|
|
844
|
+
* 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.
|
|
845
|
+
*
|
|
846
|
+
* Default value: 0 (unlimited, taken from `settings.propertyGrid.minimumChoicesCount`)
|
|
847
|
+
*/
|
|
848
|
+
minimumChoicesCount: number;
|
|
821
849
|
/**
|
|
822
850
|
* 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
851
|
*
|
|
@@ -825,11 +853,17 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
825
853
|
*/
|
|
826
854
|
maximumRowsCount: number;
|
|
827
855
|
/**
|
|
828
|
-
* Limits the number of rate
|
|
856
|
+
* Limits the number of rate values that users can add to [Rating](https://surveyjs.io/Documentation/Library?id=questionratingmodel) questions.
|
|
829
857
|
*
|
|
830
858
|
* Default value: 0 (unlimited, taken from `settings.propertyGrid.maximumRateValues`)
|
|
831
859
|
*/
|
|
832
860
|
maximumRateValues: number;
|
|
861
|
+
/**
|
|
862
|
+
* Limits the number of nested panels within a [Panel](/form-library/documentation/api-reference/panel-model) element.
|
|
863
|
+
*
|
|
864
|
+
* Default value: -1 (unlimited)
|
|
865
|
+
*/
|
|
866
|
+
maxNestedPanels: number;
|
|
833
867
|
/**
|
|
834
868
|
* Obsolete. Use the [`showPagesInPreviewTab`](https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#showPagesInPreviewTab) property instead.
|
|
835
869
|
*/
|
|
@@ -1386,6 +1420,8 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1386
1420
|
onLogicGetTitleCallback(expression: string, expressionText: string, text: string, logicItem: any): string;
|
|
1387
1421
|
getProcessedTranslationItemText(locale: string, locString: ILocalizableString, newText: string, obj: any): string;
|
|
1388
1422
|
getTranslationExportedText(obj: Base, name: string, locString: ILocalizableString, locale: string, text: string): string;
|
|
1423
|
+
getHasMachineTranslation(): boolean;
|
|
1424
|
+
doMachineTranslation(fromLocale: string, toLocale: string, strings: Array<string>, callback: (translated: Array<string>) => void): void;
|
|
1389
1425
|
/**
|
|
1390
1426
|
* The delay on saving survey JSON on autoSave in ms. It is 500 ms by default.
|
|
1391
1427
|
* 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.
|
|
@@ -1422,7 +1458,8 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1422
1458
|
convertCurrentQuestion(newType: string): void;
|
|
1423
1459
|
getAddNewQuestionText(currentAddQuestionType?: string): any;
|
|
1424
1460
|
get addNewQuestionText(): any;
|
|
1425
|
-
|
|
1461
|
+
getAvailableToolboxItems(element?: SurveyElement, isAddNew?: boolean): Array<QuestionToolboxItem>;
|
|
1462
|
+
getQuestionTypeSelectorModel(beforeAdd: (type: string) => void, element?: SurveyElement): any;
|
|
1426
1463
|
getUpdatedPageAdornerFooterActions(pageAdorner: PageAdorner, actions: Array<IAction>): IAction[];
|
|
1427
1464
|
addNewQuestionInPage(beforeAdd: (string: any) => void, panel?: IPanel, type?: string): void;
|
|
1428
1465
|
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
|
|
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
|
|
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,9 +164,11 @@ 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;
|
|
169
173
|
rootElement?: HTMLElement;
|
|
170
174
|
getObjectDisplayName(obj: Base, area: string, reason: string, displayName: string): string;
|
|
@@ -193,6 +197,8 @@ export interface ISurveyCreatorOptions {
|
|
|
193
197
|
getProcessedTranslationItemText(locale: string, locString: ILocalizableString, newText: string, obj: any): string;
|
|
194
198
|
getTranslationExportedText(obj: Base, name: string, locString: ILocalizableString, locale: string, text: string): string;
|
|
195
199
|
uploadFiles(files: File[], question: Question, uploadingCallback: (status: string, data: any) => any): void;
|
|
200
|
+
getHasMachineTranslation(): boolean;
|
|
201
|
+
doMachineTranslation(fromLocale: string, toLocale: string, strings: Array<string>, callback: (translated: Array<string>) => void): void;
|
|
196
202
|
}
|
|
197
203
|
export declare class EmptySurveyCreatorOptions implements ISurveyCreatorOptions {
|
|
198
204
|
rootElement: HTMLElement;
|
|
@@ -206,9 +212,12 @@ export declare class EmptySurveyCreatorOptions implements ISurveyCreatorOptions
|
|
|
206
212
|
showObjectTitles: boolean;
|
|
207
213
|
allowEditExpressionsInTextEditor: boolean;
|
|
208
214
|
maximumColumnsCount: number;
|
|
215
|
+
minimumChoicesCount: number;
|
|
209
216
|
maximumChoicesCount: number;
|
|
210
217
|
maximumRowsCount: number;
|
|
211
218
|
maximumRateValues: number;
|
|
219
|
+
machineTranslationValue: boolean;
|
|
220
|
+
maxNestedPanels: number;
|
|
212
221
|
getObjectDisplayName(obj: Base, area: string, reason: string, displayName: string): string;
|
|
213
222
|
onCanShowPropertyCallback(object: any, property: JsonObjectProperty, showMode: string, parentObj: any, parentProperty: JsonObjectProperty): boolean;
|
|
214
223
|
onPropertyGridSurveyCreatedCallback(object: any, survey: SurveyModel): void;
|
|
@@ -234,4 +243,6 @@ export declare class EmptySurveyCreatorOptions implements ISurveyCreatorOptions
|
|
|
234
243
|
onLogicGetTitleCallback(expression: string, displayExpression: string, text: string, logicItem: any): string;
|
|
235
244
|
getTranslationExportedText(obj: Base, name: string, locString: ILocalizableString, locale: string, text: string): string;
|
|
236
245
|
uploadFiles(files: File[], question: Question, uploadingCallback: (status: string, data: any) => any): void;
|
|
246
|
+
getHasMachineTranslation(): boolean;
|
|
247
|
+
doMachineTranslation(fromLocale: string, toLocale: string, strings: Array<string>, callback: (translated: Array<string>) => void): void;
|
|
237
248
|
}
|
|
@@ -162,6 +162,8 @@ export declare var defaultStrings: {
|
|
|
162
162
|
translationNoStrings: string;
|
|
163
163
|
translationExportToSCVButton: string;
|
|
164
164
|
translationImportFromSCVButton: string;
|
|
165
|
+
translateUsigAI: string;
|
|
166
|
+
translationDialogTitle: string;
|
|
165
167
|
translationMergeLocaleWithDefault: string;
|
|
166
168
|
translationPlaceHolder: string;
|
|
167
169
|
themeExportButton: string;
|
|
@@ -192,9 +194,11 @@ export declare var defaultStrings: {
|
|
|
192
194
|
question_visibilityName: string;
|
|
193
195
|
question_enableName: string;
|
|
194
196
|
question_requireName: string;
|
|
197
|
+
question_resetValue: string;
|
|
195
198
|
column_visibilityName: string;
|
|
196
199
|
column_enableName: string;
|
|
197
200
|
column_requireName: string;
|
|
201
|
+
column_resetValue: string;
|
|
198
202
|
trigger_completeName: string;
|
|
199
203
|
trigger_setvalueName: string;
|
|
200
204
|
trigger_copyvalueName: string;
|
|
@@ -288,6 +292,7 @@ export declare var defaultStrings: {
|
|
|
288
292
|
fastEntry: string;
|
|
289
293
|
fastEntryNonUniqueError: string;
|
|
290
294
|
fastEntryChoicesCountError: string;
|
|
295
|
+
fastEntryChoicesMinCountError: string;
|
|
291
296
|
fastEntryPlaceholder: string;
|
|
292
297
|
formEntry: string;
|
|
293
298
|
testService: string;
|
|
@@ -352,6 +357,8 @@ export declare var defaultStrings: {
|
|
|
352
357
|
choicesOrder: string;
|
|
353
358
|
visible: string;
|
|
354
359
|
isRequired: string;
|
|
360
|
+
markRequired: string;
|
|
361
|
+
removeRequiredMark: string;
|
|
355
362
|
isAllRowRequired: string;
|
|
356
363
|
requiredErrorText: string;
|
|
357
364
|
startWithNewLine: string;
|
|
@@ -433,7 +440,11 @@ export declare var defaultStrings: {
|
|
|
433
440
|
imageHeight: string;
|
|
434
441
|
imageWidth: string;
|
|
435
442
|
};
|
|
443
|
+
survey: {
|
|
444
|
+
title: string;
|
|
445
|
+
};
|
|
436
446
|
page: {
|
|
447
|
+
title: string;
|
|
437
448
|
maxTimeToFinish: string;
|
|
438
449
|
};
|
|
439
450
|
question: {
|
|
@@ -930,6 +941,7 @@ export declare var defaultStrings: {
|
|
|
930
941
|
descriptionLocation: string;
|
|
931
942
|
defaultValueExpression: string;
|
|
932
943
|
requiredIf: string;
|
|
944
|
+
resetValueIf: string;
|
|
933
945
|
validators: string;
|
|
934
946
|
bindings: string;
|
|
935
947
|
renderAs: string;
|
|
@@ -1006,6 +1018,7 @@ export declare var defaultStrings: {
|
|
|
1006
1018
|
"--base-unit": string;
|
|
1007
1019
|
groupGeneral: string;
|
|
1008
1020
|
groupAdvanced: string;
|
|
1021
|
+
groupHeader: string;
|
|
1009
1022
|
themeName: string;
|
|
1010
1023
|
themeMode: string;
|
|
1011
1024
|
themeModePanels: string;
|
|
@@ -1016,11 +1029,15 @@ export declare var defaultStrings: {
|
|
|
1016
1029
|
primaryDefaultColor: string;
|
|
1017
1030
|
primaryDarkColor: string;
|
|
1018
1031
|
primaryLightColor: string;
|
|
1032
|
+
coverTitleForecolor: string;
|
|
1033
|
+
coverOverlap: string;
|
|
1019
1034
|
backgroundDimColor: string;
|
|
1020
1035
|
backgroundImage: string;
|
|
1021
1036
|
backgroundImageFitAuto: string;
|
|
1022
1037
|
backgroundImageFitCover: string;
|
|
1023
1038
|
backgroundImageFitContain: string;
|
|
1039
|
+
backgroundImageFitFill: string;
|
|
1040
|
+
backgroundImageFitTile: string;
|
|
1024
1041
|
backgroundOpacity: string;
|
|
1025
1042
|
backgroundImageAttachmentFixed: string;
|
|
1026
1043
|
backgroundImageAttachmentScroll: string;
|
|
@@ -1065,6 +1082,26 @@ export declare var defaultStrings: {
|
|
|
1065
1082
|
boxShadowInner: string;
|
|
1066
1083
|
questionShadow: string;
|
|
1067
1084
|
editorShadow: string;
|
|
1085
|
+
headerView: string;
|
|
1086
|
+
headerViewTitle: string;
|
|
1087
|
+
headerViewCover: string;
|
|
1088
|
+
coverAreaWidth: string;
|
|
1089
|
+
coverAreaWidthSurvey: string;
|
|
1090
|
+
coverAreaWidthContainer: string;
|
|
1091
|
+
coverTextWidth: string;
|
|
1092
|
+
coverBackgroundColorSwitch: string;
|
|
1093
|
+
coverBackgroundColorNone: string;
|
|
1094
|
+
coverBackgroundColorAccentColor: string;
|
|
1095
|
+
coverBackgroundColorCustom: string;
|
|
1096
|
+
horizontalAlignmentLeft: string;
|
|
1097
|
+
horizontalAlignmentCenter: string;
|
|
1098
|
+
horizontalAlignmentRight: string;
|
|
1099
|
+
verticalAlignmentTop: string;
|
|
1100
|
+
verticalAlignmentMiddle: string;
|
|
1101
|
+
verticalAlignmentBottom: string;
|
|
1102
|
+
logoPosition: string;
|
|
1103
|
+
coverTitlePosition: string;
|
|
1104
|
+
coverDescriptionPosition: string;
|
|
1068
1105
|
names: {
|
|
1069
1106
|
default: string;
|
|
1070
1107
|
sharp: string;
|
|
@@ -132,6 +132,8 @@ export declare var enStrings: {
|
|
|
132
132
|
translationNoStrings: string;
|
|
133
133
|
translationExportToSCVButton: string;
|
|
134
134
|
translationImportFromSCVButton: string;
|
|
135
|
+
translateUsigAI: string;
|
|
136
|
+
translationDialogTitle: string;
|
|
135
137
|
translationMergeLocaleWithDefault: string;
|
|
136
138
|
translationPlaceHolder: string;
|
|
137
139
|
themeExportButton: string;
|
|
@@ -162,9 +164,11 @@ export declare var enStrings: {
|
|
|
162
164
|
question_visibilityName: string;
|
|
163
165
|
question_enableName: string;
|
|
164
166
|
question_requireName: string;
|
|
167
|
+
question_resetValue: string;
|
|
165
168
|
column_visibilityName: string;
|
|
166
169
|
column_enableName: string;
|
|
167
170
|
column_requireName: string;
|
|
171
|
+
column_resetValue: string;
|
|
168
172
|
trigger_completeName: string;
|
|
169
173
|
trigger_setvalueName: string;
|
|
170
174
|
trigger_copyvalueName: string;
|
|
@@ -258,6 +262,7 @@ export declare var enStrings: {
|
|
|
258
262
|
fastEntry: string;
|
|
259
263
|
fastEntryNonUniqueError: string;
|
|
260
264
|
fastEntryChoicesCountError: string;
|
|
265
|
+
fastEntryChoicesMinCountError: string;
|
|
261
266
|
fastEntryPlaceholder: string;
|
|
262
267
|
formEntry: string;
|
|
263
268
|
testService: string;
|
|
@@ -322,6 +327,8 @@ export declare var enStrings: {
|
|
|
322
327
|
choicesOrder: string;
|
|
323
328
|
visible: string;
|
|
324
329
|
isRequired: string;
|
|
330
|
+
markRequired: string;
|
|
331
|
+
removeRequiredMark: string;
|
|
325
332
|
isAllRowRequired: string;
|
|
326
333
|
requiredErrorText: string;
|
|
327
334
|
startWithNewLine: string;
|
|
@@ -403,7 +410,11 @@ export declare var enStrings: {
|
|
|
403
410
|
imageHeight: string;
|
|
404
411
|
imageWidth: string;
|
|
405
412
|
};
|
|
413
|
+
survey: {
|
|
414
|
+
title: string;
|
|
415
|
+
};
|
|
406
416
|
page: {
|
|
417
|
+
title: string;
|
|
407
418
|
maxTimeToFinish: string;
|
|
408
419
|
};
|
|
409
420
|
question: {
|
|
@@ -900,6 +911,7 @@ export declare var enStrings: {
|
|
|
900
911
|
descriptionLocation: string;
|
|
901
912
|
defaultValueExpression: string;
|
|
902
913
|
requiredIf: string;
|
|
914
|
+
resetValueIf: string;
|
|
903
915
|
validators: string;
|
|
904
916
|
bindings: string;
|
|
905
917
|
renderAs: string;
|
|
@@ -976,6 +988,7 @@ export declare var enStrings: {
|
|
|
976
988
|
"--base-unit": string;
|
|
977
989
|
groupGeneral: string;
|
|
978
990
|
groupAdvanced: string;
|
|
991
|
+
groupHeader: string;
|
|
979
992
|
themeName: string;
|
|
980
993
|
themeMode: string;
|
|
981
994
|
themeModePanels: string;
|
|
@@ -986,11 +999,15 @@ export declare var enStrings: {
|
|
|
986
999
|
primaryDefaultColor: string;
|
|
987
1000
|
primaryDarkColor: string;
|
|
988
1001
|
primaryLightColor: string;
|
|
1002
|
+
coverTitleForecolor: string;
|
|
1003
|
+
coverOverlap: string;
|
|
989
1004
|
backgroundDimColor: string;
|
|
990
1005
|
backgroundImage: string;
|
|
991
1006
|
backgroundImageFitAuto: string;
|
|
992
1007
|
backgroundImageFitCover: string;
|
|
993
1008
|
backgroundImageFitContain: string;
|
|
1009
|
+
backgroundImageFitFill: string;
|
|
1010
|
+
backgroundImageFitTile: string;
|
|
994
1011
|
backgroundOpacity: string;
|
|
995
1012
|
backgroundImageAttachmentFixed: string;
|
|
996
1013
|
backgroundImageAttachmentScroll: string;
|
|
@@ -1035,6 +1052,26 @@ export declare var enStrings: {
|
|
|
1035
1052
|
boxShadowInner: string;
|
|
1036
1053
|
questionShadow: string;
|
|
1037
1054
|
editorShadow: string;
|
|
1055
|
+
headerView: string;
|
|
1056
|
+
headerViewTitle: string;
|
|
1057
|
+
headerViewCover: string;
|
|
1058
|
+
coverAreaWidth: string;
|
|
1059
|
+
coverAreaWidthSurvey: string;
|
|
1060
|
+
coverAreaWidthContainer: string;
|
|
1061
|
+
coverTextWidth: string;
|
|
1062
|
+
coverBackgroundColorSwitch: string;
|
|
1063
|
+
coverBackgroundColorNone: string;
|
|
1064
|
+
coverBackgroundColorAccentColor: string;
|
|
1065
|
+
coverBackgroundColorCustom: string;
|
|
1066
|
+
horizontalAlignmentLeft: string;
|
|
1067
|
+
horizontalAlignmentCenter: string;
|
|
1068
|
+
horizontalAlignmentRight: string;
|
|
1069
|
+
verticalAlignmentTop: string;
|
|
1070
|
+
verticalAlignmentMiddle: string;
|
|
1071
|
+
verticalAlignmentBottom: string;
|
|
1072
|
+
logoPosition: string;
|
|
1073
|
+
coverTitlePosition: string;
|
|
1074
|
+
coverDescriptionPosition: string;
|
|
1038
1075
|
names: {
|
|
1039
1076
|
default: string;
|
|
1040
1077
|
sharp: string;
|
|
@@ -31,6 +31,7 @@ export declare abstract class PropertyGridEditorMatrix extends PropertyGridEdito
|
|
|
31
31
|
getJSON(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
|
|
32
32
|
protected getMatrixJSON(obj: Base, prop: JsonObjectProperty, propNames: Array<string>, options: ISurveyCreatorOptions): any;
|
|
33
33
|
protected getEmptyRowsText(prop: JsonObjectProperty): string;
|
|
34
|
+
protected getMinimumRowCount(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): number;
|
|
34
35
|
protected getMaximumRowCount(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): number;
|
|
35
36
|
protected filterPropertyNames(propNames: Array<string>): string[];
|
|
36
37
|
protected getColumnsJSON(obj: Base, prop: JsonObjectProperty, propNames: Array<string>, options: ISurveyCreatorOptions): any;
|
|
@@ -51,6 +52,7 @@ export declare class PropertyGridEditorMatrixItemValues extends PropertyGridEdit
|
|
|
51
52
|
protected getDefaulColumnNames(): Array<string>;
|
|
52
53
|
protected getKeyValue(): string;
|
|
53
54
|
protected getMatrixJSON(obj: Base, prop: JsonObjectProperty, propNames: Array<string>, options: ISurveyCreatorOptions): any;
|
|
55
|
+
protected getMinimumRowCount(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): number;
|
|
54
56
|
protected getMaximumRowCount(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): number;
|
|
55
57
|
private hasMultipleLanguage;
|
|
56
58
|
private hasVisibleIfOrEnableIf;
|
|
@@ -16,6 +16,7 @@ export declare class DragDropSurveyElements extends DragDropCore<any> {
|
|
|
16
16
|
protected dragOverLocation: DragTypeOverMeEnum;
|
|
17
17
|
protected get draggedElementType(): string;
|
|
18
18
|
protected isDraggedElementSelected: boolean;
|
|
19
|
+
maxNestedPanels: number;
|
|
19
20
|
startDragToolboxItem(event: PointerEvent, draggedElementJson: JsonObject, toolboxItemModel: IQuestionToolboxItem): void;
|
|
20
21
|
startDragSurveyElement(event: PointerEvent, draggedElement: any, isElementSelected?: boolean): void;
|
|
21
22
|
protected getShortcutText(draggedElement: IShortcutText): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Base, ISurveyElement, ItemValue, JsonObjectProperty, SurveyModel } from "survey-core";
|
|
1
|
+
import { Base, ISurveyElement, ItemValue, JsonObjectProperty, SurveyElement, SurveyModel } from "survey-core";
|
|
2
2
|
import { ISurveyCreatorOptions } from "./creator-settings";
|
|
3
3
|
export declare enum ObjType {
|
|
4
4
|
Unknown = 0,
|
|
@@ -44,4 +44,5 @@ export declare class SurveyHelper {
|
|
|
44
44
|
name: string;
|
|
45
45
|
};
|
|
46
46
|
static isSupportCellEditor(type: string): boolean;
|
|
47
|
+
static getElementDeepLength(element: SurveyElement): number;
|
|
47
48
|
}
|
package/typings/toolbox.d.ts
CHANGED