survey-creator-core 1.9.82 → 1.9.84
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 +75 -14
- package/survey-creator-core.d.ts +1 -8046
- package/survey-creator-core.fontless.css +74 -13
- package/survey-creator-core.fontless.css.map +1 -1
- package/survey-creator-core.fontless.min.css +4 -4
- package/survey-creator-core.i18n.js +126 -128
- package/survey-creator-core.i18n.js.map +1 -1
- package/survey-creator-core.i18n.min.js +2 -2
- package/survey-creator-core.js +447 -152
- package/survey-creator-core.js.map +1 -1
- package/survey-creator-core.min.css +5 -5
- package/survey-creator-core.min.js +2 -2
- package/typings/components/action-container-view-model.d.ts +27 -0
- package/typings/components/embedded-survey.d.ts +9 -0
- package/typings/components/header/logo-image.d.ts +15 -0
- package/typings/components/image-item-value.d.ts +21 -0
- package/typings/components/item-value.d.ts +42 -0
- package/typings/components/link-value.d.ts +27 -0
- package/typings/components/matrix-cell.d.ts +25 -0
- package/typings/components/page-navigator/page-navigator.d.ts +39 -0
- package/typings/components/page.d.ts +28 -0
- package/typings/components/question-dropdown.d.ts +18 -0
- package/typings/components/question-image.d.ts +9 -0
- package/typings/components/question-rating.d.ts +15 -0
- package/typings/components/question.d.ts +41 -0
- package/typings/components/results.d.ts +40 -0
- package/typings/components/row.d.ts +9 -0
- package/typings/components/side-bar/side-bar-model.d.ts +34 -0
- package/typings/components/side-bar/side-bar-tab-model.d.ts +11 -0
- package/typings/components/simulator.d.ts +205 -0
- package/typings/components/string-editor.d.ts +68 -0
- package/typings/components/tabs/designer-plugin.d.ts +26 -0
- package/typings/components/tabs/designer.d.ts +29 -0
- package/typings/components/tabs/embed-json.d.ts +1 -0
- package/typings/components/tabs/embed.d.ts +13 -0
- package/typings/components/tabs/json-editor-ace.d.ts +22 -0
- package/typings/components/tabs/json-editor-plugin.d.ts +28 -0
- package/typings/components/tabs/json-editor-textarea.d.ts +22 -0
- package/typings/components/tabs/logic-actions-model.d.ts +49 -0
- package/typings/components/tabs/logic-expression.d.ts +32 -0
- package/typings/components/tabs/logic-item-editor.d.ts +53 -0
- package/typings/components/tabs/logic-items.d.ts +96 -0
- package/typings/components/tabs/logic-plugin.d.ts +22 -0
- package/typings/components/tabs/logic-theme.d.ts +327 -0
- package/typings/components/tabs/logic-types.d.ts +77 -0
- package/typings/components/tabs/logic-ui.d.ts +68 -0
- package/typings/components/tabs/logic.d.ts +102 -0
- package/typings/components/tabs/test-plugin.d.ts +33 -0
- package/typings/components/tabs/test.d.ts +43 -0
- package/typings/components/tabs/translation-plugin.d.ts +33 -0
- package/typings/components/tabs/translation-theme.d.ts +301 -0
- package/typings/components/tabs/translation.d.ts +199 -0
- package/typings/components/toolbox/toolbox-tool.d.ts +16 -0
- package/typings/creator-base.d.ts +1375 -0
- package/typings/creator-options.d.ts +247 -0
- package/typings/creator-responsivity-manager.d.ts +22 -0
- package/typings/creator-settings.d.ts +216 -0
- package/typings/custom-questions/question-color.d.ts +15 -0
- package/typings/custom-questions/question-file.d.ts +15 -0
- package/typings/custom-questions/question-spin-editor.d.ts +25 -0
- package/typings/editable-object.d.ts +20 -0
- package/typings/editorLocalization.d.ts +951 -0
- package/typings/entries/index.d.ts +68 -0
- package/typings/expressionToDisplayText.d.ts +46 -0
- package/typings/json5.d.ts +46 -0
- package/typings/localization/english.d.ts +922 -0
- package/typings/pages-controller.d.ts +21 -0
- package/typings/plugins/undo-redo/index.d.ts +12 -0
- package/typings/plugins/undo-redo/undo-redo-controller.d.ts +40 -0
- package/typings/plugins/undo-redo/undo-redo-manager.d.ts +78 -0
- package/typings/property-grid/bindings.d.ts +10 -0
- package/typings/property-grid/cells-survey.d.ts +14 -0
- package/typings/property-grid/condition-survey.d.ts +117 -0
- package/typings/property-grid/condition.d.ts +13 -0
- package/typings/property-grid/description-parser.d.ts +10 -0
- package/typings/property-grid/fast-entry.d.ts +32 -0
- package/typings/property-grid/index.d.ts +239 -0
- package/typings/property-grid/matrices.d.ts +132 -0
- package/typings/property-grid/object-selector.d.ts +42 -0
- package/typings/property-grid/property-grid-view-model.d.ts +23 -0
- package/typings/property-grid/restfull.d.ts +8 -0
- package/typings/property-grid/values-survey.d.ts +42 -0
- package/typings/property-grid/values.d.ts +37 -0
- package/typings/property-grid-theme/property-grid.d.ts +346 -0
- package/typings/question-editor/definition.d.ts +22 -0
- package/typings/question-editor/properties.d.ts +49 -0
- package/typings/questionconverter.d.ts +12 -0
- package/typings/selection-history.d.ts +20 -0
- package/typings/selection-owner.d.ts +7 -0
- package/typings/survey-helper.d.ts +43 -0
- package/typings/svgbundle.d.ts +1 -0
- package/typings/textWorker.d.ts +18 -0
- package/typings/toolbox.d.ts +269 -0
- package/typings/utils/actions.d.ts +5 -0
- package/typings/utils/events.d.ts +14 -0
- package/typings/utils/resizer.d.ts +24 -0
- package/typings/utils/utils.d.ts +19 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Base, SurveyModel, EventBase, PageModel } from "survey-core";
|
|
2
|
+
import { ICreatorSelectionOwner } from "./selection-owner";
|
|
3
|
+
export declare class PagesController extends Base {
|
|
4
|
+
creator: ICreatorSelectionOwner;
|
|
5
|
+
onPagesChanged: EventBase<PagesController>;
|
|
6
|
+
onCurrentPageChanged: EventBase<PagesController>;
|
|
7
|
+
private currentPageChangedFunc;
|
|
8
|
+
private surveyValue;
|
|
9
|
+
page2Display: PageModel;
|
|
10
|
+
constructor(creator: ICreatorSelectionOwner);
|
|
11
|
+
get survey(): SurveyModel;
|
|
12
|
+
get pages(): Array<PageModel>;
|
|
13
|
+
get currentPage(): PageModel;
|
|
14
|
+
set currentPage(value: PageModel);
|
|
15
|
+
selectPage(value: PageModel): void;
|
|
16
|
+
getDisplayName(page: PageModel): string;
|
|
17
|
+
raisePagesChanged(): void;
|
|
18
|
+
onSurveyChanged(): void;
|
|
19
|
+
dispose(): void;
|
|
20
|
+
private removeFunctions;
|
|
21
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CreatorBase, ICreatorPlugin } from "../../creator-base";
|
|
2
|
+
export declare class UndoRedoPlugin implements ICreatorPlugin {
|
|
3
|
+
private creator;
|
|
4
|
+
constructor(creator: CreatorBase);
|
|
5
|
+
model: any;
|
|
6
|
+
activate(): void;
|
|
7
|
+
deactivate(): boolean;
|
|
8
|
+
update(): void;
|
|
9
|
+
addFooterActions(): void;
|
|
10
|
+
}
|
|
11
|
+
export declare function undoRedoTransaction(transactionName?: string, undoRedoManagerProperty?: string): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
12
|
+
export declare function ignoreUndoRedo(undoRedoManagerProperty?: string): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Action, Base } from "survey-core";
|
|
2
|
+
import { CreatorBase, CreatorEvent } from "../../creator-base";
|
|
3
|
+
import { UndoRedoManager } from "./undo-redo-manager";
|
|
4
|
+
export declare class UndoRedoController extends Base {
|
|
5
|
+
private creator;
|
|
6
|
+
private undoAction;
|
|
7
|
+
private redoAction;
|
|
8
|
+
private onSurveyPropertyValueChangedCallback;
|
|
9
|
+
constructor(creator: CreatorBase);
|
|
10
|
+
undoRedoManager: UndoRedoManager;
|
|
11
|
+
updateSurvey(): void;
|
|
12
|
+
private selectElementAfterUndo;
|
|
13
|
+
private selectElementAfterUndoCore;
|
|
14
|
+
undo(): void;
|
|
15
|
+
redo(): void;
|
|
16
|
+
startTransaction(name?: string): void;
|
|
17
|
+
stopTransaction(): void;
|
|
18
|
+
createActions(): Action[];
|
|
19
|
+
private updateUndeRedoActions;
|
|
20
|
+
/**
|
|
21
|
+
* The event is called before undo happens.
|
|
22
|
+
* options.canUndo a boolean value. It is true by default. Set it false to hide prevent undo operation.
|
|
23
|
+
*/
|
|
24
|
+
onBeforeUndo: CreatorEvent;
|
|
25
|
+
/**
|
|
26
|
+
* The event is called before redo happens.
|
|
27
|
+
* options.canRedo a boolean value. It is true by default. Set it false to hide prevent redo operation.
|
|
28
|
+
*/
|
|
29
|
+
onBeforeRedo: CreatorEvent;
|
|
30
|
+
/**
|
|
31
|
+
* The event is called after undo happens.
|
|
32
|
+
* options.state is an undo/redo item.
|
|
33
|
+
*/
|
|
34
|
+
onAfterUndo: CreatorEvent;
|
|
35
|
+
/**
|
|
36
|
+
* The event is called after redo happens.
|
|
37
|
+
* options.state is an undo/redo item.
|
|
38
|
+
*/
|
|
39
|
+
onAfterRedo: CreatorEvent;
|
|
40
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { ArrayChanges, Base } from "survey-core";
|
|
2
|
+
export interface IUndoRedoChange {
|
|
3
|
+
object: any;
|
|
4
|
+
propertyName: string;
|
|
5
|
+
oldValue: any;
|
|
6
|
+
newValue: any;
|
|
7
|
+
}
|
|
8
|
+
export declare class UndoRedoManager {
|
|
9
|
+
constructor();
|
|
10
|
+
onPropertyValueChanged(name: string, oldValue: any, newValue: any, sender: Base, arrayChanges: ArrayChanges): void;
|
|
11
|
+
isCorrectProperty(sender: Base, propertyName: string): boolean;
|
|
12
|
+
tryMergeTransaction(sender: Base, propertyName: string, newValue: any): boolean;
|
|
13
|
+
private _ignoreChanges;
|
|
14
|
+
private _isExecuting;
|
|
15
|
+
private _preparingTransaction;
|
|
16
|
+
private _transactions;
|
|
17
|
+
private _currentTransactionIndex;
|
|
18
|
+
isCopyObject(sender: Base): void;
|
|
19
|
+
private _cutOffTail;
|
|
20
|
+
private get isIgnoring();
|
|
21
|
+
private _addTransaction;
|
|
22
|
+
private _getCurrentTransaction;
|
|
23
|
+
private _getNextTransaction;
|
|
24
|
+
private notifyChangesFinished;
|
|
25
|
+
canUndoRedoCallback(): void;
|
|
26
|
+
private transactionCounter;
|
|
27
|
+
startTransaction(name: string): void;
|
|
28
|
+
stopTransaction(): void;
|
|
29
|
+
setUndoCallbackForTransaction(callback: () => void): void;
|
|
30
|
+
get isProcessingUndoRedo(): boolean;
|
|
31
|
+
canUndo(): boolean;
|
|
32
|
+
undo(): void;
|
|
33
|
+
canRedo(): boolean;
|
|
34
|
+
redo(): void;
|
|
35
|
+
suspend(): void;
|
|
36
|
+
resume(): void;
|
|
37
|
+
changesFinishedCallback: (changes: IUndoRedoChange) => void;
|
|
38
|
+
}
|
|
39
|
+
export declare class Transaction {
|
|
40
|
+
private _name;
|
|
41
|
+
constructor(_name: string);
|
|
42
|
+
private _actions;
|
|
43
|
+
undoCallback: () => void;
|
|
44
|
+
apply(): void;
|
|
45
|
+
rollback(): void;
|
|
46
|
+
addAction(action: any): void;
|
|
47
|
+
isEmpty(): boolean;
|
|
48
|
+
get actions(): UndoRedoAction[];
|
|
49
|
+
}
|
|
50
|
+
export interface IUndoRedoAction {
|
|
51
|
+
apply: () => void;
|
|
52
|
+
rollback: () => void;
|
|
53
|
+
getChanges(): IUndoRedoChange;
|
|
54
|
+
tryMerge(sender: Base, propertyName: string, newValue: any): boolean;
|
|
55
|
+
}
|
|
56
|
+
export declare class UndoRedoAction implements IUndoRedoAction {
|
|
57
|
+
private _propertyName;
|
|
58
|
+
private _oldValue;
|
|
59
|
+
private _newValue;
|
|
60
|
+
private _sender;
|
|
61
|
+
constructor(_propertyName: string, _oldValue: any, _newValue: any, _sender: Base);
|
|
62
|
+
apply(): void;
|
|
63
|
+
rollback(): void;
|
|
64
|
+
getChanges(isUndo?: boolean): IUndoRedoChange;
|
|
65
|
+
tryMerge(sender: Base, propertyName: string, newValue: any): boolean;
|
|
66
|
+
}
|
|
67
|
+
export declare class UndoRedoArrayAction implements IUndoRedoAction {
|
|
68
|
+
private _propertyName;
|
|
69
|
+
private _sender;
|
|
70
|
+
private _index;
|
|
71
|
+
private _itemsToAdd;
|
|
72
|
+
private _deletedItems;
|
|
73
|
+
constructor(_propertyName: string, _sender: Base, arrayChanges: ArrayChanges);
|
|
74
|
+
apply(): void;
|
|
75
|
+
rollback(): void;
|
|
76
|
+
getChanges(): IUndoRedoChange;
|
|
77
|
+
tryMerge(sender: Base, propertyName: string, newValue: any): boolean;
|
|
78
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { JsonObjectProperty, Base, QuestionCompositeModel } from "survey-core";
|
|
2
|
+
import { PropertyGridEditor } from ".";
|
|
3
|
+
import { ISurveyCreatorOptions } from "../creator-settings";
|
|
4
|
+
export declare class PropertyGridEditorBindings extends PropertyGridEditor {
|
|
5
|
+
fit(prop: JsonObjectProperty): boolean;
|
|
6
|
+
getJSON(): any;
|
|
7
|
+
onCreated(obj: Base, question: QuestionCompositeModel, prop: JsonObjectProperty, options: ISurveyCreatorOptions): void;
|
|
8
|
+
private getQuestions;
|
|
9
|
+
private getBindingJSON;
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { QuestionMatrixDropdownModel, QuestionMatrixModel } from "survey-core";
|
|
2
|
+
import { ISurveyCreatorOptions } from "../creator-settings";
|
|
3
|
+
import { PropertyEditorSetupValue } from "./index";
|
|
4
|
+
export declare class CellsEditor extends PropertyEditorSetupValue {
|
|
5
|
+
matrix: QuestionMatrixModel;
|
|
6
|
+
private editMatrixValue;
|
|
7
|
+
constructor(matrix: QuestionMatrixModel, options?: ISurveyCreatorOptions);
|
|
8
|
+
protected getSurveyJSON(): any;
|
|
9
|
+
protected getSurveyCreationReason(): string;
|
|
10
|
+
get editMatrix(): QuestionMatrixDropdownModel;
|
|
11
|
+
apply(): boolean;
|
|
12
|
+
private buildColumns;
|
|
13
|
+
private buildRows;
|
|
14
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { SurveyModel, QuestionPanelDynamicModel, ItemValue, PanelModel, Base, Question, QuestionCommentModel } from "survey-core";
|
|
2
|
+
import { ISurveyCreatorOptions } from "../creator-settings";
|
|
3
|
+
import { PropertyEditorSetupValue } from "./index";
|
|
4
|
+
export declare class ConditionEditorItem {
|
|
5
|
+
conjunction: string;
|
|
6
|
+
questionName: string;
|
|
7
|
+
operator: string;
|
|
8
|
+
value: any;
|
|
9
|
+
}
|
|
10
|
+
export declare class SurveyConditionEditorItem extends ConditionEditorItem {
|
|
11
|
+
survey: SurveyModel;
|
|
12
|
+
constructor(survey: SurveyModel);
|
|
13
|
+
getOperatorText(): string;
|
|
14
|
+
getValueText(): string;
|
|
15
|
+
get isValueRequired(): boolean;
|
|
16
|
+
get isReady(): boolean;
|
|
17
|
+
toExpression(): string;
|
|
18
|
+
private getQuestionValueByName;
|
|
19
|
+
private valToText;
|
|
20
|
+
private isNumeric;
|
|
21
|
+
private isQuote;
|
|
22
|
+
}
|
|
23
|
+
export declare class ConditionEditorItemsBuilder {
|
|
24
|
+
private hasValue;
|
|
25
|
+
constructor(hasValue?: (name: string) => boolean);
|
|
26
|
+
build(text: string): Array<ConditionEditorItem>;
|
|
27
|
+
private buildEditorItems;
|
|
28
|
+
private buildEditorItemsCore;
|
|
29
|
+
private buildEditorItemsAddConjunction;
|
|
30
|
+
private buildEditorItemsAddBinaryOperand;
|
|
31
|
+
private isVariableInSurvey;
|
|
32
|
+
private getArrayValueFromOperand;
|
|
33
|
+
private buildEditorItemsAddUnaryOperand;
|
|
34
|
+
private getOppositeOperator;
|
|
35
|
+
private getOperandByType;
|
|
36
|
+
private canShowValueByOperator;
|
|
37
|
+
}
|
|
38
|
+
export declare class ConditionEditor extends PropertyEditorSetupValue {
|
|
39
|
+
private propertyName;
|
|
40
|
+
static canParseExpression(text: string): boolean;
|
|
41
|
+
static canBuildExpression(text: string): boolean;
|
|
42
|
+
static isOperatorEnabled(qType: string, operatorTypes: Array<string>): boolean;
|
|
43
|
+
static isClassContains(qType: string, contains: Array<string>, notContains: Array<string>): boolean;
|
|
44
|
+
private objectValue;
|
|
45
|
+
private surveyValue;
|
|
46
|
+
private contextValue;
|
|
47
|
+
private panelValue;
|
|
48
|
+
private textEditorValue;
|
|
49
|
+
private addConditionQuestionsHash;
|
|
50
|
+
private isModalValue;
|
|
51
|
+
allConditionQuestions: Array<ItemValue>;
|
|
52
|
+
onContextChanged: (context: Question) => void;
|
|
53
|
+
constructor(survey: SurveyModel, object?: Base, options?: ISurveyCreatorOptions, propertyName?: string);
|
|
54
|
+
get title(): string;
|
|
55
|
+
set title(val: string);
|
|
56
|
+
get isModal(): boolean;
|
|
57
|
+
set isModal(val: boolean);
|
|
58
|
+
protected updatePlaceholderVisibileIf(): void;
|
|
59
|
+
protected getSurveyJSON(): any;
|
|
60
|
+
protected getSurveyCreationReason(): string;
|
|
61
|
+
get text(): string;
|
|
62
|
+
set text(val: string);
|
|
63
|
+
isModified(prevText: string): boolean;
|
|
64
|
+
get context(): Question;
|
|
65
|
+
set context(val: Question);
|
|
66
|
+
private processText;
|
|
67
|
+
get survey(): SurveyModel;
|
|
68
|
+
get object(): Base;
|
|
69
|
+
get panel(): QuestionPanelDynamicModel;
|
|
70
|
+
get textEditor(): QuestionCommentModel;
|
|
71
|
+
get isReady(): boolean;
|
|
72
|
+
errorText: string;
|
|
73
|
+
isEmpty(): boolean;
|
|
74
|
+
hasErrorInUI(): boolean;
|
|
75
|
+
apply(): boolean;
|
|
76
|
+
setIsFastEntry(showTextEdit: boolean): void;
|
|
77
|
+
private buildPanels;
|
|
78
|
+
private isSettingPanelValues;
|
|
79
|
+
private setupConditionOperator;
|
|
80
|
+
private setupConditionQuestionName;
|
|
81
|
+
private setupRemoveQuestion;
|
|
82
|
+
private setItemToPanel;
|
|
83
|
+
private getConditionQuestions;
|
|
84
|
+
private getText;
|
|
85
|
+
private getEditorItems;
|
|
86
|
+
private createEditorItemFromPanel;
|
|
87
|
+
private getQuestionNameFromPanel;
|
|
88
|
+
private getContextIndexInfo;
|
|
89
|
+
private getQuestionNameToPanel;
|
|
90
|
+
private getContextFromPanels;
|
|
91
|
+
private updateNamesOnContextChanged;
|
|
92
|
+
private getContextByQuestionName;
|
|
93
|
+
private createAllConditionQuestions;
|
|
94
|
+
private getContextObject;
|
|
95
|
+
private addValuesIntoConditionQuestions;
|
|
96
|
+
private addSurveyCalculatedValues;
|
|
97
|
+
private calculatedValueQuestion;
|
|
98
|
+
private getCalculatedValueQuestion;
|
|
99
|
+
private getOperators;
|
|
100
|
+
private rebuildQuestionValue;
|
|
101
|
+
rebuildQuestionValueOnOperandChanging(panel: PanelModel): void;
|
|
102
|
+
private canShowQuestionValue;
|
|
103
|
+
private getConditionQuestion;
|
|
104
|
+
private getQuestionConditionJson;
|
|
105
|
+
private updateOperatorEnables;
|
|
106
|
+
private updateQuestionsWidth;
|
|
107
|
+
private get defaultOperator();
|
|
108
|
+
private getFirstEnabledOperator;
|
|
109
|
+
private onPanelAdded;
|
|
110
|
+
private onPanelValueChanged;
|
|
111
|
+
private onUpdateQuestionCssClasses;
|
|
112
|
+
private onValueChanged;
|
|
113
|
+
private setTitle;
|
|
114
|
+
private showTextEditor;
|
|
115
|
+
private showBuilder;
|
|
116
|
+
private getCanShowBuilder;
|
|
117
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Base, JsonObjectProperty, Question } from "survey-core";
|
|
2
|
+
import { IPropertyEditorSetup, PropertyGridEditor } from "./index";
|
|
3
|
+
import { ISurveyCreatorOptions } from "../creator-settings";
|
|
4
|
+
export declare class PropertyGridEditorExpression extends PropertyGridEditor {
|
|
5
|
+
fit(prop: JsonObjectProperty): boolean;
|
|
6
|
+
getJSON(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
|
|
7
|
+
clearPropertyValue(obj: Base, prop: JsonObjectProperty, question: Question, options: ISurveyCreatorOptions): void;
|
|
8
|
+
}
|
|
9
|
+
export declare class PropertyGridEditorCondition extends PropertyGridEditorExpression {
|
|
10
|
+
fit(prop: JsonObjectProperty): boolean;
|
|
11
|
+
getJSON(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
|
|
12
|
+
createPropertyEditorSetup(obj: Base, prop: JsonObjectProperty, question: Question, options: ISurveyCreatorOptions): IPropertyEditorSetup;
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class DescriptionMardownParser {
|
|
2
|
+
private static boldRegEx;
|
|
3
|
+
private static italicRegEx;
|
|
4
|
+
private static codeRegEx;
|
|
5
|
+
private static linkRegEx;
|
|
6
|
+
parse(text: string): string;
|
|
7
|
+
private replace;
|
|
8
|
+
private addLineBreaks;
|
|
9
|
+
}
|
|
10
|
+
export declare function parsePropertyDescription(text: string): string;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ItemValue, QuestionCommentModel } from "survey-core";
|
|
2
|
+
import { PropertyEditorSetupValue } from "./index";
|
|
3
|
+
import { ISurveyCreatorOptions } from "../creator-settings";
|
|
4
|
+
export declare class FastEntryEditorBase extends PropertyEditorSetupValue {
|
|
5
|
+
choices: Array<any>;
|
|
6
|
+
protected className: string;
|
|
7
|
+
protected names: Array<string>;
|
|
8
|
+
protected commentValue: QuestionCommentModel;
|
|
9
|
+
protected static calcBeforeApplyItemsArray(dest: Array<any>, src: Array<any>, names: Array<string>): void;
|
|
10
|
+
static applyItemsArray(dest: Array<any>, src: Array<any>, names?: Array<string>): void;
|
|
11
|
+
constructor(choices: Array<any>, options?: ISurveyCreatorOptions, className?: string, names?: Array<string>);
|
|
12
|
+
protected getSurveyJSON(): any;
|
|
13
|
+
protected getSurveyCreationReason(): string;
|
|
14
|
+
apply(): boolean;
|
|
15
|
+
protected convertTextToItemValues(text: string): ItemValue[];
|
|
16
|
+
get comment(): QuestionCommentModel;
|
|
17
|
+
protected getChoicesCount(): number;
|
|
18
|
+
protected get isValueUnique(): boolean;
|
|
19
|
+
protected getFirstUniqueValue(): boolean;
|
|
20
|
+
setComment(): void;
|
|
21
|
+
protected collectNames(item: any, type: string, separatorCounter: number): string;
|
|
22
|
+
protected convertItemValuesToText(): string;
|
|
23
|
+
}
|
|
24
|
+
export declare class FastEntryEditor extends FastEntryEditorBase {
|
|
25
|
+
choices: Array<ItemValue>;
|
|
26
|
+
protected className: string;
|
|
27
|
+
protected names: Array<string>;
|
|
28
|
+
static applyItemValueArray(dest: Array<ItemValue>, src: Array<ItemValue>, names?: Array<string>): void;
|
|
29
|
+
constructor(choices: Array<ItemValue>, options?: ISurveyCreatorOptions, className?: string, names?: Array<string>);
|
|
30
|
+
apply(): boolean;
|
|
31
|
+
protected convertItemValuesToText(): string;
|
|
32
|
+
}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { Base, JsonObjectProperty, PanelModel, PanelModelBase, Question, SurveyModel, MatrixDynamicRowModel } from "survey-core";
|
|
2
|
+
import { ISurveyCreatorOptions } from "../creator-settings";
|
|
3
|
+
export interface IPropertyEditorSetup {
|
|
4
|
+
editSurvey: SurveyModel;
|
|
5
|
+
apply(): boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function setSurveyJSONForPropertyGrid(json: any, updateOnTyping?: boolean, titleLocationLeft?: boolean): void;
|
|
8
|
+
export declare abstract class PropertyEditorSetupValue implements IPropertyEditorSetup {
|
|
9
|
+
protected options: ISurveyCreatorOptions;
|
|
10
|
+
private editSurveyValue;
|
|
11
|
+
constructor(options?: ISurveyCreatorOptions, doSetup?: boolean);
|
|
12
|
+
protected setupSurvey(): void;
|
|
13
|
+
get editSurvey(): SurveyModel;
|
|
14
|
+
hasErrors(): boolean;
|
|
15
|
+
protected createSurvey(): SurveyModel;
|
|
16
|
+
protected abstract getSurveyJSON(): any;
|
|
17
|
+
protected abstract getSurveyCreationReason(): string;
|
|
18
|
+
abstract apply(): boolean;
|
|
19
|
+
dispose(): void;
|
|
20
|
+
}
|
|
21
|
+
export interface IPropertyGridEditor {
|
|
22
|
+
fit(prop: JsonObjectProperty, context?: string): boolean;
|
|
23
|
+
isDefault?: () => boolean;
|
|
24
|
+
getJSON(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
|
|
25
|
+
showModalPropertyEditor?: (editor: IPropertyGridEditor, property: JsonObjectProperty, question: Question, options: ISurveyCreatorOptions) => IPropertyEditorSetup;
|
|
26
|
+
onCreated?: (obj: Base, question: Question, prop: JsonObjectProperty, options: ISurveyCreatorOptions) => void;
|
|
27
|
+
validateValue?: (obj: Base, question: Question, prop: JsonObjectProperty, val: any) => string;
|
|
28
|
+
onAfterRenderQuestion?: (obj: Base, prop: JsonObjectProperty, evtOptions: any) => void;
|
|
29
|
+
createPropertyEditorSetup?: (obj: Base, prop: JsonObjectProperty, question: Question, options: ISurveyCreatorOptions) => IPropertyEditorSetup;
|
|
30
|
+
isPropertyEditorSetupEnabled?: (obj: Base, prop: JsonObjectProperty, question: Question, options: ISurveyCreatorOptions) => boolean;
|
|
31
|
+
canClearPropertyValue?: (obj: Base, prop: JsonObjectProperty, question: Question, options: ISurveyCreatorOptions) => boolean;
|
|
32
|
+
clearPropertyValue?: (obj: Base, prop: JsonObjectProperty, question: Question, options: ISurveyCreatorOptions) => void;
|
|
33
|
+
onMasterValueChanged?: (obj: Base, prop: JsonObjectProperty, question: Question) => void;
|
|
34
|
+
onAddIntoPropertyValue?: (obj: Base, prop: JsonObjectProperty, question: Question, options: ISurveyCreatorOptions) => void;
|
|
35
|
+
onMatrixCellCreated?: (obj: Base, options: any) => void;
|
|
36
|
+
onMatrixCellValueChanged?: (obj: Base, options: any) => void;
|
|
37
|
+
onMatrixAllowRemoveRow?: (obj: Base, row: any) => boolean;
|
|
38
|
+
onGetQuestionTitleActions?: (obj: Base, options: any) => void;
|
|
39
|
+
onUpdateQuestionCssClasses?: (obj: Base, options: any) => void;
|
|
40
|
+
}
|
|
41
|
+
export declare var PropertyGridEditorCollection: {
|
|
42
|
+
editors: IPropertyGridEditor[];
|
|
43
|
+
fitHash: {};
|
|
44
|
+
clearHash(): void;
|
|
45
|
+
register(editor: IPropertyGridEditor): void;
|
|
46
|
+
getEditor(prop: JsonObjectProperty, context?: string): IPropertyGridEditor;
|
|
47
|
+
isEditorFit(prop: JsonObjectProperty, asDefault?: boolean): IPropertyGridEditor;
|
|
48
|
+
getJSON(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions, context?: string): any;
|
|
49
|
+
onCreated(obj: Base, question: Question, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
|
|
50
|
+
validateValue(obj: Base, question: Question, prop: JsonObjectProperty, value: any): string;
|
|
51
|
+
onAfterRenderQuestion(obj: Base, prop: JsonObjectProperty, evtOptions: any): void;
|
|
52
|
+
onMatrixCellCreated(obj: Base, prop: JsonObjectProperty, options: any): void;
|
|
53
|
+
onMatrixCellValueChanged(obj: Base, prop: JsonObjectProperty, options: any): void;
|
|
54
|
+
onMatrixAllowRemoveRow(obj: Base, prop: JsonObjectProperty, row: MatrixDynamicRowModel): boolean;
|
|
55
|
+
onGetMatrixRowAction(obj: Base, prop: JsonObjectProperty, options: any, setObjFunc: (obj: Base) => void): void;
|
|
56
|
+
onUpdateQuestionCssClasses(obj: Base, prop: JsonObjectProperty, options: any): void;
|
|
57
|
+
onGetQuestionTitleActions(obj: Base, prop: JsonObjectProperty, options: any): void;
|
|
58
|
+
onValueChanged(obj: Base, prop: JsonObjectProperty, question: Question): void;
|
|
59
|
+
onMasterValueChanged(obj: Base, prop: JsonObjectProperty, question: Question): void;
|
|
60
|
+
};
|
|
61
|
+
export declare class PropertyGridTitleActionsCreator {
|
|
62
|
+
obj: Base;
|
|
63
|
+
private options;
|
|
64
|
+
constructor(obj: Base, options: ISurveyCreatorOptions);
|
|
65
|
+
onGetQuestionTitleActions(options: any): void;
|
|
66
|
+
private createClearValueAction;
|
|
67
|
+
private showModalPropertyEditor;
|
|
68
|
+
private createEditorSetupAction;
|
|
69
|
+
private createPropertyHelpAction;
|
|
70
|
+
private getHelpActionIconName;
|
|
71
|
+
}
|
|
72
|
+
export declare class PropertyJSONGenerator {
|
|
73
|
+
obj: Base;
|
|
74
|
+
private options;
|
|
75
|
+
private parentObj;
|
|
76
|
+
private parentProperty;
|
|
77
|
+
private properties;
|
|
78
|
+
static isPropertyReadOnly(prop: JsonObjectProperty, options: ISurveyCreatorOptions, obj: Base, parentObj: Base, parentProperty: JsonObjectProperty): boolean;
|
|
79
|
+
static getClassNameProperty(obj: Base): string;
|
|
80
|
+
constructor(obj: Base, options?: ISurveyCreatorOptions, parentObj?: Base, parentProperty?: JsonObjectProperty, properties?: Array<JsonObjectProperty>);
|
|
81
|
+
toJSON(isNested?: boolean, context?: string): any;
|
|
82
|
+
createColumnsJSON(className: string, names: Array<string>): any;
|
|
83
|
+
setupObjPanel(panel: PanelModelBase, isNestedObj?: boolean, context?: string): void;
|
|
84
|
+
private onQuestionsCreated;
|
|
85
|
+
private getVisibilityOnEvent;
|
|
86
|
+
private isPropertyReadOnly;
|
|
87
|
+
private getClasPropName;
|
|
88
|
+
private createJSON;
|
|
89
|
+
private createPanelProps;
|
|
90
|
+
private updateQuestionJSONOnSameLine;
|
|
91
|
+
private createPanelJSON;
|
|
92
|
+
private createQuestionJSON;
|
|
93
|
+
private getColumnPropertyJSON;
|
|
94
|
+
private isPropertyVisible;
|
|
95
|
+
private getPanelTitle;
|
|
96
|
+
private getQuestionTitle;
|
|
97
|
+
}
|
|
98
|
+
export declare class PropertyGridModel {
|
|
99
|
+
private surveyValue;
|
|
100
|
+
private objValue;
|
|
101
|
+
private optionsValue;
|
|
102
|
+
private titleActionsCreator;
|
|
103
|
+
private classNameProperty;
|
|
104
|
+
private classNameValue;
|
|
105
|
+
currentlySelectedProperty: string;
|
|
106
|
+
currentlySelectedPanel: PanelModel;
|
|
107
|
+
objValueChangedCallback: () => void;
|
|
108
|
+
changedFromActionCallback: (obj: Base, propertyName: string) => void;
|
|
109
|
+
refresh(): void;
|
|
110
|
+
constructor(obj?: Base, options?: ISurveyCreatorOptions);
|
|
111
|
+
get obj(): Base;
|
|
112
|
+
set obj(value: Base);
|
|
113
|
+
selectProperty(propertyName: string, focus?: boolean): void;
|
|
114
|
+
private setObjFromAction;
|
|
115
|
+
private setObj;
|
|
116
|
+
get options(): ISurveyCreatorOptions;
|
|
117
|
+
set options(val: ISurveyCreatorOptions);
|
|
118
|
+
get survey(): SurveyModel;
|
|
119
|
+
validate(): boolean;
|
|
120
|
+
collapseCategory(name: string): void;
|
|
121
|
+
expandCategory(name: string): void;
|
|
122
|
+
collapseAllCategories(): void;
|
|
123
|
+
expandAllCategories(): void;
|
|
124
|
+
protected createSurvey(json: any): SurveyModel;
|
|
125
|
+
protected getSurveyJSON(): any;
|
|
126
|
+
private validateQuestionValue;
|
|
127
|
+
private onValidateQuestion;
|
|
128
|
+
private onValueChanging;
|
|
129
|
+
private onValueChanged;
|
|
130
|
+
private changeDependedProperties;
|
|
131
|
+
private updateDependedPropertiesEditor;
|
|
132
|
+
private updateDependedPropertiesEditors;
|
|
133
|
+
private onAfterRenderQuestion;
|
|
134
|
+
private isCellCreating;
|
|
135
|
+
private onMatrixCellCreated;
|
|
136
|
+
private onMatrixCellValueChanging;
|
|
137
|
+
private onMatrixCellValidate;
|
|
138
|
+
private onGetMatrixRowAction;
|
|
139
|
+
private onUpdateQuestionCssClasses;
|
|
140
|
+
private onGetQuestionTitleActions;
|
|
141
|
+
private onMatrixCellValueChanged;
|
|
142
|
+
private getMatrixAllowRemoveRow;
|
|
143
|
+
private getMatrixOnRowRemoving;
|
|
144
|
+
private getMatrixAllowEditRow;
|
|
145
|
+
private calculateMatrixAllowOperations;
|
|
146
|
+
private onMatrixAllowRemoveRow;
|
|
147
|
+
private onMatrixRowAdded;
|
|
148
|
+
}
|
|
149
|
+
export declare abstract class PropertyGridEditor implements IPropertyGridEditor {
|
|
150
|
+
constructor();
|
|
151
|
+
abstract fit(prop: JsonObjectProperty): boolean;
|
|
152
|
+
abstract getJSON(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
|
|
153
|
+
showModalPropertyEditor(editor: IPropertyGridEditor, property: JsonObjectProperty, question: Question, options: ISurveyCreatorOptions, onClose?: (reason: "apply" | "cancel") => void): IPropertyEditorSetup;
|
|
154
|
+
protected onModalPropertyEditorShown(editor: IPropertyGridEditor, property: JsonObjectProperty, question: Question, options: ISurveyCreatorOptions): void;
|
|
155
|
+
protected onModalPropertyEditorClosed(editor: IPropertyGridEditor, property: JsonObjectProperty, question: Question, options: ISurveyCreatorOptions, reason: "apply" | "cancel"): void;
|
|
156
|
+
isSupportGrouping(): boolean;
|
|
157
|
+
onUpdateQuestionCssClasses(obj: Base, options: any): void;
|
|
158
|
+
}
|
|
159
|
+
export declare class PropertyGridEditorBoolean extends PropertyGridEditor {
|
|
160
|
+
fit(prop: JsonObjectProperty, context?: string): boolean;
|
|
161
|
+
getJSON(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
|
|
162
|
+
isSupportGrouping(): boolean;
|
|
163
|
+
}
|
|
164
|
+
export declare abstract class PropertyGridEditorStringBase extends PropertyGridEditor {
|
|
165
|
+
protected updateMaxLength(prop: JsonObjectProperty, json: any): any;
|
|
166
|
+
}
|
|
167
|
+
export declare class PropertyGridEditorString extends PropertyGridEditorStringBase {
|
|
168
|
+
fit(prop: JsonObjectProperty): boolean;
|
|
169
|
+
isDefault(): boolean;
|
|
170
|
+
getJSON(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
|
|
171
|
+
}
|
|
172
|
+
export declare class PropertyGridEditorNumber extends PropertyGridEditor {
|
|
173
|
+
fit(prop: JsonObjectProperty): boolean;
|
|
174
|
+
getJSON(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
|
|
175
|
+
}
|
|
176
|
+
export declare class PropertyGridEditorImageSize extends PropertyGridEditorString {
|
|
177
|
+
fit(prop: JsonObjectProperty): boolean;
|
|
178
|
+
isDefault(): boolean;
|
|
179
|
+
onCreated(obj: Base, question: Question, prop: JsonObjectProperty): void;
|
|
180
|
+
}
|
|
181
|
+
export declare class PropertyGridEditorText extends PropertyGridEditorStringBase {
|
|
182
|
+
fit(prop: JsonObjectProperty): boolean;
|
|
183
|
+
getJSON(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
|
|
184
|
+
}
|
|
185
|
+
export declare class PropertyGridEditorHtml extends PropertyGridEditorStringBase {
|
|
186
|
+
fit(prop: JsonObjectProperty): boolean;
|
|
187
|
+
getJSON(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
|
|
188
|
+
}
|
|
189
|
+
export declare class PropertyGridEditorColor extends PropertyGridEditor {
|
|
190
|
+
fit(prop: JsonObjectProperty): boolean;
|
|
191
|
+
getJSON(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
|
|
192
|
+
}
|
|
193
|
+
export declare class PropertyGridEditorStringArray extends PropertyGridEditor {
|
|
194
|
+
fit(prop: JsonObjectProperty): boolean;
|
|
195
|
+
getJSON(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
|
|
196
|
+
onCreated(obj: Base, question: Question, prop: JsonObjectProperty): void;
|
|
197
|
+
}
|
|
198
|
+
export declare class PropertyGridEditorDropdown extends PropertyGridEditor {
|
|
199
|
+
fit(prop: JsonObjectProperty): boolean;
|
|
200
|
+
getJSON(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
|
|
201
|
+
private getChoices;
|
|
202
|
+
private updateObjBasedOnEmptyValueItem;
|
|
203
|
+
protected get canRenderAsButtonGroup(): boolean;
|
|
204
|
+
protected renderAsButtonGroup(prop: JsonObjectProperty, choices: Array<any>): boolean;
|
|
205
|
+
onCreated(obj: Base, question: Question, prop: JsonObjectProperty): void;
|
|
206
|
+
onMasterValueChanged(obj: Base, prop: JsonObjectProperty, question: Question): void;
|
|
207
|
+
private setChoicesCore;
|
|
208
|
+
private isLocaleProp;
|
|
209
|
+
private getLocalizedText;
|
|
210
|
+
private choicesFromPropChoices;
|
|
211
|
+
private getJsonItem;
|
|
212
|
+
private setChoices;
|
|
213
|
+
private getEmptyJsonItemValue;
|
|
214
|
+
}
|
|
215
|
+
export declare class PropertyGridEditorSet extends PropertyGridEditorDropdown {
|
|
216
|
+
fit(prop: JsonObjectProperty): boolean;
|
|
217
|
+
getJSON(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
|
|
218
|
+
}
|
|
219
|
+
export declare class PropertyGridEditorPage extends PropertyGridEditorDropdown {
|
|
220
|
+
fit(prop: JsonObjectProperty): boolean;
|
|
221
|
+
protected get canRenderAsButtonGroup(): boolean;
|
|
222
|
+
onCreated(obj: Base, question: Question, prop: JsonObjectProperty): void;
|
|
223
|
+
}
|
|
224
|
+
export declare class PropertyGridEditorQuestion extends PropertyGridEditor {
|
|
225
|
+
fit(prop: JsonObjectProperty): boolean;
|
|
226
|
+
getJSON(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
|
|
227
|
+
private getChoices;
|
|
228
|
+
protected getQuestions(survey: SurveyModel, obj: Base): Array<Question>;
|
|
229
|
+
protected getItemValue(question: Question): any;
|
|
230
|
+
}
|
|
231
|
+
export declare class PropertyGridEditorQuestionSelectBase extends PropertyGridEditorQuestion {
|
|
232
|
+
fit(prop: JsonObjectProperty): boolean;
|
|
233
|
+
protected getQuestions(survey: SurveyModel, obj: Base): Array<Question>;
|
|
234
|
+
}
|
|
235
|
+
export declare class PropertyGridEditorQuestionValue extends PropertyGridEditorQuestion {
|
|
236
|
+
fit(prop: JsonObjectProperty): boolean;
|
|
237
|
+
protected getItemValue(question: Question): any;
|
|
238
|
+
protected getQuestions(survey: SurveyModel, obj: Base): Array<Question>;
|
|
239
|
+
}
|