survey-creator-core 1.9.99 → 1.9.101
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 +52 -5
- package/survey-creator-core.fontless.css +51 -4
- package/survey-creator-core.fontless.css.map +1 -1
- package/survey-creator-core.fontless.min.css +6 -6
- package/survey-creator-core.i18n.js +1 -1
- package/survey-creator-core.i18n.min.js +1 -1
- package/survey-creator-core.js +458 -312
- package/survey-creator-core.js.map +1 -1
- package/survey-creator-core.min.css +7 -7
- package/survey-creator-core.min.js +3 -3
- package/typings/components/tabs/json-editor-ace.d.ts +1 -0
- package/typings/components/tabs/json-editor-plugin.d.ts +8 -2
- package/typings/components/tabs/json-editor-textarea.d.ts +2 -0
- package/typings/creator-base.d.ts +79 -60
- package/typings/creator-options.d.ts +1 -1
- package/typings/creator-settings.d.ts +2 -0
- package/typings/editorLocalization.d.ts +9 -8
- package/typings/localization/english.d.ts +9 -8
- package/typings/property-grid/matrices.d.ts +3 -3
- package/typings/survey-helper.d.ts +2 -1
- package/typings/textWorker.d.ts +16 -3
|
@@ -13,6 +13,7 @@ export declare class AceJsonEditorModel extends JsonEditorBaseModel {
|
|
|
13
13
|
protected onTextChanged(): void;
|
|
14
14
|
private createAnnotations;
|
|
15
15
|
protected setErrors(errors: any[]): void;
|
|
16
|
+
protected gotoError(at: number, row: number, column: number): void;
|
|
16
17
|
onEditorActivated(): void;
|
|
17
18
|
}
|
|
18
19
|
export declare class TabJsonEditorAcePlugin extends TabJsonEditorBasePlugin implements ICreatorPlugin {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { Base } from "survey-core";
|
|
1
|
+
import { Base, ListModel } from "survey-core";
|
|
2
2
|
import { ICreatorPlugin, CreatorBase } from "../../creator-base";
|
|
3
|
+
import { SurveyTextWorkerError } from "../../textWorker";
|
|
3
4
|
export declare abstract class JsonEditorBaseModel extends Base {
|
|
4
5
|
protected creator: CreatorBase;
|
|
5
6
|
isJSONChanged: boolean;
|
|
6
7
|
isProcessingImmediately: boolean;
|
|
7
8
|
private static updateTextTimeout;
|
|
8
9
|
private jsonEditorChangedTimeoutId;
|
|
10
|
+
hasErrors: boolean;
|
|
9
11
|
constructor(creator: CreatorBase);
|
|
10
12
|
get text(): string;
|
|
11
13
|
set text(val: string);
|
|
@@ -14,7 +16,11 @@ export declare abstract class JsonEditorBaseModel extends Base {
|
|
|
14
16
|
protected onEditorActivated(): void;
|
|
15
17
|
onPluginActivate(): void;
|
|
16
18
|
protected onTextChanged(): void;
|
|
17
|
-
|
|
19
|
+
private errorListValue;
|
|
20
|
+
get errorList(): ListModel;
|
|
21
|
+
protected setErrors(errors: Array<SurveyTextWorkerError>): void;
|
|
22
|
+
protected gotoError(at: number, row: number, column: number): void;
|
|
23
|
+
private createErrorActions;
|
|
18
24
|
processErrors(text: string): void;
|
|
19
25
|
get readOnly(): boolean;
|
|
20
26
|
}
|
|
@@ -4,11 +4,13 @@ export declare class TextareaJsonEditorModel extends JsonEditorBaseModel {
|
|
|
4
4
|
protected _text: string;
|
|
5
5
|
private _errors;
|
|
6
6
|
ariaLabel: string;
|
|
7
|
+
textElement: HTMLTextAreaElement;
|
|
7
8
|
canShowErrors: boolean;
|
|
8
9
|
constructor(creator: CreatorBase);
|
|
9
10
|
checkKey(data: any, e: any): boolean;
|
|
10
11
|
protected getText(): string;
|
|
11
12
|
protected setText(value: string): void;
|
|
13
|
+
protected gotoError(at: number, row: number, column: number): void;
|
|
12
14
|
get errorButtonText(): string;
|
|
13
15
|
toggleErrors(): void;
|
|
14
16
|
get userFriendlyErrors(): any[];
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Base, SurveyModel, Question, PageModel, IElement, JsonObjectProperty, ActionContainer, AdaptiveActionContainer, IAction, Action, IPanel, SurveyElement, ItemValue, QuestionSelectBase, LocalizableString, ILocalizableString, ILocalizableOwner, PopupBaseViewModel, EventBase, ITheme } from "survey-core";
|
|
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";
|
|
3
2
|
import { ISurveyCreatorOptions, ICollectionItemAllowOperations } from "./creator-settings";
|
|
4
3
|
import { DragDropChoices } from "survey-core";
|
|
5
4
|
import { QuestionToolbox } from "./toolbox";
|
|
@@ -7,6 +6,7 @@ import { PropertyGridModel } from "./property-grid";
|
|
|
7
6
|
import { ICreatorSelectionOwner } from "./selection-owner";
|
|
8
7
|
import { SelectionHistory } from "./selection-history";
|
|
9
8
|
import { SurveyLogic } from "./components/tabs/logic";
|
|
9
|
+
import { Notifier } from "survey-core";
|
|
10
10
|
import { UndoRedoManager } from "./plugins/undo-redo/undo-redo-manager";
|
|
11
11
|
import { UndoRedoController } from "./plugins/undo-redo/undo-redo-controller";
|
|
12
12
|
import { SidebarModel } from "./components/side-bar/side-bar-model";
|
|
@@ -91,7 +91,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
91
91
|
get showPreviewTab(): boolean;
|
|
92
92
|
set showPreviewTab(val: boolean);
|
|
93
93
|
/**
|
|
94
|
-
* Specifies whether to display the
|
|
94
|
+
* Specifies whether to display the Themes tab.
|
|
95
95
|
*
|
|
96
96
|
* Default value: `false`
|
|
97
97
|
*/
|
|
@@ -142,7 +142,8 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
142
142
|
*
|
|
143
143
|
* > You can enable this property only if you have a Survey Creator commercial license. It is illegal to enable this property without a license.
|
|
144
144
|
*/
|
|
145
|
-
haveCommercialLicense: boolean;
|
|
145
|
+
get haveCommercialLicense(): boolean;
|
|
146
|
+
set haveCommercialLicense(val: boolean);
|
|
146
147
|
get licenseText(): string;
|
|
147
148
|
/**
|
|
148
149
|
* Specifies whether to call the [saveSurveyFunc](https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#saveSurveyFunc) each time survey settings are changed.
|
|
@@ -532,58 +533,61 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
532
533
|
*/
|
|
533
534
|
onLogicItemDisplayText: CreatorEvent;
|
|
534
535
|
/**
|
|
535
|
-
*
|
|
536
|
-
|
|
537
|
-
*
|
|
538
|
-
|
|
539
|
-
*
|
|
536
|
+
* An event that is raised when users modify survey or theme settings.
|
|
537
|
+
*
|
|
538
|
+
* Parameters:
|
|
539
|
+
*
|
|
540
|
+
* - `sender`: `CreatorBase`\
|
|
541
|
+
* A Survey Creator instance that raised the event.
|
|
540
542
|
*
|
|
541
|
-
|
|
542
|
-
|
|
543
|
+
* - `options.type`: `"ADDED_FROM_TOOLBOX"` | `"PAGE_ADDED"` | `"PAGE_MOVED"` | `"QUESTION_CONVERTED"` | `"QUESTION_CHANGED_BY_EDITOR"` | `"PROPERTY_CHANGED"` | `"ELEMENT_REORDERED"` | `"OBJECT_DELETED"` | `"VIEW_TYPE_CHANGED"` | `"DO_DROP"` | `"TRANSLATIONS_CHANGED"` | `"JSON_EDITOR"` | `"THEME_MODIFIED"`\
|
|
544
|
+
* A value that indicates the modification.
|
|
543
545
|
*
|
|
544
|
-
|
|
545
|
-
*- options.newValue: newly created page
|
|
546
|
+
* Depending on the `options.type` value, the `options` object contains parameters listed below:
|
|
546
547
|
*
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
*- options.indexFrom: pevious index
|
|
550
|
-
*- options.indexTo: new index
|
|
548
|
+
* `options.type`: `"ADDED_FROM_TOOLBOX"`\
|
|
549
|
+
* - `options.question` - An added question.
|
|
551
550
|
*
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
*- options.oldValue: pevious object
|
|
555
|
-
*- options.newValue: the new object, converted from oldVale to the given class name
|
|
551
|
+
* `options.type`: `"PAGE_ADDED"`\
|
|
552
|
+
* - `options.newValue` - An added page.
|
|
556
553
|
*
|
|
557
|
-
|
|
558
|
-
|
|
554
|
+
* `options.type`: `"PAGE_MOVED"`\
|
|
555
|
+
* - `options.page` - A moved page.
|
|
556
|
+
* - `options.indexFrom` - A previous index.
|
|
557
|
+
* - `options.indexTo` - A current index.
|
|
559
558
|
*
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
*- options.newValue: the new value of the changed property
|
|
559
|
+
* `options.type`: `"QUESTION_CONVERTED"`\
|
|
560
|
+
* - `options.className` - The name of a class to which a question has been converted.
|
|
561
|
+
* - `options.oldValue` - An object of a previous class.
|
|
562
|
+
* - `options.newValue` - An object of a class specified by `options.className`.
|
|
565
563
|
*
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
*- options.parent: the object containing the array property
|
|
569
|
-
*- options.element: the element that changed the place in the array
|
|
570
|
-
*- options.indexFrom: moved from index
|
|
571
|
-
*- options.indexTo: moved to index
|
|
564
|
+
* `options.type`: `"QUESTION_CHANGED_BY_EDITOR"`\
|
|
565
|
+
* - `options.question` - A question that has been edited in a pop-up editor.
|
|
572
566
|
*
|
|
573
|
-
|
|
574
|
-
|
|
567
|
+
* `options.type`: `"PROPERTY_CHANGED"`\
|
|
568
|
+
* - `options.name` - The name of the changed property.
|
|
569
|
+
* - `options.target` - An object that contains the changed property.
|
|
570
|
+
* - `options.oldValue` - A previous value of the changed property.
|
|
571
|
+
* - `options.newValue` - A new value of the changed property.
|
|
575
572
|
*
|
|
576
|
-
|
|
577
|
-
|
|
573
|
+
* `options.type`: `"ELEMENT_REORDERED"`\
|
|
574
|
+
* - `options.arrayName` - The name of the changed array.
|
|
575
|
+
* - `options.parent` - An object that contains the changed array.
|
|
576
|
+
* - `options.element` - A reordered element.
|
|
577
|
+
* - `options.indexFrom` - A previous index.
|
|
578
|
+
* - `options.indexTo` - A current index.
|
|
578
579
|
*
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
*- options.source: the source dragged object
|
|
582
|
-
*- options.target: the drop target
|
|
583
|
-
*- options.newElement: a new element. It is defined if a user drops question or panel from the toolbox
|
|
580
|
+
* `options.type`: `"OBJECT_DELETED"`\
|
|
581
|
+
* - `options.target` - A deleted object.
|
|
584
582
|
*
|
|
585
|
-
|
|
586
|
-
|
|
583
|
+
* `options.type`: `"VIEW_TYPE_CHANGED"`\
|
|
584
|
+
* - `options.newType` - A current view: `"editor"` or `"designer"`.
|
|
585
|
+
*
|
|
586
|
+
* `options.type`: `"DO_DROP"`\
|
|
587
|
+
* - `options.page` - A parent page of the dragged element.
|
|
588
|
+
* - `options.source` - A dragged element.
|
|
589
|
+
* - `options.target` - A drop target.
|
|
590
|
+
* - `options.newElement` - A new element. This parameter is defined only if users drag a question or panel from the Toolbox.
|
|
587
591
|
*/
|
|
588
592
|
onModified: CreatorEvent;
|
|
589
593
|
/**
|
|
@@ -1114,8 +1118,8 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1114
1118
|
* A survey element to which `draggedElement` is being dragged.
|
|
1115
1119
|
* @see onDragEnd
|
|
1116
1120
|
*/
|
|
1117
|
-
onDragStart:
|
|
1118
|
-
onBeforeDrop:
|
|
1121
|
+
onDragStart: Event<() => any, any, any>;
|
|
1122
|
+
onBeforeDrop: Event<() => any, any, any>;
|
|
1119
1123
|
/**
|
|
1120
1124
|
* An event that is raised when users finish dragging a survey element within the design surface.
|
|
1121
1125
|
*
|
|
@@ -1130,8 +1134,8 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1130
1134
|
* - `options.toElement`: `any`\
|
|
1131
1135
|
* A survey element to which `draggedElement` was dragged.
|
|
1132
1136
|
*/
|
|
1133
|
-
onDragEnd:
|
|
1134
|
-
onAfterDrop:
|
|
1137
|
+
onDragEnd: Event<() => any, any, any>;
|
|
1138
|
+
onAfterDrop: Event<() => any, any, any>;
|
|
1135
1139
|
private initDragDropSurveyElements;
|
|
1136
1140
|
private initDragDropChoices;
|
|
1137
1141
|
updateElementsOnLocaleChanged(obj: Base, propertyName: string): void;
|
|
@@ -1151,6 +1155,8 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1151
1155
|
isObjPage(obj: Base): boolean;
|
|
1152
1156
|
private isObjThisType;
|
|
1153
1157
|
private addNewElementReason;
|
|
1158
|
+
onDragDropItemStart(): void;
|
|
1159
|
+
onDragDropItemEnd(): void;
|
|
1154
1160
|
private doOnQuestionAdded;
|
|
1155
1161
|
private doOnPanelAdded;
|
|
1156
1162
|
private doOnPageAdded;
|
|
@@ -1182,7 +1188,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1182
1188
|
get state(): string;
|
|
1183
1189
|
protected setState(value: string): void;
|
|
1184
1190
|
onStateChanged: CreatorEvent;
|
|
1185
|
-
notifier:
|
|
1191
|
+
notifier: Notifier;
|
|
1186
1192
|
setModified(options?: any): void;
|
|
1187
1193
|
notifySurveyPropertyChanged(options: any): void;
|
|
1188
1194
|
notifySurveyItemMoved(options: any): void;
|
|
@@ -1205,7 +1211,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1205
1211
|
private isRowMultiline;
|
|
1206
1212
|
private findRowByElement;
|
|
1207
1213
|
private addElemenMultiline;
|
|
1208
|
-
setNewNames(element:
|
|
1214
|
+
setNewNames(element: ISurveyElement): void;
|
|
1209
1215
|
private updateNewElementExpressions;
|
|
1210
1216
|
protected getAllQuestions(): Array<any>;
|
|
1211
1217
|
protected getAllPanels(): Array<any>;
|
|
@@ -1213,14 +1219,14 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1213
1219
|
protected getNewName(type: string, isPanel?: boolean): string;
|
|
1214
1220
|
protected getNewQuestionName(): string;
|
|
1215
1221
|
protected getNewPanelName(): string;
|
|
1216
|
-
protected setNewNamesCore(element:
|
|
1222
|
+
protected setNewNamesCore(element: ISurveyElement): void;
|
|
1217
1223
|
createNewElement(json: any): IElement;
|
|
1218
1224
|
copyElement(element: Base): IElement;
|
|
1219
1225
|
/**
|
|
1220
1226
|
* Copy a question to the active page
|
|
1221
1227
|
* @param question A copied Survey.Question
|
|
1222
1228
|
*/
|
|
1223
|
-
fastCopyQuestion(question: Base):
|
|
1229
|
+
fastCopyQuestion(question: Base): IElement;
|
|
1224
1230
|
/**
|
|
1225
1231
|
* Get or set the current selected object in the Creator. It can be a question, panel, page or survey itself.
|
|
1226
1232
|
*/
|
|
@@ -1337,6 +1343,10 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1337
1343
|
* @param uploadingCallback a call back function to get the status on uploading the file and operation result - URI of the uploaded file
|
|
1338
1344
|
*/
|
|
1339
1345
|
uploadFiles(files: File[], question: Question, uploadingCallback: (status: string, data: any) => any): void;
|
|
1346
|
+
private _rootElementValue;
|
|
1347
|
+
get rootElement(): HTMLElement;
|
|
1348
|
+
setRootElement(element: HTMLElement): void;
|
|
1349
|
+
unsubscribeRootElement(): void;
|
|
1340
1350
|
initKeyboardShortcuts(rootNode: HTMLElement): void;
|
|
1341
1351
|
removeKeyboardShortcuts(rootNode: HTMLElement): void;
|
|
1342
1352
|
protected onKeyDownHandler: (event: KeyboardEvent) => void;
|
|
@@ -1361,8 +1371,8 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1361
1371
|
onCanDeleteItemCallback(object: any, item: Base, allowDelete: boolean): boolean;
|
|
1362
1372
|
onCollectionItemDeletingCallback(obj: Base, property: JsonObjectProperty, collection: Array<Base>, item: Base): boolean;
|
|
1363
1373
|
onCollectionItemAllowingCallback(obj: Base, property: JsonObjectProperty, collection: Array<Base>, item: Base, itemOptions: ICollectionItemAllowOperations): void;
|
|
1364
|
-
onItemValueAddedCallback(obj: Base, propertyName: string, itemValue:
|
|
1365
|
-
onMatrixDropdownColumnAddedCallback(matrix:
|
|
1374
|
+
onItemValueAddedCallback(obj: Base, propertyName: string, itemValue: ItemValue, itemValues: Array<ItemValue>): void;
|
|
1375
|
+
onMatrixDropdownColumnAddedCallback(matrix: Question, column: MatrixDropdownColumn, columns: Array<MatrixDropdownColumn>): void;
|
|
1366
1376
|
onSetPropertyEditorOptionsCallback(propertyName: string, obj: Base, editorOptions: any): void;
|
|
1367
1377
|
onGetErrorTextOnValidationCallback(propertyName: string, obj: Base, value: any): string;
|
|
1368
1378
|
onValueChangingCallback(options: any): void;
|
|
@@ -1385,23 +1395,32 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1385
1395
|
doSave(): void;
|
|
1386
1396
|
doSaveTheme(): void;
|
|
1387
1397
|
/**
|
|
1388
|
-
*
|
|
1389
|
-
*
|
|
1398
|
+
* A function that is called each time users click the [Save button](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#showSaveButton) or [auto-save](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#isAutoSave) is triggered to save a theme JSON object.
|
|
1399
|
+
*
|
|
1400
|
+
* For more information, refer to the [Save and Load Custom Themes](/survey-creator/documentation/theme-editor#save-and-load-custom-themes) help topic.
|
|
1401
|
+
* @see showThemeTab
|
|
1402
|
+
* @see saveSurveyFunc
|
|
1390
1403
|
*/
|
|
1391
1404
|
get saveThemeFunc(): any;
|
|
1392
1405
|
set saveThemeFunc(value: any);
|
|
1393
|
-
showSaveButton: boolean;
|
|
1394
1406
|
/**
|
|
1395
|
-
*
|
|
1407
|
+
* Specifies whether to display a button that saves the survey or theme (executes the [`saveSurveyFunc`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#saveSurveyFunc) or [`saveThemeFunc`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#saveThemeFunc) function).
|
|
1396
1408
|
* @see isAutoSave
|
|
1397
1409
|
*/
|
|
1410
|
+
showSaveButton: boolean;
|
|
1411
|
+
/**
|
|
1412
|
+
* A function that is called each time users click the [Save button](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#showSaveButton) or [auto-save](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#isAutoSave) is triggered to save a survey JSON schema.
|
|
1413
|
+
*
|
|
1414
|
+
* For more information, refer to the Save and Load Survey Model Schemas help topic for your framework: [Angular](https://surveyjs.io/survey-creator/documentation/get-started-angular#save-and-load-survey-model-schemas) | [Vue](https://surveyjs.io/survey-creator/documentation/get-started-vue#save-and-load-survey-model-schemas) | [React](https://surveyjs.io/survey-creator/documentation/get-started-react#save-and-load-survey-model-schemas) | [Knockout / jQuery](https://surveyjs.io/survey-creator/documentation/get-started-knockout-jquery).
|
|
1415
|
+
* @see saveThemeFunc
|
|
1416
|
+
*/
|
|
1398
1417
|
get saveSurveyFunc(): any;
|
|
1399
1418
|
set saveSurveyFunc(value: any);
|
|
1400
1419
|
convertCurrentQuestion(newType: string): void;
|
|
1401
1420
|
getAddNewQuestionText(currentAddQuestionType?: string): any;
|
|
1402
1421
|
get addNewQuestionText(): any;
|
|
1403
1422
|
getQuestionTypeSelectorModel(beforeAdd: (type: string) => void, panel?: IPanel): any;
|
|
1404
|
-
getUpdatedPageAdornerFooterActions(pageAdorner: PageAdorner, actions: Array<IAction>):
|
|
1423
|
+
getUpdatedPageAdornerFooterActions(pageAdorner: PageAdorner, actions: Array<IAction>): IAction[];
|
|
1405
1424
|
addNewQuestionInPage(beforeAdd: (string: any) => void, panel?: IPanel, type?: string): void;
|
|
1406
1425
|
createIActionBarItemByClass(className: string, title: string, iconName: string, needSeparator: boolean): Action;
|
|
1407
1426
|
onElementMenuItemsChanged(element: any, items: Action[]): void;
|
|
@@ -52,7 +52,7 @@ export interface ICreatorOptions {
|
|
|
52
52
|
*/
|
|
53
53
|
haveCommercialLicense?: boolean;
|
|
54
54
|
/**
|
|
55
|
-
* Specifies whether to call the [saveSurveyFunc](https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#saveSurveyFunc) each time survey settings are changed.
|
|
55
|
+
* Specifies whether to call the [`saveSurveyFunc`](https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#saveSurveyFunc) and [`saveThemeFunc`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#saveThemeFunc) functions each time survey or theme settings are changed.
|
|
56
56
|
*
|
|
57
57
|
* Default value: `false`
|
|
58
58
|
*/
|
|
@@ -166,6 +166,7 @@ export interface ISurveyCreatorOptions {
|
|
|
166
166
|
maximumRowsCount: number;
|
|
167
167
|
maximumRateValues: number;
|
|
168
168
|
enableLinkFileEditor: boolean;
|
|
169
|
+
rootElement?: HTMLElement;
|
|
169
170
|
getObjectDisplayName(obj: Base, area: string, reason: string, displayName: string): string;
|
|
170
171
|
onCanShowPropertyCallback(object: any, property: JsonObjectProperty, showMode: string, parentObj: any, parentProperty: JsonObjectProperty): boolean;
|
|
171
172
|
onPropertyEditorCreatedCallback(object: any, property: JsonObjectProperty, editor: Question): any;
|
|
@@ -194,6 +195,7 @@ export interface ISurveyCreatorOptions {
|
|
|
194
195
|
uploadFiles(files: File[], question: Question, uploadingCallback: (status: string, data: any) => any): void;
|
|
195
196
|
}
|
|
196
197
|
export declare class EmptySurveyCreatorOptions implements ISurveyCreatorOptions {
|
|
198
|
+
rootElement: HTMLElement;
|
|
197
199
|
enableLinkFileEditor: boolean;
|
|
198
200
|
getProcessedTranslationItemText(locale: string, locString: ILocalizableString, newText: string, obj: any): string;
|
|
199
201
|
isMobileView: boolean;
|
|
@@ -541,6 +541,7 @@ export declare var defaultStrings: {
|
|
|
541
541
|
maxErrorText: string;
|
|
542
542
|
otherErrorText: string;
|
|
543
543
|
keyDuplicationError: string;
|
|
544
|
+
minSelectedChoices: string;
|
|
544
545
|
maxSelectedChoices: string;
|
|
545
546
|
showClearButton: string;
|
|
546
547
|
showNumber: string;
|
|
@@ -1042,15 +1043,15 @@ export declare var defaultStrings: {
|
|
|
1042
1043
|
editorShadow: string;
|
|
1043
1044
|
names: {
|
|
1044
1045
|
default: string;
|
|
1045
|
-
|
|
1046
|
+
sharp: string;
|
|
1047
|
+
borderless: string;
|
|
1048
|
+
flat: string;
|
|
1046
1049
|
plain: string;
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
playful: string;
|
|
1053
|
-
ultra: string;
|
|
1050
|
+
doubleborder: string;
|
|
1051
|
+
layered: string;
|
|
1052
|
+
solid: string;
|
|
1053
|
+
threedimensional: string;
|
|
1054
|
+
contrast: string;
|
|
1054
1055
|
};
|
|
1055
1056
|
colors: {
|
|
1056
1057
|
teal: string;
|
|
@@ -512,6 +512,7 @@ export declare var enStrings: {
|
|
|
512
512
|
maxErrorText: string;
|
|
513
513
|
otherErrorText: string;
|
|
514
514
|
keyDuplicationError: string;
|
|
515
|
+
minSelectedChoices: string;
|
|
515
516
|
maxSelectedChoices: string;
|
|
516
517
|
showClearButton: string;
|
|
517
518
|
showNumber: string;
|
|
@@ -1013,15 +1014,15 @@ export declare var enStrings: {
|
|
|
1013
1014
|
editorShadow: string;
|
|
1014
1015
|
names: {
|
|
1015
1016
|
default: string;
|
|
1016
|
-
|
|
1017
|
+
sharp: string;
|
|
1018
|
+
borderless: string;
|
|
1019
|
+
flat: string;
|
|
1017
1020
|
plain: string;
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
playful: string;
|
|
1024
|
-
ultra: string;
|
|
1021
|
+
doubleborder: string;
|
|
1022
|
+
layered: string;
|
|
1023
|
+
solid: string;
|
|
1024
|
+
threedimensional: string;
|
|
1025
|
+
contrast: string;
|
|
1025
1026
|
};
|
|
1026
1027
|
colors: {
|
|
1027
1028
|
teal: string;
|
|
@@ -14,7 +14,7 @@ export declare abstract class PropertyGridEditorMatrix extends PropertyGridEdito
|
|
|
14
14
|
private getShowDetailActionIconName;
|
|
15
15
|
onGetQuestionTitleActions(obj: Base, options: any): void;
|
|
16
16
|
protected createNewItem(matrix: QuestionMatrixDynamicModel, prop: JsonObjectProperty): Base;
|
|
17
|
-
protected getDefaultClassName(prop: JsonObjectProperty): string;
|
|
17
|
+
protected getDefaultClassName(obj: Base, prop: JsonObjectProperty): string;
|
|
18
18
|
protected getBaseValue(prop: JsonObjectProperty): string;
|
|
19
19
|
protected getKeyValue(): string;
|
|
20
20
|
protected getColumnNames(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): Array<string>;
|
|
@@ -124,7 +124,7 @@ export declare abstract class PropertyGridEditorMatrixMultipleTypes extends Prop
|
|
|
124
124
|
export declare class PropertyGridEditorMatrixValidators extends PropertyGridEditorMatrixMultipleTypes {
|
|
125
125
|
fit(prop: JsonObjectProperty): boolean;
|
|
126
126
|
protected getObjTypeName(): string;
|
|
127
|
-
protected getDefaultClassName(prop: JsonObjectProperty): string;
|
|
127
|
+
protected getDefaultClassName(obj: Base, prop: JsonObjectProperty): string;
|
|
128
128
|
protected getChoices(obj: Base): Array<any>;
|
|
129
129
|
private getSupportedValidators;
|
|
130
130
|
}
|
|
@@ -132,7 +132,7 @@ export declare class PropertyGridEditorMatrixTriggers extends PropertyGridEditor
|
|
|
132
132
|
private getAvailableTriggers;
|
|
133
133
|
fit(prop: JsonObjectProperty): boolean;
|
|
134
134
|
protected getObjTypeName(): string;
|
|
135
|
-
protected getDefaultClassName(prop: JsonObjectProperty): string;
|
|
135
|
+
protected getDefaultClassName(obj: Base, prop: JsonObjectProperty): string;
|
|
136
136
|
protected getAllowRowDragDrop(prop: JsonObjectProperty): boolean;
|
|
137
137
|
protected getChoices(obj: Base): Array<any>;
|
|
138
138
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Base, ItemValue, JsonObjectProperty } from "survey-core";
|
|
1
|
+
import { Base, ISurveyElement, ItemValue, JsonObjectProperty } from "survey-core";
|
|
2
2
|
import { ISurveyCreatorOptions } from "./creator-settings";
|
|
3
3
|
export declare enum ObjType {
|
|
4
4
|
Unknown = 0,
|
|
@@ -9,6 +9,7 @@ export declare enum ObjType {
|
|
|
9
9
|
Column = 5
|
|
10
10
|
}
|
|
11
11
|
export declare class SurveyHelper {
|
|
12
|
+
static getNewElementName(el: ISurveyElement): string;
|
|
12
13
|
static getNewPageName(objs: Array<any>): string;
|
|
13
14
|
static isPageNameAutoGenerated(name: string): boolean;
|
|
14
15
|
static getNewQuestionName(objs: Array<any>): string;
|
package/typings/textWorker.d.ts
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import { SurveyModel, JsonError, Base } from "survey-core";
|
|
2
|
+
declare class SurveyTextWorkerJsonErrorFixerBase {
|
|
3
|
+
getCorrectAt(text: string, at: number, end: number): number;
|
|
4
|
+
get isFixable(): boolean;
|
|
5
|
+
fixError(text: string, start: number, end: number): string;
|
|
6
|
+
}
|
|
2
7
|
export declare abstract class SurveyTextWorkerError {
|
|
3
8
|
at: number;
|
|
4
9
|
text: string;
|
|
5
10
|
rowAt: number;
|
|
6
11
|
columnAt: number;
|
|
12
|
+
private fixerValue;
|
|
7
13
|
constructor(at: number, text: string);
|
|
8
14
|
abstract getErrorType(): string;
|
|
15
|
+
get isFixable(): boolean;
|
|
16
|
+
fixError(text: string): string;
|
|
17
|
+
protected get fixer(): SurveyTextWorkerJsonErrorFixerBase;
|
|
18
|
+
protected createFixer(): SurveyTextWorkerJsonErrorFixerBase;
|
|
9
19
|
}
|
|
10
20
|
export declare class SurveyTextWorkerParserError extends SurveyTextWorkerError {
|
|
11
21
|
getErrorType(): string;
|
|
@@ -13,14 +23,16 @@ export declare class SurveyTextWorkerParserError extends SurveyTextWorkerError {
|
|
|
13
23
|
export declare class SurveyTextWorkerJsonError extends SurveyTextWorkerError {
|
|
14
24
|
elementStart: number;
|
|
15
25
|
elementEnd: number;
|
|
26
|
+
private element;
|
|
16
27
|
private errorType;
|
|
17
28
|
private propertyName;
|
|
29
|
+
private jsonObj;
|
|
18
30
|
constructor(jsonError: JsonError);
|
|
31
|
+
protected createFixer(): SurveyTextWorkerJsonErrorFixerBase;
|
|
19
32
|
getErrorType(): string;
|
|
33
|
+
get isFixable(): boolean;
|
|
20
34
|
correctAt(text: string): void;
|
|
21
|
-
|
|
22
|
-
private getCorrectAtForDuplicateName;
|
|
23
|
-
private getNewIndex;
|
|
35
|
+
fixError(text: string): string;
|
|
24
36
|
}
|
|
25
37
|
export declare class SurveyTextWorker {
|
|
26
38
|
text: string;
|
|
@@ -43,3 +55,4 @@ export declare class SurveyTextWorker {
|
|
|
43
55
|
export declare class JsonDuplicateNameError extends JsonError {
|
|
44
56
|
constructor(el: Base);
|
|
45
57
|
}
|
|
58
|
+
export {};
|