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,68 @@
|
|
|
1
|
+
import { Base, LocalizableString, JsonObjectProperty, EventBase, CharacterCounter } from "survey-core";
|
|
2
|
+
import { CreatorBase } from "../creator-base";
|
|
3
|
+
import { QuestionAdornerViewModel } from "./question";
|
|
4
|
+
export declare abstract class StringItemsNavigatorBase {
|
|
5
|
+
protected question: any;
|
|
6
|
+
constructor(question: any);
|
|
7
|
+
protected abstract getItemLocString(items: any, item: any): LocalizableString;
|
|
8
|
+
protected abstract getItemSets(): Array<any>;
|
|
9
|
+
protected abstract addNewItem(items: any, text?: string): void;
|
|
10
|
+
protected abstract getItemsPropertyName(items: any): string;
|
|
11
|
+
private static createItemsNavigator;
|
|
12
|
+
protected addNewItems(items: any, startIndex: number, itemsToAdd: string[]): void;
|
|
13
|
+
private setEventsForItem;
|
|
14
|
+
static setQuestion(questionAdorner: QuestionAdornerViewModel): boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare class StringEditorConnector extends Base {
|
|
17
|
+
private locString;
|
|
18
|
+
static get(locString: LocalizableString): StringEditorConnector;
|
|
19
|
+
setAutoFocus(): void;
|
|
20
|
+
hasEditCompleteHandler: boolean;
|
|
21
|
+
focusOnEditor: boolean;
|
|
22
|
+
activateEditor(): void;
|
|
23
|
+
onDoActivate: EventBase<LocalizableString, any>;
|
|
24
|
+
onTextChanging: EventBase<StringEditorViewModelBase, any>;
|
|
25
|
+
onEditComplete: EventBase<StringEditorViewModelBase, any>;
|
|
26
|
+
onBackspaceEmptyString: EventBase<StringEditorViewModelBase, any>;
|
|
27
|
+
constructor(locString: LocalizableString);
|
|
28
|
+
}
|
|
29
|
+
export declare class StringEditorViewModelBase extends Base {
|
|
30
|
+
private locString;
|
|
31
|
+
private creator;
|
|
32
|
+
private blurredByEscape;
|
|
33
|
+
private focusedProgram;
|
|
34
|
+
private valueBeforeEdit;
|
|
35
|
+
private connector;
|
|
36
|
+
getEditorElement: () => HTMLElement;
|
|
37
|
+
characterCounter: CharacterCounter;
|
|
38
|
+
errorText: string;
|
|
39
|
+
focused: boolean;
|
|
40
|
+
editAsText: boolean;
|
|
41
|
+
compostionInProgress: boolean;
|
|
42
|
+
constructor(locString: LocalizableString, creator: CreatorBase);
|
|
43
|
+
afterRender(): void;
|
|
44
|
+
activate(): boolean;
|
|
45
|
+
setLocString(locString: LocalizableString): void;
|
|
46
|
+
checkConstraints(event: any): void;
|
|
47
|
+
blurEditor: () => void;
|
|
48
|
+
onClick(event: any): void;
|
|
49
|
+
onFocus(event: any): void;
|
|
50
|
+
private checkMarkdownToTextConversion;
|
|
51
|
+
onCompositionStart(event: any): void;
|
|
52
|
+
onInput(event: any): void;
|
|
53
|
+
onCompositionEnd(event: any): void;
|
|
54
|
+
onBlur(event: any): void;
|
|
55
|
+
done(event: Event): void;
|
|
56
|
+
onKeyDown(event: KeyboardEvent): boolean;
|
|
57
|
+
onKeyUp(event: KeyboardEvent): boolean;
|
|
58
|
+
private justFocused;
|
|
59
|
+
onMouseUp(event: MouseEvent): boolean;
|
|
60
|
+
findProperty(): JsonObjectProperty;
|
|
61
|
+
get maxLength(): number;
|
|
62
|
+
placeholderValue: string;
|
|
63
|
+
get placeholder(): string;
|
|
64
|
+
get contentEditable(): boolean;
|
|
65
|
+
get showCharacterCounter(): boolean;
|
|
66
|
+
get getCharacterCounterClass(): string;
|
|
67
|
+
className(text: any): string;
|
|
68
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Base, Action } from "survey-core";
|
|
2
|
+
import { ICreatorPlugin, CreatorBase } from "../../creator-base";
|
|
3
|
+
import { PropertyGridViewModel } from "../../property-grid/property-grid-view-model";
|
|
4
|
+
import { TabDesignerViewModel } from "./designer";
|
|
5
|
+
export declare class TabDesignerPlugin implements ICreatorPlugin {
|
|
6
|
+
private creator;
|
|
7
|
+
model: TabDesignerViewModel;
|
|
8
|
+
propertyGrid: PropertyGridViewModel;
|
|
9
|
+
private propertyGridTab;
|
|
10
|
+
private toolboxTab;
|
|
11
|
+
private surveySettingsAction;
|
|
12
|
+
private saveSurveyAction;
|
|
13
|
+
previewAction: Action;
|
|
14
|
+
private get isSurveySelected();
|
|
15
|
+
private get isSettingsActive();
|
|
16
|
+
private createVisibleUpdater;
|
|
17
|
+
private updatePropertyGridTabCaption;
|
|
18
|
+
constructor(creator: CreatorBase);
|
|
19
|
+
activate(): void;
|
|
20
|
+
deactivate(): boolean;
|
|
21
|
+
onDesignerSurveyPropertyChanged(obj: Base, propName: string): void;
|
|
22
|
+
update(): void;
|
|
23
|
+
createActions(): Action[];
|
|
24
|
+
selectSurvey(): void;
|
|
25
|
+
addFooterActions(): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Base, PageModel, SurveyModel } from "survey-core";
|
|
2
|
+
import { CreatorBase } from "../../creator-base";
|
|
3
|
+
import { PagesController } from "../../pages-controller";
|
|
4
|
+
export declare const initialSettingsAllowShowEmptyTitleInDesignMode: boolean;
|
|
5
|
+
export declare class TabDesignerViewModel extends Base {
|
|
6
|
+
private cssUpdater;
|
|
7
|
+
private pagesControllerValue;
|
|
8
|
+
newPage: PageModel;
|
|
9
|
+
showNewPage: boolean;
|
|
10
|
+
pageCount: number;
|
|
11
|
+
designerCss: string;
|
|
12
|
+
showPlaceholder: boolean;
|
|
13
|
+
creator: CreatorBase;
|
|
14
|
+
private createNewPage;
|
|
15
|
+
private get canShowNewPage();
|
|
16
|
+
constructor(creator: CreatorBase);
|
|
17
|
+
get survey(): SurveyModel;
|
|
18
|
+
get pagesController(): PagesController;
|
|
19
|
+
get isToolboxVisible(): boolean;
|
|
20
|
+
get placeholderText(): string;
|
|
21
|
+
private isUpdatingNewPage;
|
|
22
|
+
onDesignerSurveyPropertyChanged(obj: Base, propName: string): void;
|
|
23
|
+
private calculateDesignerCss;
|
|
24
|
+
initSurvey(): void;
|
|
25
|
+
private checkNewPage;
|
|
26
|
+
private checkLastPageToDelete;
|
|
27
|
+
clickDesigner(): void;
|
|
28
|
+
getRootCss(): string;
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const json: any;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Base, SurveyModel } from "survey-core";
|
|
2
|
+
import { ICreatorPlugin, CreatorBase } from "../../creator-base";
|
|
3
|
+
export declare class EmbedModel extends Base {
|
|
4
|
+
survey: SurveyModel;
|
|
5
|
+
constructor(creator: CreatorBase);
|
|
6
|
+
}
|
|
7
|
+
export declare class TabEmbedPlugin implements ICreatorPlugin {
|
|
8
|
+
private creator;
|
|
9
|
+
model: EmbedModel;
|
|
10
|
+
constructor(creator: CreatorBase);
|
|
11
|
+
activate(): void;
|
|
12
|
+
deactivate(): boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ICreatorPlugin, CreatorBase } from "../../creator-base";
|
|
2
|
+
import { JsonEditorBaseModel, TabJsonEditorBasePlugin } from "./json-editor-plugin";
|
|
3
|
+
export declare class AceJsonEditorModel extends JsonEditorBaseModel {
|
|
4
|
+
static aceBasePath: string;
|
|
5
|
+
private aceEditor;
|
|
6
|
+
private aceCanUndo;
|
|
7
|
+
private aceCanRedo;
|
|
8
|
+
constructor(creator: CreatorBase);
|
|
9
|
+
protected getText(): string;
|
|
10
|
+
protected setText(value: string): void;
|
|
11
|
+
init(aceEditor: any): void;
|
|
12
|
+
private updateUndoRedoState;
|
|
13
|
+
protected onTextChanged(): void;
|
|
14
|
+
private createAnnotations;
|
|
15
|
+
protected setErrors(errors: any[]): void;
|
|
16
|
+
onEditorActivated(): void;
|
|
17
|
+
}
|
|
18
|
+
export declare class TabJsonEditorAcePlugin extends TabJsonEditorBasePlugin implements ICreatorPlugin {
|
|
19
|
+
constructor(creator: CreatorBase);
|
|
20
|
+
protected createModel(creator: CreatorBase): JsonEditorBaseModel;
|
|
21
|
+
static hasAceEditor(): boolean;
|
|
22
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Base } from "survey-core";
|
|
2
|
+
import { ICreatorPlugin, CreatorBase } from "../../creator-base";
|
|
3
|
+
export declare abstract class JsonEditorBaseModel extends Base {
|
|
4
|
+
protected creator: CreatorBase;
|
|
5
|
+
isJSONChanged: boolean;
|
|
6
|
+
isProcessingImmediately: boolean;
|
|
7
|
+
private static updateTextTimeout;
|
|
8
|
+
private jsonEditorChangedTimeoutId;
|
|
9
|
+
constructor(creator: CreatorBase);
|
|
10
|
+
get text(): string;
|
|
11
|
+
set text(val: string);
|
|
12
|
+
protected abstract getText(): string;
|
|
13
|
+
protected abstract setText(val: string): void;
|
|
14
|
+
protected onEditorActivated(): void;
|
|
15
|
+
onPluginActivate(): void;
|
|
16
|
+
protected onTextChanged(): void;
|
|
17
|
+
protected abstract setErrors(errors: any[]): void;
|
|
18
|
+
processErrors(text: string): void;
|
|
19
|
+
get readOnly(): boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare abstract class TabJsonEditorBasePlugin implements ICreatorPlugin {
|
|
22
|
+
private creator;
|
|
23
|
+
model: JsonEditorBaseModel;
|
|
24
|
+
constructor(creator: CreatorBase);
|
|
25
|
+
activate(): void;
|
|
26
|
+
deactivate(): boolean;
|
|
27
|
+
protected abstract createModel(creator: CreatorBase): JsonEditorBaseModel;
|
|
28
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ICreatorPlugin, CreatorBase } from "../../creator-base";
|
|
2
|
+
import { JsonEditorBaseModel, TabJsonEditorBasePlugin } from "./json-editor-plugin";
|
|
3
|
+
export declare class TextareaJsonEditorModel extends JsonEditorBaseModel {
|
|
4
|
+
protected _text: string;
|
|
5
|
+
private _errors;
|
|
6
|
+
ariaLabel: string;
|
|
7
|
+
canShowErrors: boolean;
|
|
8
|
+
constructor(creator: CreatorBase);
|
|
9
|
+
checkKey(data: any, e: any): boolean;
|
|
10
|
+
protected getText(): string;
|
|
11
|
+
protected setText(value: string): void;
|
|
12
|
+
get errorButtonText(): string;
|
|
13
|
+
toggleErrors(): void;
|
|
14
|
+
get userFriendlyErrors(): any[];
|
|
15
|
+
get errors(): any[];
|
|
16
|
+
protected onTextChanged(): void;
|
|
17
|
+
protected setErrors(errors: any[]): void;
|
|
18
|
+
}
|
|
19
|
+
export declare class TabJsonEditorTextareaPlugin extends TabJsonEditorBasePlugin implements ICreatorPlugin {
|
|
20
|
+
constructor(creator: CreatorBase);
|
|
21
|
+
protected createModel(creator: CreatorBase): JsonEditorBaseModel;
|
|
22
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Base, ItemValue, PanelModel, QuestionDropdownModel, SurveyModel } from "survey-core";
|
|
2
|
+
import { ISurveyCreatorOptions } from "../../creator-settings";
|
|
3
|
+
import { SurveyLogicAction } from "./logic-items";
|
|
4
|
+
import { SurveyLogicType } from "./logic-types";
|
|
5
|
+
export declare class LogicActionModelBase {
|
|
6
|
+
protected panel: PanelModel;
|
|
7
|
+
initialLogicAction: SurveyLogicAction;
|
|
8
|
+
logicType: SurveyLogicType;
|
|
9
|
+
isTrigger: boolean;
|
|
10
|
+
currentLogicAction: SurveyLogicAction;
|
|
11
|
+
static createActionModel(panel: PanelModel, logicAction: SurveyLogicAction, logicType: SurveyLogicType, selectorElementsHash: any): LogicActionModelBase;
|
|
12
|
+
constructor(panel: PanelModel, initialLogicAction: SurveyLogicAction, logicType: SurveyLogicType);
|
|
13
|
+
updateCurrentLogicAction(survey: SurveyModel): boolean;
|
|
14
|
+
afterUpdateInitialLogicAction(): void;
|
|
15
|
+
resetElements(): void;
|
|
16
|
+
getSelectedElement(): string;
|
|
17
|
+
updateInitialLogicAction(): void;
|
|
18
|
+
setInitialElementValue(question: QuestionDropdownModel, action: SurveyLogicAction, selectedQuestion: string): void;
|
|
19
|
+
}
|
|
20
|
+
export declare class LogicActionModel extends LogicActionModelBase {
|
|
21
|
+
private selectorElementsHash;
|
|
22
|
+
private getSelectorOptionsText;
|
|
23
|
+
private getElementBySelectorName;
|
|
24
|
+
constructor(panel: PanelModel, logicAction: SurveyLogicAction, logicType: SurveyLogicType, selectorElementsHash: any);
|
|
25
|
+
updateCurrentLogicAction(survey: SurveyModel): boolean;
|
|
26
|
+
resetElements(): void;
|
|
27
|
+
updatePanelElements(selectedElement: string, choices: Array<ItemValue>): void;
|
|
28
|
+
getSelectedElement(): string;
|
|
29
|
+
}
|
|
30
|
+
export declare class LogicActionTriggerModel extends LogicActionModelBase {
|
|
31
|
+
private panelObj;
|
|
32
|
+
isTrigger: boolean;
|
|
33
|
+
private recreateQuestion;
|
|
34
|
+
private updateSetValueQuestion;
|
|
35
|
+
private updateRunExpressionQuestion;
|
|
36
|
+
private createElementPanelObj;
|
|
37
|
+
private getQuestions;
|
|
38
|
+
private resetPanel;
|
|
39
|
+
private updateVisibilityPanel;
|
|
40
|
+
private updatePanelQuestionsValue;
|
|
41
|
+
constructor(panel: PanelModel, logicAction: SurveyLogicAction, logicType: SurveyLogicType);
|
|
42
|
+
afterUpdateInitialLogicAction(): void;
|
|
43
|
+
updateCurrentLogicAction(survey: SurveyModel): boolean;
|
|
44
|
+
updatePanel(propertyName: string, newValue: any, options: ISurveyCreatorOptions, survey: SurveyModel): void;
|
|
45
|
+
setPanelObj(obj: Base): void;
|
|
46
|
+
resetElements(): void;
|
|
47
|
+
updatePanelElements(selectedElement: string, options?: ISurveyCreatorOptions): void;
|
|
48
|
+
getSelectedElement(): string;
|
|
49
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare class SurveyLogicExpressionUpdater {
|
|
2
|
+
private operand;
|
|
3
|
+
private constChanges;
|
|
4
|
+
constructor(expresion: string);
|
|
5
|
+
update(varName: string, oldValue: any, newValue: any): void;
|
|
6
|
+
get isModified(): boolean;
|
|
7
|
+
toString(): string;
|
|
8
|
+
private constToString;
|
|
9
|
+
private binaryToString;
|
|
10
|
+
private operandToString;
|
|
11
|
+
private operatorToString;
|
|
12
|
+
static operatorText: {
|
|
13
|
+
less: string;
|
|
14
|
+
lessorequal: string;
|
|
15
|
+
greater: string;
|
|
16
|
+
greaterorequal: string;
|
|
17
|
+
equal: string;
|
|
18
|
+
notequal: string;
|
|
19
|
+
plus: string;
|
|
20
|
+
minus: string;
|
|
21
|
+
mul: string;
|
|
22
|
+
div: string;
|
|
23
|
+
power: string;
|
|
24
|
+
mod: string;
|
|
25
|
+
negate: string;
|
|
26
|
+
};
|
|
27
|
+
private updateOperand;
|
|
28
|
+
private hasVarName;
|
|
29
|
+
private updateOperandConst;
|
|
30
|
+
private getCorrectNewValue;
|
|
31
|
+
}
|
|
32
|
+
export declare function updateLogicExpression(expression: string, varName: string, oldValue: any, newValue: any): string;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { SurveyModel, QuestionPanelDynamicModel, PanelModel, Question } from "survey-core";
|
|
2
|
+
import { ISurveyCreatorOptions } from "../../creator-settings";
|
|
3
|
+
import { PropertyEditorSetupValue } from "../../property-grid/index";
|
|
4
|
+
import { SurveyLogicItem, SurveyLogicAction } from "./logic-items";
|
|
5
|
+
import { LogicActionModelBase } from "./logic-actions-model";
|
|
6
|
+
export declare class LogicItemEditor extends PropertyEditorSetupValue {
|
|
7
|
+
protected options: ISurveyCreatorOptions;
|
|
8
|
+
private logicTypeChoices;
|
|
9
|
+
private editableItemValue;
|
|
10
|
+
private isBuildingPanels;
|
|
11
|
+
private initialSelectedElements;
|
|
12
|
+
private isModifiedValue;
|
|
13
|
+
private contextValue;
|
|
14
|
+
private selectorElementsHash;
|
|
15
|
+
constructor(editableItem: SurveyLogicItem, options?: ISurveyCreatorOptions);
|
|
16
|
+
get editableItem(): SurveyLogicItem;
|
|
17
|
+
setEditableItem(val: SurveyLogicItem): void;
|
|
18
|
+
get survey(): SurveyModel;
|
|
19
|
+
get isModified(): boolean;
|
|
20
|
+
get panel(): QuestionPanelDynamicModel;
|
|
21
|
+
get panels(): Array<PanelModel>;
|
|
22
|
+
getActionModelByPanel(panel: PanelModel): LogicActionModelBase;
|
|
23
|
+
setActionModelByPanel(panel: PanelModel, actionModel: LogicActionModelBase): void;
|
|
24
|
+
get context(): Question;
|
|
25
|
+
set context(val: Question);
|
|
26
|
+
private getLogicTypeByPanel;
|
|
27
|
+
protected getSurveyJSON(): any;
|
|
28
|
+
protected getSurveyCreationReason(): string;
|
|
29
|
+
resetModified(): void;
|
|
30
|
+
isEmpty(): boolean;
|
|
31
|
+
apply(): boolean;
|
|
32
|
+
getEditingActions(): Array<SurveyLogicAction>;
|
|
33
|
+
private onUpdateQuestionCssClasses;
|
|
34
|
+
private onUpdatePanelCssClasses;
|
|
35
|
+
private onValueChanged;
|
|
36
|
+
private onQuestionAdded;
|
|
37
|
+
private onGetQuestionTitleActions;
|
|
38
|
+
private applyPanel;
|
|
39
|
+
private buildInitialSelectedElements;
|
|
40
|
+
private buildPanels;
|
|
41
|
+
private onPanelAdded;
|
|
42
|
+
private updatePanelsOnContextChanged;
|
|
43
|
+
private isPanelSupportContext;
|
|
44
|
+
private updateSelectorOnContextChanged;
|
|
45
|
+
private getLogicTypeChoices;
|
|
46
|
+
private onLogicTypeChanged;
|
|
47
|
+
private getLogicTypeByName;
|
|
48
|
+
private isElementSelectorVisible;
|
|
49
|
+
getLocString(name: string): string;
|
|
50
|
+
private getElementText;
|
|
51
|
+
private getSelectorChoices;
|
|
52
|
+
private isElementInInitialSelection;
|
|
53
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { SurveyModel, Base, Question, ItemValue, MatrixDropdownColumn } from "survey-core";
|
|
2
|
+
import { SurveyLogicType } from "./logic-types";
|
|
3
|
+
export declare class SurveyLogicAction {
|
|
4
|
+
private surveyValue;
|
|
5
|
+
private logicTypeValue;
|
|
6
|
+
private elementValue;
|
|
7
|
+
constructor(logicType: SurveyLogicType, element: Base, survey: SurveyModel);
|
|
8
|
+
get logicType(): SurveyLogicType;
|
|
9
|
+
get element(): Base;
|
|
10
|
+
get parentElement(): Base;
|
|
11
|
+
get survey(): SurveyModel;
|
|
12
|
+
apply(expression: string, isRenaming?: boolean): void;
|
|
13
|
+
renameQuestion(oldName: string, newName: string): void;
|
|
14
|
+
clone(): SurveyLogicAction;
|
|
15
|
+
equals(action: SurveyLogicAction): boolean;
|
|
16
|
+
get name(): string;
|
|
17
|
+
get logicTypeName(): string;
|
|
18
|
+
get logicTypeDescription(): string;
|
|
19
|
+
get text(): string;
|
|
20
|
+
get deleteActionText(): string;
|
|
21
|
+
getLocString(name: string): string;
|
|
22
|
+
isSuitableByQuestionName(questionName: string): boolean;
|
|
23
|
+
isSuitableByLogicType(logicTypeName: string): boolean;
|
|
24
|
+
addQuestionNames(names: string[]): void;
|
|
25
|
+
private get questionNames();
|
|
26
|
+
get elementName(): string;
|
|
27
|
+
private get elementOwnerName();
|
|
28
|
+
private getOwnerElement;
|
|
29
|
+
private get questionNamesValues();
|
|
30
|
+
}
|
|
31
|
+
export interface ISurveyLogicItemOwner {
|
|
32
|
+
survey: SurveyModel;
|
|
33
|
+
readOnly: boolean;
|
|
34
|
+
editItem(item: SurveyLogicItem): any;
|
|
35
|
+
removeItem(item: SurveyLogicItem): any;
|
|
36
|
+
getExpressionAsDisplayText(expression: string): string;
|
|
37
|
+
getVisibleLogicTypes(): Array<SurveyLogicType>;
|
|
38
|
+
}
|
|
39
|
+
export declare class SurveyLogicItem {
|
|
40
|
+
private owner;
|
|
41
|
+
expression: string;
|
|
42
|
+
private static counter;
|
|
43
|
+
private idValue;
|
|
44
|
+
private removedActions;
|
|
45
|
+
private actionsValue;
|
|
46
|
+
isNew: boolean;
|
|
47
|
+
isModified: boolean;
|
|
48
|
+
constructor(owner: ISurveyLogicItemOwner, expression?: string);
|
|
49
|
+
get actions(): Array<SurveyLogicAction>;
|
|
50
|
+
get id(): number;
|
|
51
|
+
get name(): string;
|
|
52
|
+
get survey(): SurveyModel;
|
|
53
|
+
getVisibleLogicTypes(): Array<SurveyLogicType>;
|
|
54
|
+
get expressionText(): string;
|
|
55
|
+
get actionsText(): string;
|
|
56
|
+
getDisplayText(): string;
|
|
57
|
+
edit(): void;
|
|
58
|
+
remove(): void;
|
|
59
|
+
get isReadOnly(): boolean;
|
|
60
|
+
addNewAction(action: SurveyLogicAction): void;
|
|
61
|
+
removeAction(action: SurveyLogicAction): void;
|
|
62
|
+
replaceAction(newAction: SurveyLogicAction, oldAction: SurveyLogicAction): void;
|
|
63
|
+
clone(): SurveyLogicItem;
|
|
64
|
+
equals(item: SurveyLogicItem): boolean;
|
|
65
|
+
private replaceActionCore;
|
|
66
|
+
apply(expression: string): void;
|
|
67
|
+
renameQuestion(oldName: string, newName: string): void;
|
|
68
|
+
renameColumn(question: Question, column: MatrixDropdownColumn, oldName: string): void;
|
|
69
|
+
renameItemValue(question: Question, item: ItemValue, oldValue: any): void;
|
|
70
|
+
private renameDropdownColumnItemValue;
|
|
71
|
+
renameRowValue(question: Question, item: ItemValue, oldValue: any): void;
|
|
72
|
+
private canUpdateExpressionByQuestion;
|
|
73
|
+
private isQuestionInExpression;
|
|
74
|
+
private isStrContainsInExpression;
|
|
75
|
+
private getItemValueQuestionName;
|
|
76
|
+
removeQuestion(name: string): void;
|
|
77
|
+
getQuestionNames(): string[];
|
|
78
|
+
getActionTypes(): string[];
|
|
79
|
+
getContext(): Base;
|
|
80
|
+
private getQuestionNamesFromExpression;
|
|
81
|
+
private getQuestionNamesFromActions;
|
|
82
|
+
private getExpressionAsDisplayText;
|
|
83
|
+
get editText(): string;
|
|
84
|
+
get deleteText(): string;
|
|
85
|
+
get ifText(): string;
|
|
86
|
+
isSuitable(filteredName: string, logicTypeName?: string): boolean;
|
|
87
|
+
private isSuitableInExpression;
|
|
88
|
+
private isSuitableByNameInActions;
|
|
89
|
+
private isSuitableByLogicTypeInActions;
|
|
90
|
+
private renameQuestionInExpression;
|
|
91
|
+
private renameQuestionInExpressionCore;
|
|
92
|
+
private removeQuestionInExpression;
|
|
93
|
+
private applyExpression;
|
|
94
|
+
private removeActions;
|
|
95
|
+
private removeSameActions;
|
|
96
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Action } from "survey-core";
|
|
2
|
+
import { CreatorBase, ICreatorPlugin } from "../../creator-base";
|
|
3
|
+
import { SurveyLogicUI } from "./logic-ui";
|
|
4
|
+
export declare class TabLogicPlugin implements ICreatorPlugin {
|
|
5
|
+
private creator;
|
|
6
|
+
private filterQuestionAction;
|
|
7
|
+
private filterActionTypeAction;
|
|
8
|
+
private fastEntryAction;
|
|
9
|
+
model: SurveyLogicUI;
|
|
10
|
+
constructor(creator: CreatorBase);
|
|
11
|
+
activate(): void;
|
|
12
|
+
private createFilterTypeTitleUpdater;
|
|
13
|
+
private createFilterQuestionTitleUpdater;
|
|
14
|
+
update(): void;
|
|
15
|
+
canDeactivateAsync(onSuccess: () => void): void;
|
|
16
|
+
deactivate(): boolean;
|
|
17
|
+
dispose(): void;
|
|
18
|
+
private disposeObjs;
|
|
19
|
+
createActions(): Action[];
|
|
20
|
+
private get showAllQuestionsText();
|
|
21
|
+
private get showAllActionTypesText();
|
|
22
|
+
}
|