survey-creator-core 1.9.31 → 1.9.34
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/README.md +2 -2
- package/package.json +1 -1
- package/survey-creator-core.css +51 -18
- package/survey-creator-core.d.ts +85 -12
- package/survey-creator-core.i18n.js +624 -113
- package/survey-creator-core.i18n.min.js +2 -2
- package/survey-creator-core.js +331 -286
- package/survey-creator-core.min.css +10 -10
- package/survey-creator-core.min.js +3 -3
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.34
|
|
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,43 @@ 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
|
+
showHeaderInEmptySurvey?: boolean;
|
|
96
|
+
allowModifyPages?: boolean;
|
|
97
|
+
maximumColumnsCount?: number;
|
|
98
|
+
maximumChoicesCount?: number;
|
|
99
|
+
maximumRowsCount?: number;
|
|
100
|
+
maximumRateValues?: number;
|
|
101
|
+
maxLogicItemsInCondition?: number;
|
|
102
|
+
}
|
|
103
|
+
/*
|
|
67
104
|
* The Toolbox item description.
|
|
68
105
|
*/
|
|
69
106
|
export interface IQuestionToolboxItem extends IAction {
|
|
@@ -209,8 +246,6 @@ export interface IKeyboardShortcut {
|
|
|
209
246
|
macOsHotkey?: any;
|
|
210
247
|
execute: (context: any) => void;
|
|
211
248
|
}
|
|
212
|
-
export interface ICreatorOptions {
|
|
213
|
-
}
|
|
214
249
|
export interface ICreatorPlugin {
|
|
215
250
|
activate: any;
|
|
216
251
|
update?: any;
|
|
@@ -334,6 +369,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
334
369
|
* You can set this option in creator constructor only
|
|
335
370
|
*/
|
|
336
371
|
get pageEditMode(): "standard" | "single" | "bypage";
|
|
372
|
+
set pageEditMode(val: "standard" | "single" | "bypage");
|
|
337
373
|
surveyValue: SurveyModel;
|
|
338
374
|
get toolbarItems(): any;
|
|
339
375
|
get toolbar(): any;
|
|
@@ -578,7 +614,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
578
614
|
*/
|
|
579
615
|
onPropertyValueChanging: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
580
616
|
/*
|
|
581
|
-
* An event that is raised after a property in a survey object has changed.
|
|
617
|
+
* An event that is raised after a property in a survey object has changed.
|
|
582
618
|
*
|
|
583
619
|
* - `sender`- A Survey Creator instance that raised the event.
|
|
584
620
|
* - `options.obj` - A survey object instance (question or panel) whose property has changed.
|
|
@@ -753,6 +789,22 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
753
789
|
*/
|
|
754
790
|
onDragDropAllow: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
755
791
|
/*
|
|
792
|
+
* Use this event to override/disable element adorners - wrapping component name.
|
|
793
|
+
* <br/> sender the survey creator object that fires the event.
|
|
794
|
+
* <br/> options.element a survey object to be wrapped.
|
|
795
|
+
* <br/> options.reason why we need to wrap an element.
|
|
796
|
+
* <br/> options.conponentName component wrapper name.
|
|
797
|
+
*/
|
|
798
|
+
onGetElementWrapperComponentName: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
799
|
+
/*
|
|
800
|
+
* Use this event to override/disable element adorners - wrapping component data.
|
|
801
|
+
* <br/> sender the survey creator object that fires the event.
|
|
802
|
+
* <br/> options.element a survey object to be wrapped.
|
|
803
|
+
* <br/> options.reason why we need to wrap an element.
|
|
804
|
+
* <br/> options.conponentData component wrapper data.
|
|
805
|
+
*/
|
|
806
|
+
onGetElementWrapperComponentData: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
807
|
+
/*
|
|
756
808
|
* This callback is used internally for providing survey JSON text.
|
|
757
809
|
*/
|
|
758
810
|
getSurveyJSONTextCallback: any;
|
|
@@ -968,7 +1020,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
968
1020
|
addPage(pagetoAdd?: PageModel): PageModel;
|
|
969
1021
|
protected initTabs(): void;
|
|
970
1022
|
getOptions(): ICreatorOptions;
|
|
971
|
-
protected setOptions(options:
|
|
1023
|
+
protected setOptions(options: ICreatorOptions): void;
|
|
972
1024
|
isCanModifyProperty(obj: Base, propertyName: string): boolean;
|
|
973
1025
|
onIsPropertyReadOnlyCallback(obj: Base, property: JsonObjectProperty, readOnly: boolean, parentObj: Base, parentProperty: JsonObjectProperty): boolean;
|
|
974
1026
|
/*
|
|
@@ -1153,6 +1205,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1153
1205
|
protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
|
|
1154
1206
|
initResponsivityManager(container: any): void;
|
|
1155
1207
|
resetResponsivityManager(): void;
|
|
1208
|
+
showHeaderInEmptySurvey: any;
|
|
1156
1209
|
showPageNavigator: any;
|
|
1157
1210
|
showTabs: any;
|
|
1158
1211
|
showToolbar: any;
|
|
@@ -1511,7 +1564,6 @@ export declare class QuestionToolbox extends AdaptiveActionContainer<QuestionToo
|
|
|
1511
1564
|
static defaultIconName: string;
|
|
1512
1565
|
_orderedQuestions: any;
|
|
1513
1566
|
static getQuestionDefaultSettings(questionType: string): any;
|
|
1514
|
-
static _questionDefaultSettings: any;
|
|
1515
1567
|
/*
|
|
1516
1568
|
* Modify this array to change the toolbox items order.
|
|
1517
1569
|
*/
|
|
@@ -2218,6 +2270,7 @@ export declare class Translation extends Base implements ITranslationLocales {
|
|
|
2218
2270
|
get settingsSurvey(): SurveyModel;
|
|
2219
2271
|
get localesQuestion(): QuestionCheckboxModel;
|
|
2220
2272
|
protected createSettingsSurvey(): SurveyModel;
|
|
2273
|
+
isChooseLanguageEnabled: boolean;
|
|
2221
2274
|
getSurveyLocales(): any;
|
|
2222
2275
|
protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
|
|
2223
2276
|
get survey(): SurveyModel;
|
|
@@ -2706,6 +2759,8 @@ export declare class ConditionEditor extends PropertyEditorSetupValue {
|
|
|
2706
2759
|
constructor(survey: SurveyModel, object?: Base, options?: ISurveyCreatorOptions, propertyName?: string);
|
|
2707
2760
|
static canParseExpression(text: string): boolean;
|
|
2708
2761
|
static canBuildExpression(text: string): boolean;
|
|
2762
|
+
static isOperatorEnabled(qType: string, operatorTypes: any): boolean;
|
|
2763
|
+
static isClassContains(qType: string, contains: any, notContains: any): boolean;
|
|
2709
2764
|
objectValue: Base;
|
|
2710
2765
|
surveyValue: SurveyModel;
|
|
2711
2766
|
contextValue: Question;
|
|
@@ -2832,8 +2887,6 @@ export declare class PropertyGridEditorMatrix extends PropertyGridEditor {
|
|
|
2832
2887
|
onMatrixCellCreated(obj: Base, options: any): void;
|
|
2833
2888
|
onGetMatrixRowAction(obj: Base, options: any, setObjFunc: (obj: Base) => void): void;
|
|
2834
2889
|
onGetQuestionTitleActions(obj: Base, options: any): void;
|
|
2835
|
-
onValueChanged(obj: Base, prop: JsonObjectProperty, question: Question): void;
|
|
2836
|
-
protected updateTitleActions(question: Question): void;
|
|
2837
2890
|
protected createNewItem(matrix: QuestionMatrixDynamicModel, prop: JsonObjectProperty): Base;
|
|
2838
2891
|
protected getDefaultClassName(prop: JsonObjectProperty): string;
|
|
2839
2892
|
protected getBaseValue(prop: JsonObjectProperty): string;
|
|
@@ -3110,7 +3163,6 @@ export declare class PropertyGridTriggerValueInLogicEditor extends PropertyGridT
|
|
|
3110
3163
|
fit(prop: JsonObjectProperty, context?: string): boolean;
|
|
3111
3164
|
getJSON(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
|
|
3112
3165
|
}
|
|
3113
|
-
export declare function getLocString(strName: string, locale?: string): string;
|
|
3114
3166
|
export declare function getNextValue(prefix: string, values: any): string | number;
|
|
3115
3167
|
export declare function findParentNode(className: string, sourceNode: any): any;
|
|
3116
3168
|
export declare function focusFirstControl(renderedElements: any): void;
|
|
@@ -3125,6 +3177,8 @@ export declare function copyObject(dst: any, src: any): void;
|
|
|
3125
3177
|
export declare function copyCssClasses(dest: any, source: any): void;
|
|
3126
3178
|
export declare function assignDefaultV2Classes(destination: any, questionType: string): void;
|
|
3127
3179
|
export declare function wrapTextByCurlyBraces(text: string): string;
|
|
3180
|
+
export declare function capitalize(str: string): string;
|
|
3181
|
+
export declare function getLocString(strName: string, locale?: string): string;
|
|
3128
3182
|
export declare function getLogicString(name: string): string;
|
|
3129
3183
|
export declare function parsePropertyDescription(text: string): string;
|
|
3130
3184
|
export declare function setSurveyJSONForPropertyGrid(json: any, updateOnTyping?: boolean, titleLocationLeft?: boolean): void;
|
|
@@ -3139,8 +3193,8 @@ export declare function getItemValueWrapperComponentName(item: ItemValue, questi
|
|
|
3139
3193
|
export declare function getItemValueWrapperComponentData(item: ItemValue, question: QuestionSelectBase, creator: CreatorBase): any;
|
|
3140
3194
|
export declare function isStringEditable(element: any, name: string): boolean;
|
|
3141
3195
|
export declare function isTextInput(target: any): boolean;
|
|
3142
|
-
export declare
|
|
3143
|
-
export declare
|
|
3196
|
+
export declare function registerAdorner(name: any, adorner: any): void;
|
|
3197
|
+
export declare function removeAdorners(names?: any): void;
|
|
3144
3198
|
export declare var settings: {
|
|
3145
3199
|
translation: {
|
|
3146
3200
|
sortByName: boolean,
|
|
@@ -3195,6 +3249,19 @@ export declare var settings: {
|
|
|
3195
3249
|
maximumRateValues: number,
|
|
3196
3250
|
generalTabName: string,
|
|
3197
3251
|
},
|
|
3252
|
+
toolbox: {
|
|
3253
|
+
/*
|
|
3254
|
+
* Use it to change the default question JSON on dropping it into designer or converting questions
|
|
3255
|
+
*/
|
|
3256
|
+
defaultJSON: {
|
|
3257
|
+
imagepicker: {
|
|
3258
|
+
choices: any,
|
|
3259
|
+
},
|
|
3260
|
+
image: {
|
|
3261
|
+
imageLink: string,
|
|
3262
|
+
},
|
|
3263
|
+
},
|
|
3264
|
+
},
|
|
3198
3265
|
/*
|
|
3199
3266
|
* Notification settings
|
|
3200
3267
|
*/
|
|
@@ -3239,6 +3306,8 @@ export declare var opositeValues: {
|
|
|
3239
3306
|
No: string,
|
|
3240
3307
|
NO: string,
|
|
3241
3308
|
};
|
|
3309
|
+
export declare var editorLocalization: EditorLocalization;
|
|
3310
|
+
export declare var defaultStrings: any;
|
|
3242
3311
|
export declare var propertyGridCss: {
|
|
3243
3312
|
root: string,
|
|
3244
3313
|
container: string,
|
|
@@ -3382,11 +3451,11 @@ export declare var propertyGridCss: {
|
|
|
3382
3451
|
mainRoot: string,
|
|
3383
3452
|
root: string,
|
|
3384
3453
|
item: string,
|
|
3385
|
-
control: string,
|
|
3386
3454
|
itemChecked: string,
|
|
3387
3455
|
itemIndeterminate: string,
|
|
3388
3456
|
itemDisabled: string,
|
|
3389
3457
|
svgIconId: string,
|
|
3458
|
+
controlCheckbox: string,
|
|
3390
3459
|
label: string,
|
|
3391
3460
|
disabledLabel: string,
|
|
3392
3461
|
itemDecorator: string,
|
|
@@ -3510,6 +3579,9 @@ export declare var propertyGridCss: {
|
|
|
3510
3579
|
controls: string,
|
|
3511
3580
|
clearButton: string,
|
|
3512
3581
|
},
|
|
3582
|
+
propertygrid_restfull: {
|
|
3583
|
+
content: string,
|
|
3584
|
+
},
|
|
3513
3585
|
saveData: {
|
|
3514
3586
|
root: string,
|
|
3515
3587
|
saving: string,
|
|
@@ -4226,6 +4298,7 @@ export declare var logicCss: {
|
|
|
4226
4298
|
controlDisabled: string,
|
|
4227
4299
|
controlLabel: string,
|
|
4228
4300
|
materialDecorator: string,
|
|
4301
|
+
controlValue: string,
|
|
4229
4302
|
},
|
|
4230
4303
|
imagepicker: {
|
|
4231
4304
|
root: string,
|