survey-creator-core 1.9.31 → 1.9.32
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 +34 -11
- package/survey-creator-core.d.ts +63 -9
- package/survey-creator-core.i18n.js +624 -113
- package/survey-creator-core.i18n.min.js +2 -2
- package/survey-creator-core.js +205 -247
- package/survey-creator-core.min.css +7 -7
- 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.32
|
|
3
3
|
* Copyright (c) 2015-2022 Devsoft Baltic OÜ - https://surveyjs.io/
|
|
4
4
|
* License: https://surveyjs.io/Licenses#SurveyCreator
|
|
5
5
|
*/
|
|
@@ -64,6 +64,42 @@ export interface ISurveyCreatorOptions {
|
|
|
64
64
|
onConditionGetTitleCallback(expression: string, title: string): string;
|
|
65
65
|
}
|
|
66
66
|
/*
|
|
67
|
+
* Creator options that you can pass in Creator constructor
|
|
68
|
+
*/
|
|
69
|
+
export interface ICreatorOptions {
|
|
70
|
+
showDesignerTab?: boolean;
|
|
71
|
+
showPreviewTab?: boolean;
|
|
72
|
+
showJSONEditorTab?: boolean;
|
|
73
|
+
showLogicTab?: boolean;
|
|
74
|
+
showEmbeddedSurveyTab?: boolean;
|
|
75
|
+
showTranslationTab?: boolean;
|
|
76
|
+
haveCommercialLicense?: boolean;
|
|
77
|
+
isAutoSave?: boolean;
|
|
78
|
+
isRTLValue?: boolean;
|
|
79
|
+
allowEditSurveyTitle?: boolean;
|
|
80
|
+
allowEditExpressionsInTextEditor?: boolean;
|
|
81
|
+
showOptions?: boolean;
|
|
82
|
+
showTitlesInExpressions?: boolean;
|
|
83
|
+
useTabsInElementEditor?: boolean;
|
|
84
|
+
showErrorOnFailedSave?: boolean;
|
|
85
|
+
generateValidJSON?: boolean;
|
|
86
|
+
readOnly?: boolean;
|
|
87
|
+
showPagesInTestSurveyTab?: boolean;
|
|
88
|
+
showPagesInPreviewTab?: boolean;
|
|
89
|
+
showSimulatorInTestSurveyTab?: boolean;
|
|
90
|
+
themeForPreview?: string;
|
|
91
|
+
showSimulatorInPreviewTab?: boolean;
|
|
92
|
+
showDefaultLanguageInPreviewTab?: string | boolean;
|
|
93
|
+
showInvisibleElementsInPreviewTab?: boolean;
|
|
94
|
+
showObjectTitles?: boolean;
|
|
95
|
+
allowModifyPages?: boolean;
|
|
96
|
+
maximumColumnsCount?: number;
|
|
97
|
+
maximumChoicesCount?: number;
|
|
98
|
+
maximumRowsCount?: number;
|
|
99
|
+
maximumRateValues?: number;
|
|
100
|
+
maxLogicItemsInCondition?: number;
|
|
101
|
+
}
|
|
102
|
+
/*
|
|
67
103
|
* The Toolbox item description.
|
|
68
104
|
*/
|
|
69
105
|
export interface IQuestionToolboxItem extends IAction {
|
|
@@ -209,8 +245,6 @@ export interface IKeyboardShortcut {
|
|
|
209
245
|
macOsHotkey?: any;
|
|
210
246
|
execute: (context: any) => void;
|
|
211
247
|
}
|
|
212
|
-
export interface ICreatorOptions {
|
|
213
|
-
}
|
|
214
248
|
export interface ICreatorPlugin {
|
|
215
249
|
activate: any;
|
|
216
250
|
update?: any;
|
|
@@ -334,6 +368,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
334
368
|
* You can set this option in creator constructor only
|
|
335
369
|
*/
|
|
336
370
|
get pageEditMode(): "standard" | "single" | "bypage";
|
|
371
|
+
set pageEditMode(val: "standard" | "single" | "bypage");
|
|
337
372
|
surveyValue: SurveyModel;
|
|
338
373
|
get toolbarItems(): any;
|
|
339
374
|
get toolbar(): any;
|
|
@@ -578,7 +613,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
578
613
|
*/
|
|
579
614
|
onPropertyValueChanging: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
580
615
|
/*
|
|
581
|
-
* An event that is raised after a property in a survey object has changed.
|
|
616
|
+
* An event that is raised after a property in a survey object has changed.
|
|
582
617
|
*
|
|
583
618
|
* - `sender`- A Survey Creator instance that raised the event.
|
|
584
619
|
* - `options.obj` - A survey object instance (question or panel) whose property has changed.
|
|
@@ -968,7 +1003,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
968
1003
|
addPage(pagetoAdd?: PageModel): PageModel;
|
|
969
1004
|
protected initTabs(): void;
|
|
970
1005
|
getOptions(): ICreatorOptions;
|
|
971
|
-
protected setOptions(options:
|
|
1006
|
+
protected setOptions(options: ICreatorOptions): void;
|
|
972
1007
|
isCanModifyProperty(obj: Base, propertyName: string): boolean;
|
|
973
1008
|
onIsPropertyReadOnlyCallback(obj: Base, property: JsonObjectProperty, readOnly: boolean, parentObj: Base, parentProperty: JsonObjectProperty): boolean;
|
|
974
1009
|
/*
|
|
@@ -1511,7 +1546,6 @@ export declare class QuestionToolbox extends AdaptiveActionContainer<QuestionToo
|
|
|
1511
1546
|
static defaultIconName: string;
|
|
1512
1547
|
_orderedQuestions: any;
|
|
1513
1548
|
static getQuestionDefaultSettings(questionType: string): any;
|
|
1514
|
-
static _questionDefaultSettings: any;
|
|
1515
1549
|
/*
|
|
1516
1550
|
* Modify this array to change the toolbox items order.
|
|
1517
1551
|
*/
|
|
@@ -2218,6 +2252,7 @@ export declare class Translation extends Base implements ITranslationLocales {
|
|
|
2218
2252
|
get settingsSurvey(): SurveyModel;
|
|
2219
2253
|
get localesQuestion(): QuestionCheckboxModel;
|
|
2220
2254
|
protected createSettingsSurvey(): SurveyModel;
|
|
2255
|
+
isChooseLanguageEnabled: boolean;
|
|
2221
2256
|
getSurveyLocales(): any;
|
|
2222
2257
|
protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
|
|
2223
2258
|
get survey(): SurveyModel;
|
|
@@ -2706,6 +2741,8 @@ export declare class ConditionEditor extends PropertyEditorSetupValue {
|
|
|
2706
2741
|
constructor(survey: SurveyModel, object?: Base, options?: ISurveyCreatorOptions, propertyName?: string);
|
|
2707
2742
|
static canParseExpression(text: string): boolean;
|
|
2708
2743
|
static canBuildExpression(text: string): boolean;
|
|
2744
|
+
static isOperatorEnabled(qType: string, operatorTypes: any): boolean;
|
|
2745
|
+
static isClassContains(qType: string, contains: any, notContains: any): boolean;
|
|
2709
2746
|
objectValue: Base;
|
|
2710
2747
|
surveyValue: SurveyModel;
|
|
2711
2748
|
contextValue: Question;
|
|
@@ -3110,7 +3147,6 @@ export declare class PropertyGridTriggerValueInLogicEditor extends PropertyGridT
|
|
|
3110
3147
|
fit(prop: JsonObjectProperty, context?: string): boolean;
|
|
3111
3148
|
getJSON(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
|
|
3112
3149
|
}
|
|
3113
|
-
export declare function getLocString(strName: string, locale?: string): string;
|
|
3114
3150
|
export declare function getNextValue(prefix: string, values: any): string | number;
|
|
3115
3151
|
export declare function findParentNode(className: string, sourceNode: any): any;
|
|
3116
3152
|
export declare function focusFirstControl(renderedElements: any): void;
|
|
@@ -3125,6 +3161,8 @@ export declare function copyObject(dst: any, src: any): void;
|
|
|
3125
3161
|
export declare function copyCssClasses(dest: any, source: any): void;
|
|
3126
3162
|
export declare function assignDefaultV2Classes(destination: any, questionType: string): void;
|
|
3127
3163
|
export declare function wrapTextByCurlyBraces(text: string): string;
|
|
3164
|
+
export declare function capitalize(str: string): string;
|
|
3165
|
+
export declare function getLocString(strName: string, locale?: string): string;
|
|
3128
3166
|
export declare function getLogicString(name: string): string;
|
|
3129
3167
|
export declare function parsePropertyDescription(text: string): string;
|
|
3130
3168
|
export declare function setSurveyJSONForPropertyGrid(json: any, updateOnTyping?: boolean, titleLocationLeft?: boolean): void;
|
|
@@ -3139,8 +3177,6 @@ export declare function getItemValueWrapperComponentName(item: ItemValue, questi
|
|
|
3139
3177
|
export declare function getItemValueWrapperComponentData(item: ItemValue, question: QuestionSelectBase, creator: CreatorBase): any;
|
|
3140
3178
|
export declare function isStringEditable(element: any, name: string): boolean;
|
|
3141
3179
|
export declare function isTextInput(target: any): boolean;
|
|
3142
|
-
export declare var editorLocalization: EditorLocalization;
|
|
3143
|
-
export declare var defaultStrings: any;
|
|
3144
3180
|
export declare var settings: {
|
|
3145
3181
|
translation: {
|
|
3146
3182
|
sortByName: boolean,
|
|
@@ -3195,6 +3231,19 @@ export declare var settings: {
|
|
|
3195
3231
|
maximumRateValues: number,
|
|
3196
3232
|
generalTabName: string,
|
|
3197
3233
|
},
|
|
3234
|
+
toolbox: {
|
|
3235
|
+
/*
|
|
3236
|
+
* Use it to change the default question JSON on dropping it into designer or converting questions
|
|
3237
|
+
*/
|
|
3238
|
+
defaultJSON: {
|
|
3239
|
+
imagepicker: {
|
|
3240
|
+
choices: any,
|
|
3241
|
+
},
|
|
3242
|
+
image: {
|
|
3243
|
+
imageLink: string,
|
|
3244
|
+
},
|
|
3245
|
+
},
|
|
3246
|
+
},
|
|
3198
3247
|
/*
|
|
3199
3248
|
* Notification settings
|
|
3200
3249
|
*/
|
|
@@ -3239,6 +3288,8 @@ export declare var opositeValues: {
|
|
|
3239
3288
|
No: string,
|
|
3240
3289
|
NO: string,
|
|
3241
3290
|
};
|
|
3291
|
+
export declare var editorLocalization: EditorLocalization;
|
|
3292
|
+
export declare var defaultStrings: any;
|
|
3242
3293
|
export declare var propertyGridCss: {
|
|
3243
3294
|
root: string,
|
|
3244
3295
|
container: string,
|
|
@@ -3510,6 +3561,9 @@ export declare var propertyGridCss: {
|
|
|
3510
3561
|
controls: string,
|
|
3511
3562
|
clearButton: string,
|
|
3512
3563
|
},
|
|
3564
|
+
propertygrid_restfull: {
|
|
3565
|
+
content: string,
|
|
3566
|
+
},
|
|
3513
3567
|
saveData: {
|
|
3514
3568
|
root: string,
|
|
3515
3569
|
saving: string,
|