survey-creator-core 2.0.0 → 2.0.2
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/fesm/i18n/arabic.js +1 -1
- package/fesm/i18n/bulgarian.js +1 -1
- package/fesm/i18n/burmese.js +1 -1
- package/fesm/i18n/croatian.js +1 -1
- package/fesm/i18n/czech.js +1 -1
- package/fesm/i18n/danish.js +1 -1
- package/fesm/i18n/dutch.js +1 -1
- package/fesm/i18n/english.js +1 -1
- package/fesm/i18n/finnish.js +1 -1
- package/fesm/i18n/french.js +1 -1
- package/fesm/i18n/german.js +1 -1
- package/fesm/i18n/hebrew.js +1 -1
- package/fesm/i18n/hungarian.js +1 -1
- package/fesm/i18n/index.js +1 -1
- package/fesm/i18n/indonesian.js +1 -1
- package/fesm/i18n/italian.js +1 -1
- package/fesm/i18n/japanese.js +1 -1
- package/fesm/i18n/korean.js +1 -1
- package/fesm/i18n/malay.js +1 -1
- package/fesm/i18n/mongolian.js +1 -1
- package/fesm/i18n/norwegian.js +1 -1
- package/fesm/i18n/persian.js +1 -1
- package/fesm/i18n/polish.js +1 -1
- package/fesm/i18n/portuguese.js +1 -1
- package/fesm/i18n/romanian.js +1 -1
- package/fesm/i18n/russian.js +1 -1
- package/fesm/i18n/simplified-chinese.js +1 -1
- package/fesm/i18n/slovak.js +1 -1
- package/fesm/i18n/slovenian.js +1 -1
- package/fesm/i18n/spanish.js +1 -1
- package/fesm/i18n/swedish.js +1 -1
- package/fesm/i18n/tajik.js +1 -1
- package/fesm/i18n/thai.js +1 -1
- package/fesm/i18n/traditional-chinese.js +1 -1
- package/fesm/i18n/turkish.js +1 -1
- package/fesm/survey-creator-core.i18n.js +1 -1
- package/fesm/survey-creator-core.js +1680 -1374
- package/fesm/survey-creator-core.js.map +1 -1
- package/fesm/themes/index.js +34 -1
- package/fesm/themes/index.js.map +1 -1
- package/fonts.fontless.css +1 -1
- package/fonts.fontless.min.css +1 -1
- package/i18n/arabic.js +1 -1
- package/i18n/arabic.min.js.LICENSE.txt +1 -1
- package/i18n/bulgarian.js +1 -1
- package/i18n/bulgarian.min.js.LICENSE.txt +1 -1
- package/i18n/burmese.js +1 -1
- package/i18n/burmese.min.js.LICENSE.txt +1 -1
- package/i18n/croatian.js +1 -1
- package/i18n/croatian.min.js.LICENSE.txt +1 -1
- package/i18n/czech.js +1 -1
- package/i18n/czech.min.js.LICENSE.txt +1 -1
- package/i18n/danish.js +1 -1
- package/i18n/danish.min.js.LICENSE.txt +1 -1
- package/i18n/dutch.js +1 -1
- package/i18n/dutch.min.js.LICENSE.txt +1 -1
- package/i18n/english.js +1 -1
- package/i18n/english.min.js.LICENSE.txt +1 -1
- package/i18n/finnish.js +1 -1
- package/i18n/finnish.min.js.LICENSE.txt +1 -1
- package/i18n/french.js +1 -1
- package/i18n/french.min.js.LICENSE.txt +1 -1
- package/i18n/german.js +1 -1
- package/i18n/german.min.js.LICENSE.txt +1 -1
- package/i18n/hebrew.js +1 -1
- package/i18n/hebrew.min.js.LICENSE.txt +1 -1
- package/i18n/hungarian.js +1 -1
- package/i18n/hungarian.min.js.LICENSE.txt +1 -1
- package/i18n/index.js +1 -1
- package/i18n/index.min.js.LICENSE.txt +1 -1
- package/i18n/indonesian.js +1 -1
- package/i18n/indonesian.min.js.LICENSE.txt +1 -1
- package/i18n/italian.js +1 -1
- package/i18n/italian.min.js.LICENSE.txt +1 -1
- package/i18n/japanese.js +1 -1
- package/i18n/japanese.min.js.LICENSE.txt +1 -1
- package/i18n/korean.js +1 -1
- package/i18n/korean.min.js.LICENSE.txt +1 -1
- package/i18n/malay.js +1 -1
- package/i18n/malay.min.js.LICENSE.txt +1 -1
- package/i18n/mongolian.js +1 -1
- package/i18n/mongolian.min.js.LICENSE.txt +1 -1
- package/i18n/norwegian.js +1 -1
- package/i18n/norwegian.min.js.LICENSE.txt +1 -1
- package/i18n/persian.js +1 -1
- package/i18n/persian.min.js.LICENSE.txt +1 -1
- package/i18n/polish.js +1 -1
- package/i18n/polish.min.js.LICENSE.txt +1 -1
- package/i18n/portuguese.js +1 -1
- package/i18n/portuguese.min.js.LICENSE.txt +1 -1
- package/i18n/romanian.js +1 -1
- package/i18n/romanian.min.js.LICENSE.txt +1 -1
- package/i18n/russian.js +1 -1
- package/i18n/russian.min.js.LICENSE.txt +1 -1
- package/i18n/simplified-chinese.js +1 -1
- package/i18n/simplified-chinese.min.js.LICENSE.txt +1 -1
- package/i18n/slovak.js +1 -1
- package/i18n/slovak.min.js.LICENSE.txt +1 -1
- package/i18n/slovenian.js +1 -1
- package/i18n/slovenian.min.js.LICENSE.txt +1 -1
- package/i18n/spanish.js +1 -1
- package/i18n/spanish.min.js.LICENSE.txt +1 -1
- package/i18n/swedish.js +1 -1
- package/i18n/swedish.min.js.LICENSE.txt +1 -1
- package/i18n/tajik.js +1 -1
- package/i18n/tajik.min.js.LICENSE.txt +1 -1
- package/i18n/thai.js +1 -1
- package/i18n/thai.min.js.LICENSE.txt +1 -1
- package/i18n/traditional-chinese.js +1 -1
- package/i18n/traditional-chinese.min.js.LICENSE.txt +1 -1
- package/i18n/turkish.js +1 -1
- package/i18n/turkish.min.js.LICENSE.txt +1 -1
- package/package.json +2 -2
- package/survey-creator-core.css +260 -246
- package/survey-creator-core.fontless.css +259 -245
- package/survey-creator-core.fontless.css.map +1 -1
- package/survey-creator-core.fontless.min.css +22 -22
- package/survey-creator-core.i18n.js +1 -1
- package/survey-creator-core.i18n.min.js.LICENSE.txt +1 -1
- package/survey-creator-core.js +6372 -6002
- package/survey-creator-core.js.map +1 -1
- package/survey-creator-core.min.css +23 -23
- package/survey-creator-core.min.js +1 -1
- package/survey-creator-core.min.js.LICENSE.txt +1 -1
- package/themes/default-contrast.js +1 -1
- package/themes/default-contrast.min.js.LICENSE.txt +1 -1
- package/themes/default-dark.js +1 -1
- package/themes/default-dark.min.js.LICENSE.txt +1 -1
- package/themes/index.d.ts +33 -0
- package/themes/index.js +34 -1
- package/themes/index.js.map +1 -1
- package/themes/index.min.js +1 -1
- package/themes/index.min.js.LICENSE.txt +1 -1
- package/themes/sc2020.d.ts +33 -0
- package/themes/sc2020.js +34 -1
- package/themes/sc2020.js.map +1 -1
- package/themes/sc2020.min.js +1 -1
- package/themes/sc2020.min.js.LICENSE.txt +1 -1
- package/typings/components/action-container-view-model.d.ts +1 -85
- package/typings/components/page.d.ts +3 -7
- package/typings/components/question.d.ts +3 -4
- package/typings/components/row.d.ts +3 -3
- package/typings/components/scroll.d.ts +0 -1
- package/typings/components/string-editor.d.ts +3 -0
- package/typings/components/survey-element-adorner-base.d.ts +88 -0
- package/typings/components/tabs/designer-state-manager.d.ts +3 -1
- package/typings/components/tabs/logic-theme.d.ts +1 -13
- package/typings/creator-base.d.ts +42 -6
- package/typings/creator-events-api.d.ts +7 -0
- package/typings/creator-options.d.ts +12 -0
- package/typings/drag-drop-enums.d.ts +14 -0
- package/typings/{survey-elements.d.ts → dragdrop-survey-elements.d.ts} +14 -8
- package/typings/editorLocalization.d.ts +1 -0
- package/typings/entries/index.d.ts +2 -2
- package/typings/expand-collapse-manager.d.ts +1 -5
- package/typings/plugins/undo-redo/undo-redo-controller.d.ts +1 -0
- package/typings/property-grid/index.d.ts +1 -1
- package/typings/property-grid/matrices.d.ts +0 -1
- package/typings/question-editor/properties.d.ts +1 -0
- package/typings/survey-helper.d.ts +1 -1
- package/typings/utils/creator-locstrings.d.ts +9 -0
- package/typings/utils/creator-utils.d.ts +0 -2
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SurveyCreatorModel } from "../creator-base";
|
|
1
|
+
import { AdaptiveActionContainer } from "survey-core";
|
|
3
2
|
export declare class SurveyElementActionContainer extends AdaptiveActionContainer {
|
|
4
3
|
alwaysShrink: boolean;
|
|
5
4
|
private needToShrink;
|
|
@@ -11,86 +10,3 @@ export declare class SurveyElementActionContainer extends AdaptiveActionContaine
|
|
|
11
10
|
gap?: number;
|
|
12
11
|
}): void;
|
|
13
12
|
}
|
|
14
|
-
export declare class SurveyElementAdornerBase<T extends SurveyElement = SurveyElement> extends Base {
|
|
15
|
-
creator: SurveyCreatorModel;
|
|
16
|
-
static AdornerValueName: string;
|
|
17
|
-
protected expandCollapseAction: IAction;
|
|
18
|
-
allowDragging: boolean;
|
|
19
|
-
expandCollapseAnimationRunning: boolean;
|
|
20
|
-
rootElement: HTMLElement;
|
|
21
|
-
protected get dragInsideCollapsedContainer(): boolean;
|
|
22
|
-
needToRenderContent: boolean;
|
|
23
|
-
allowExpandCollapse: boolean;
|
|
24
|
-
collapsed: boolean;
|
|
25
|
-
private _renderedCollapsed;
|
|
26
|
-
isAnimationRunningCollapsed: boolean;
|
|
27
|
-
protected getAnimatedElement(): any;
|
|
28
|
-
protected getInnerAnimatedElements(): Array<HTMLElement>;
|
|
29
|
-
protected getCollapsingCssClassName(): string;
|
|
30
|
-
protected getExpandingCssClassName(): string;
|
|
31
|
-
private hoverTimeout;
|
|
32
|
-
private isHovered;
|
|
33
|
-
protected get hoverDelay(): number;
|
|
34
|
-
hover(e: MouseEvent, element: HTMLElement | any): void;
|
|
35
|
-
private getExpandCollapseAnimationOptions;
|
|
36
|
-
private animationCollapsed;
|
|
37
|
-
set renderedCollapsed(val: boolean);
|
|
38
|
-
get renderedCollapsed(): boolean;
|
|
39
|
-
protected createTopActionContainer(): ActionContainer;
|
|
40
|
-
protected createActionContainer(): SurveyElementActionContainer;
|
|
41
|
-
private dragCollapsedTimer;
|
|
42
|
-
protected get canExpandOnDrag(): boolean;
|
|
43
|
-
private draggedIn;
|
|
44
|
-
protected dragIn(): void;
|
|
45
|
-
protected expandWithDragIn(): void;
|
|
46
|
-
protected dragOut(): void;
|
|
47
|
-
protected allowExpandCollapseByDblClick(element: any): boolean;
|
|
48
|
-
dblclick(event: any): void;
|
|
49
|
-
private allowEditOption;
|
|
50
|
-
private sidebarFlyoutModeChangedFunc;
|
|
51
|
-
protected surveyElement: T;
|
|
52
|
-
get element(): T;
|
|
53
|
-
constructor(creator: SurveyCreatorModel, surveyElement: T);
|
|
54
|
-
private actionContainerValue;
|
|
55
|
-
protected get isActionContainerCreated(): boolean;
|
|
56
|
-
get actionContainer(): SurveyElementActionContainer;
|
|
57
|
-
private topActionContainerValue;
|
|
58
|
-
get topActionContainer(): ActionContainer;
|
|
59
|
-
private creatorOnLocaleChanged;
|
|
60
|
-
static GetAdorner<V = SurveyElementAdornerBase>(surveyElement: SurveyElement): V;
|
|
61
|
-
static RestoreStateFor(surveyElement: SurveyElement): void;
|
|
62
|
-
protected restoreState(): void;
|
|
63
|
-
protected detachElement(surveyElement: T): void;
|
|
64
|
-
protected attachElement(surveyElement: T): void;
|
|
65
|
-
protected setSurveyElement(surveyElement: T): void;
|
|
66
|
-
protected checkActionProperties(): void;
|
|
67
|
-
attachToUI(surveyElement: T, rootElement?: HTMLElement): void;
|
|
68
|
-
private detachOnlyMyElement;
|
|
69
|
-
detachFromUI(): void;
|
|
70
|
-
dispose(): void;
|
|
71
|
-
private disposeActions;
|
|
72
|
-
protected onElementSelectedChanged(isSelected: boolean): void;
|
|
73
|
-
protected getExpandCollapseAction(): IAction;
|
|
74
|
-
protected cleanActionsContainer(): void;
|
|
75
|
-
protected updateActionsContainer(surveyElement: SurveyElement): void;
|
|
76
|
-
protected updateActionsProperties(): void;
|
|
77
|
-
protected updateActionsPropertiesCore(): void;
|
|
78
|
-
protected getAllowDragging(options: any): boolean;
|
|
79
|
-
protected getAllowExpandCollapse(options: any): boolean;
|
|
80
|
-
protected updateElementAllowOptions(options: any, operationsAllow: boolean): void;
|
|
81
|
-
protected isOperationsAllow(): boolean;
|
|
82
|
-
private actionVisibilityCache;
|
|
83
|
-
protected updateActionVisibility(id: string, isVisible: boolean): void;
|
|
84
|
-
protected updateActionsVisibility(isTop: boolean): void;
|
|
85
|
-
getActionById(id: string): Action;
|
|
86
|
-
protected buildActions(items: Array<Action>): void;
|
|
87
|
-
isDisableSelecting: boolean;
|
|
88
|
-
protected disableActionFocusing(isMouse: boolean, event: any): void;
|
|
89
|
-
protected canSelectElement(): boolean;
|
|
90
|
-
get allowEdit(): boolean;
|
|
91
|
-
get showAddQuestionButton(): boolean;
|
|
92
|
-
protected setShowAddQuestionButton(val: boolean): void;
|
|
93
|
-
protected duplicate(): void;
|
|
94
|
-
protected delete(): void;
|
|
95
|
-
protected getCss(): string;
|
|
96
|
-
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { ActionContainer,
|
|
1
|
+
import { ActionContainer, IAction, PageModel } from "survey-core";
|
|
2
2
|
import { SurveyCreatorModel } from "../creator-base";
|
|
3
3
|
import { IPortableMouseEvent } from "../utils/events";
|
|
4
|
-
import { SurveyElementActionContainer
|
|
4
|
+
import { SurveyElementActionContainer } from "./action-container-view-model";
|
|
5
|
+
import { SurveyElementAdornerBase } from "./survey-element-adorner-base";
|
|
5
6
|
import "./page.scss";
|
|
6
7
|
export declare class PageAdorner extends SurveyElementAdornerBase<PageModel> {
|
|
7
8
|
isSelected: boolean;
|
|
@@ -10,15 +11,10 @@ export declare class PageAdorner extends SurveyElementAdornerBase<PageModel> {
|
|
|
10
11
|
questionTypeSelectorModel: any;
|
|
11
12
|
private dragOrClickHelper;
|
|
12
13
|
currentAddQuestionType: string;
|
|
13
|
-
dragTypeOverMe: DragTypeOverMeEnum;
|
|
14
|
-
isDragMe: boolean;
|
|
15
|
-
private updateDragTypeOverMe;
|
|
16
|
-
private updateIsDragMe;
|
|
17
14
|
private updateShowPlaceholder;
|
|
18
15
|
constructor(creator: SurveyCreatorModel, page: PageModel);
|
|
19
16
|
dispose(): void;
|
|
20
17
|
protected updateActionVisibility(id: string, isVisible: boolean): void;
|
|
21
|
-
protected get dragInsideCollapsedContainer(): boolean;
|
|
22
18
|
protected getAllowExpandCollapse(options: any): boolean;
|
|
23
19
|
protected attachElement(surveyElement: PageModel): void;
|
|
24
20
|
protected detachElement(surveyElement: PageModel): void;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { SurveyElement, SurveyTemplateRendererTemplateData, Action,
|
|
1
|
+
import { SurveyElement, SurveyTemplateRendererTemplateData, Action, IAction, ListModel } from "survey-core";
|
|
2
2
|
import { SurveyCreatorModel } from "../creator-base";
|
|
3
3
|
import { IPortableEvent } from "../utils/events";
|
|
4
|
-
import { SurveyElementActionContainer
|
|
4
|
+
import { SurveyElementActionContainer } from "./action-container-view-model";
|
|
5
|
+
import { SurveyElementAdornerBase } from "./survey-element-adorner-base";
|
|
5
6
|
import "./question.scss";
|
|
6
7
|
export interface QuestionBannerParams {
|
|
7
8
|
text: string;
|
|
@@ -23,8 +24,6 @@ export declare class QuestionAdornerViewModel extends SurveyElementAdornerBase {
|
|
|
23
24
|
protected getAnimatedElement(): Element;
|
|
24
25
|
protected getInnerAnimatedElements(): Array<HTMLElement>;
|
|
25
26
|
protected expandWithDragIn(): void;
|
|
26
|
-
get isDragMe(): boolean;
|
|
27
|
-
get dragTypeOverMe(): DragTypeOverMeEnum;
|
|
28
27
|
get isBannerShowing(): boolean;
|
|
29
28
|
private get isUsingCarryForward();
|
|
30
29
|
private get isUsingRestfull();
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Base, SurveyTemplateRendererTemplateData, QuestionRowModel
|
|
1
|
+
import { Base, SurveyTemplateRendererTemplateData, QuestionRowModel } from "survey-core";
|
|
2
2
|
import { SurveyCreatorModel } from "../creator-base";
|
|
3
3
|
import "./row.scss";
|
|
4
|
+
import { DropIndicatorPosition } from "../drag-drop-enums";
|
|
4
5
|
export declare class RowViewModel extends Base {
|
|
5
6
|
creator: SurveyCreatorModel;
|
|
6
7
|
row: QuestionRowModel;
|
|
7
8
|
templateData: SurveyTemplateRendererTemplateData;
|
|
9
|
+
dropIndicatorPosition: DropIndicatorPosition;
|
|
8
10
|
constructor(creator: SurveyCreatorModel, row: QuestionRowModel, templateData: SurveyTemplateRendererTemplateData);
|
|
9
11
|
subscribeElementChanges(): void;
|
|
10
12
|
unsubscribeElementChanges(): void;
|
|
11
|
-
dragTypeOverMe: DragTypeOverMeEnum;
|
|
12
|
-
private rowDragTypeOverMeChanged;
|
|
13
13
|
get cssClasses(): string;
|
|
14
14
|
dispose(): void;
|
|
15
15
|
}
|
|
@@ -41,9 +41,12 @@ export declare class StringEditorViewModelBase extends Base {
|
|
|
41
41
|
editAsText: boolean;
|
|
42
42
|
compostionInProgress: boolean;
|
|
43
43
|
constructor(locString: LocalizableString, creator?: SurveyCreatorModel);
|
|
44
|
+
private onLocaleChanged;
|
|
44
45
|
afterRender(): void;
|
|
45
46
|
detachFromUI(): void;
|
|
46
47
|
dispose(): void;
|
|
48
|
+
private addCreatorEvents;
|
|
49
|
+
private removeCreatorEvents;
|
|
47
50
|
activate: () => boolean;
|
|
48
51
|
setLocString(locString: LocalizableString): void;
|
|
49
52
|
checkConstraints(event: any): void;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { Base, Action, SurveyElement, IAction, ActionContainer } from "survey-core";
|
|
2
|
+
import { SurveyCreatorModel } from "../creator-base";
|
|
3
|
+
import { DropIndicatorPosition } from "../drag-drop-enums";
|
|
4
|
+
import { SurveyElementActionContainer } from "./action-container-view-model";
|
|
5
|
+
export declare class SurveyElementAdornerBase<T extends SurveyElement = SurveyElement> extends Base {
|
|
6
|
+
creator: SurveyCreatorModel;
|
|
7
|
+
static AdornerValueName: string;
|
|
8
|
+
protected expandCollapseAction: IAction;
|
|
9
|
+
allowDragging: boolean;
|
|
10
|
+
expandCollapseAnimationRunning: boolean;
|
|
11
|
+
rootElement: HTMLElement;
|
|
12
|
+
dropIndicatorPosition: DropIndicatorPosition;
|
|
13
|
+
isBeingDragged: boolean;
|
|
14
|
+
needToRenderContent: boolean;
|
|
15
|
+
allowExpandCollapse: boolean;
|
|
16
|
+
collapsed: boolean;
|
|
17
|
+
private _renderedCollapsed;
|
|
18
|
+
isAnimationRunningCollapsed: boolean;
|
|
19
|
+
protected getAnimatedElement(): any;
|
|
20
|
+
protected getInnerAnimatedElements(): Array<HTMLElement>;
|
|
21
|
+
protected getCollapsingCssClassName(): string;
|
|
22
|
+
protected getExpandingCssClassName(): string;
|
|
23
|
+
private hoverTimeout;
|
|
24
|
+
private isHovered;
|
|
25
|
+
protected get hoverDelay(): number;
|
|
26
|
+
hover(e: MouseEvent, element: HTMLElement | any): void;
|
|
27
|
+
private getExpandCollapseAnimationOptions;
|
|
28
|
+
private animationCollapsed;
|
|
29
|
+
set renderedCollapsed(val: boolean);
|
|
30
|
+
get renderedCollapsed(): boolean;
|
|
31
|
+
protected createTopActionContainer(): ActionContainer;
|
|
32
|
+
protected createActionContainer(): SurveyElementActionContainer;
|
|
33
|
+
private dragCollapsedTimer;
|
|
34
|
+
get canExpandOnDrag(): boolean;
|
|
35
|
+
private draggedIn;
|
|
36
|
+
protected dragIn(): void;
|
|
37
|
+
protected expandWithDragIn(): void;
|
|
38
|
+
protected dragOut(): void;
|
|
39
|
+
protected allowExpandCollapseByDblClick(element: any): boolean;
|
|
40
|
+
dblclick(event: any): void;
|
|
41
|
+
private allowEditOption;
|
|
42
|
+
private sidebarFlyoutModeChangedFunc;
|
|
43
|
+
surveyElement: T;
|
|
44
|
+
get element(): T;
|
|
45
|
+
constructor(creator: SurveyCreatorModel, surveyElement: T);
|
|
46
|
+
private actionContainerValue;
|
|
47
|
+
protected get isActionContainerCreated(): boolean;
|
|
48
|
+
get actionContainer(): SurveyElementActionContainer;
|
|
49
|
+
private topActionContainerValue;
|
|
50
|
+
get topActionContainer(): ActionContainer;
|
|
51
|
+
private creatorOnLocaleChanged;
|
|
52
|
+
static GetAdorner<V = SurveyElementAdornerBase>(surveyElement: Base): V;
|
|
53
|
+
static RestoreStateFor(surveyElement: SurveyElement): void;
|
|
54
|
+
protected restoreState(): void;
|
|
55
|
+
protected detachElement(surveyElement: T): void;
|
|
56
|
+
protected attachElement(surveyElement: T): void;
|
|
57
|
+
protected setSurveyElement(surveyElement: T): void;
|
|
58
|
+
protected checkActionProperties(): void;
|
|
59
|
+
attachToUI(surveyElement: T, rootElement?: HTMLElement): void;
|
|
60
|
+
private detachOnlyMyElement;
|
|
61
|
+
detachFromUI(): void;
|
|
62
|
+
dispose(): void;
|
|
63
|
+
private disposeActions;
|
|
64
|
+
protected onElementSelectedChanged(isSelected: boolean): void;
|
|
65
|
+
protected getExpandCollapseAction(): IAction;
|
|
66
|
+
protected cleanActionsContainer(): void;
|
|
67
|
+
protected updateActionsContainer(surveyElement: SurveyElement): void;
|
|
68
|
+
protected updateActionsProperties(): void;
|
|
69
|
+
protected updateActionsPropertiesCore(): void;
|
|
70
|
+
protected getAllowDragging(options: any): boolean;
|
|
71
|
+
protected getAllowExpandCollapse(options: any): boolean;
|
|
72
|
+
protected updateElementAllowOptions(options: any, operationsAllow: boolean): void;
|
|
73
|
+
protected isOperationsAllow(): boolean;
|
|
74
|
+
private actionVisibilityCache;
|
|
75
|
+
protected updateActionVisibility(id: string, isVisible: boolean): void;
|
|
76
|
+
protected updateActionsVisibility(isTop: boolean): void;
|
|
77
|
+
getActionById(id: string): Action;
|
|
78
|
+
protected buildActions(items: Array<Action>): void;
|
|
79
|
+
isDisableSelecting: boolean;
|
|
80
|
+
protected disableActionFocusing(isMouse: boolean, event: any): void;
|
|
81
|
+
protected canSelectElement(): boolean;
|
|
82
|
+
get allowEdit(): boolean;
|
|
83
|
+
get showAddQuestionButton(): boolean;
|
|
84
|
+
protected setShowAddQuestionButton(val: boolean): void;
|
|
85
|
+
protected duplicate(): void;
|
|
86
|
+
protected delete(): void;
|
|
87
|
+
protected getCss(): string;
|
|
88
|
+
}
|
|
@@ -11,7 +11,9 @@ export declare class DesignerStateManager {
|
|
|
11
11
|
private onPanelAddedHandler;
|
|
12
12
|
initForSurvey(survey: SurveyModel): void;
|
|
13
13
|
initForElement(element: SurveyElement): void;
|
|
14
|
-
|
|
14
|
+
getElementCollapsed(element: SurveyElement): boolean;
|
|
15
|
+
setElementCollapsed(element: SurveyElement, isCollapsed: boolean): void;
|
|
16
|
+
private getElementState;
|
|
15
17
|
private createElementState;
|
|
16
18
|
onInitElementStateCallback: (element: SurveyElement, state: ElementState) => void;
|
|
17
19
|
private _suspendCounter;
|
|
@@ -333,17 +333,5 @@ export declare var logicCss: {
|
|
|
333
333
|
embeddedsurvey: {
|
|
334
334
|
mainRoot: string;
|
|
335
335
|
};
|
|
336
|
-
actionBar:
|
|
337
|
-
root: string;
|
|
338
|
-
defaultSizeMode: string;
|
|
339
|
-
smallSizeMode: string;
|
|
340
|
-
item: string;
|
|
341
|
-
itemWithTitle: string;
|
|
342
|
-
itemAsIcon: string;
|
|
343
|
-
itemActive: string;
|
|
344
|
-
itemPressed: string;
|
|
345
|
-
itemIcon: string;
|
|
346
|
-
itemTitle: string;
|
|
347
|
-
itemTitleWithIcon: string;
|
|
348
|
-
};
|
|
336
|
+
actionBar: import("survey-core").ActionBarCssClasses;
|
|
349
337
|
};
|
|
@@ -13,9 +13,9 @@ import { CreatorResponsivityManager } from "./creator-responsivity-manager";
|
|
|
13
13
|
import { SidebarModel } from "./components/side-bar/side-bar-model";
|
|
14
14
|
import { ICreatorOptions } from "./creator-options";
|
|
15
15
|
import { ThemeTabPlugin } from "./components/tabs/theme-plugin";
|
|
16
|
-
import { DragDropSurveyElements } from "./survey-elements";
|
|
16
|
+
import { DragDropSurveyElements } from "./dragdrop-survey-elements";
|
|
17
17
|
import { PageAdorner } from "./components/page";
|
|
18
|
-
import { ElementDeletingEvent, PropertyGetReadOnlyEvent, ElementGetDisplayNameEvent, ElementAllowOperationsEvent, ElementGetActionsEvent, PropertyShowingEvent, PropertyGridSurveyCreatedEvent, PropertyEditorCreatedEvent, PropertyEditorUpdateTitleActionsEvent, PropertyGridShowPopupEvent, CollectionItemAllowOperationsEvent, CollectionItemAddedEvent, FastEntryItemsEvent as FastEntryFinishedEvent, MatrixColumnAddedEvent, ConfigureTablePropertyEditorEvent, PropertyDisplayCustomErrorEvent, BeforePropertyChangedEvent, ConditionGetQuestionListEvent, GetConditionOperatorEvent, LogicRuleGetDisplayTextEvent, ModifiedEvent, QuestionAddedEvent, PanelAddedEvent, PageAddedEvent, QuestionConvertingEvent, PageGetFooterActionsEvent, SurveyInstanceCreatedEvent, DesignerSurveyCreatedEvent, PreviewSurveyCreatedEvent, NotifyEvent, ElementFocusingEvent, ElementFocusedEvent, OpenFileChooserEvent, UploadFileEvent, TranslationStringVisibilityEvent, TranslationImportItemEvent, TranslationImportedEvent, TranslationExportItemEvent, MachineTranslateEvent, TranslationItemChangingEvent, DragDropAllowEvent, CreateCustomMessagePanelEvent, ActiveTabChangingEvent, ActiveTabChangedEvent, BeforeUndoEvent, BeforeRedoEvent, PageAddingEvent, DragStartEndEvent, ElementGetExpandCollapseStateEvent, ElementGetExpandCollapseStateEventReason, AfterPropertyChangedEvent, PropertyValueChangingEvent, PropertyValueChangedEvent, PropertyAddingEvent, GetPropertyReadOnlyEvent, ElementSelectingEvent, ElementSelectedEvent, DefineElementMenuItemsEvent, CreatorThemePropertyChangedEvent } from "./creator-events-api";
|
|
18
|
+
import { ElementDeletingEvent, PropertyGetReadOnlyEvent, ElementGetDisplayNameEvent, ElementAllowOperationsEvent, ElementGetActionsEvent, PropertyShowingEvent, PropertyGridSurveyCreatedEvent, PropertyEditorCreatedEvent, PropertyEditorUpdateTitleActionsEvent, PropertyGridShowPopupEvent, CollectionItemAllowOperationsEvent, CollectionItemAddedEvent, FastEntryItemsEvent as FastEntryFinishedEvent, MatrixColumnAddedEvent, ConfigureTablePropertyEditorEvent, PropertyDisplayCustomErrorEvent, BeforePropertyChangedEvent, ConditionGetQuestionListEvent, GetConditionOperatorEvent, LogicRuleGetDisplayTextEvent, ModifiedEvent, QuestionAddedEvent, PanelAddedEvent, PageAddedEvent, QuestionConvertingEvent, PageGetFooterActionsEvent, SurveyInstanceCreatedEvent, DesignerSurveyCreatedEvent, PreviewSurveyCreatedEvent, NotifyEvent, ElementFocusingEvent, ElementFocusedEvent, OpenFileChooserEvent, UploadFileEvent, TranslationStringVisibilityEvent, TranslationImportItemEvent, TranslationImportedEvent, TranslationExportItemEvent, MachineTranslateEvent, TranslationItemChangingEvent, DragDropAllowEvent, CreateCustomMessagePanelEvent, ActiveTabChangingEvent, ActiveTabChangedEvent, BeforeUndoEvent, BeforeRedoEvent, PageAddingEvent, DragStartEndEvent, ElementGetExpandCollapseStateEvent, ElementGetExpandCollapseStateEventReason, AfterPropertyChangedEvent, PropertyValueChangingEvent, PropertyValueChangedEvent, PropertyAddingEvent, GetPropertyReadOnlyEvent, ElementSelectingEvent, ElementSelectedEvent, DefineElementMenuItemsEvent, CreatorThemePropertyChangedEvent, CreatorThemeSelectedEvent } from "./creator-events-api";
|
|
19
19
|
import { ExpandCollapseManager } from "./expand-collapse-manager";
|
|
20
20
|
import { ICreatorTheme } from "./creator-theme/creator-themes";
|
|
21
21
|
import { TabbedMenuContainer, TabbedMenuItem } from "./tabbed-menu";
|
|
@@ -109,12 +109,16 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
|
|
|
109
109
|
* Specifies whether users can modify the [Survey Creator theme](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#creatorTheme). Applies only if [`propertyGridNavigationMode`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#propertyGridNavigationMode) is `"buttons"`.
|
|
110
110
|
*
|
|
111
111
|
* Default value: `true`
|
|
112
|
+
*
|
|
113
|
+
* [View Demo](https://surveyjs.io/survey-creator/examples/dynamic-ui-customization/ (linkStyle))
|
|
112
114
|
*/
|
|
113
115
|
showCreatorThemeSettings: boolean;
|
|
114
116
|
/**
|
|
115
117
|
* Specifies whether the "Zoom In", "Zoom Out", and "Zoom to 100%" buttons are available.
|
|
116
118
|
*
|
|
117
119
|
* Default value: `true`
|
|
120
|
+
*
|
|
121
|
+
* [View Demo](https://surveyjs.io/survey-creator/examples/expand-and-collapse-survey-elements/ (linkStyle))
|
|
118
122
|
*/
|
|
119
123
|
allowZoom: boolean;
|
|
120
124
|
/**
|
|
@@ -122,6 +126,7 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
|
|
|
122
126
|
*
|
|
123
127
|
* Default value: `false`
|
|
124
128
|
* @see activeTab
|
|
129
|
+
* @see clearTranslationsOnSourceTextChange
|
|
125
130
|
*/
|
|
126
131
|
showTranslationTab: boolean;
|
|
127
132
|
/**
|
|
@@ -355,6 +360,10 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
|
|
|
355
360
|
onHtmlToMarkdown: EventBase<SurveyCreatorModel, any>;
|
|
356
361
|
/**
|
|
357
362
|
* An event that is raised when Survey Creator obtains the expand/collapse state of a survey element on the design surface. Handle this event to set a required state.
|
|
363
|
+
*
|
|
364
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
365
|
+
*
|
|
366
|
+
* [View Demo](https://surveyjs.io/survey-creator/examples/expand-and-collapse-survey-elements/ (linkStyle))
|
|
358
367
|
* @see [ICreatorOptions.collapseQuestions](https://surveyjs.io/survey-creator/documentation/api-reference/icreatoroptions#collapseQuestions)
|
|
359
368
|
* @see [ICreatorOptions.collapsePanels](https://surveyjs.io/survey-creator/documentation/api-reference/icreatoroptions#collapsePanels)
|
|
360
369
|
* @see [ICreatorOptions.collapsePages](https://surveyjs.io/survey-creator/documentation/api-reference/icreatoroptions#collapsePages)
|
|
@@ -633,7 +642,6 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
|
|
|
633
642
|
*
|
|
634
643
|
* For information on event handler parameters, refer to descriptions within the interface.
|
|
635
644
|
*
|
|
636
|
-
*
|
|
637
645
|
* Within the event handler, you need to pass translation strings and locale information to the translation service API. The service should return an array of translated strings that you need to pass to the `options.callback` function. The following code shows how to integrate the Microsoft Translator service into Survey Creator:
|
|
638
646
|
*
|
|
639
647
|
* ```js
|
|
@@ -679,6 +687,7 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
|
|
|
679
687
|
* ```
|
|
680
688
|
*
|
|
681
689
|
* > Survey Creator does not include a machine translation service out of the box. Our component only provides a UI for calling the service API.
|
|
690
|
+
* @see startMachineTranslationTo
|
|
682
691
|
*/
|
|
683
692
|
onMachineTranslate: EventBase<SurveyCreatorModel, MachineTranslateEvent>;
|
|
684
693
|
/**
|
|
@@ -749,9 +758,10 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
|
|
|
749
758
|
* An event that is raised when users change a property in a [Survey Creator theme](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#creatorTheme).
|
|
750
759
|
*/
|
|
751
760
|
onCreatorThemePropertyChanged: EventBase<SurveyCreatorModel, CreatorThemePropertyChangedEvent>;
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
761
|
+
/**
|
|
762
|
+
* An event that is raised when users select a [Survey Creator theme](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#creatorTheme) from the drop-down list of UI themes.
|
|
763
|
+
*/
|
|
764
|
+
onCreatorThemeSelected: EventBase<SurveyCreatorModel, CreatorThemeSelectedEvent>;
|
|
755
765
|
getSurveyJSONTextCallback: () => {
|
|
756
766
|
text: string;
|
|
757
767
|
isModified: boolean;
|
|
@@ -1318,6 +1328,9 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
|
|
|
1318
1328
|
notifier: Notifier;
|
|
1319
1329
|
setModified(options?: any): void;
|
|
1320
1330
|
notifySurveyPropertyChanged(options: any): void;
|
|
1331
|
+
private clearLocalizationStrings;
|
|
1332
|
+
private clearNonDefaultLocalesInStrByValue;
|
|
1333
|
+
private clearNonDefaultLocalesInStr;
|
|
1321
1334
|
notifySurveyItemMoved(options: any): void;
|
|
1322
1335
|
notifySurveyItemConverted(newElement: Base, oldElement: Base): void;
|
|
1323
1336
|
/**
|
|
@@ -1419,10 +1432,13 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
|
|
|
1419
1432
|
private currentFocusInterval;
|
|
1420
1433
|
private currentFocusTimeout;
|
|
1421
1434
|
focusElement(element: any, focus: string | boolean, selEl?: any, propertyName?: string, startEdit?: boolean): void;
|
|
1435
|
+
private getHtmlElementForScroll;
|
|
1422
1436
|
private getSelectedSurveyElement;
|
|
1423
1437
|
private onSelectingElement;
|
|
1424
1438
|
/**
|
|
1425
1439
|
* Opens [Survey Creator theme](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#creatorTheme) settings in Property Grid. Applies only if [`propertyGridNavigationMode`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#propertyGridNavigationMode) is `"buttons"`.
|
|
1440
|
+
*
|
|
1441
|
+
* [View Demo](https://surveyjs.io/survey-creator/examples/dynamic-ui-customization/ (linkStyle))
|
|
1426
1442
|
* @see closeCreatorThemeSettings
|
|
1427
1443
|
* @see showCreatorThemeSettings
|
|
1428
1444
|
*/
|
|
@@ -1562,6 +1578,13 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
|
|
|
1562
1578
|
getHasMachineTranslation(): boolean;
|
|
1563
1579
|
doMachineTranslation(fromLocale: string, toLocale: string, strings: Array<string>, callback: (translated: Array<string>) => void): void;
|
|
1564
1580
|
translationLocalesOrder: Array<string>;
|
|
1581
|
+
/**
|
|
1582
|
+
* Starts the translation of survey strings from the default language to one or more specified languages using a machine translation service, such as Google Translate or Microsoft Translator.
|
|
1583
|
+
*
|
|
1584
|
+
* This method only launches the operation by raising the [`onMachineTranslate`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#onMachineTranslate) event. Handle this event to perform the actual translation.
|
|
1585
|
+
* @param locales An array of locale codes that correspond to target languages, for example, `[ "de", "fr" ]`.
|
|
1586
|
+
*/
|
|
1587
|
+
startMachineTranslationTo(locales: Array<string>): void;
|
|
1565
1588
|
/**
|
|
1566
1589
|
* A delay between changing survey settings and saving the survey JSON schema, measured in milliseconds. Applies only when the [`autoSaveEnabled`](#autoSaveEnabled) property is `true`.
|
|
1567
1590
|
*
|
|
@@ -1680,6 +1703,8 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
|
|
|
1680
1703
|
* - `"onhover"` (default) - Displays an expand/collapse button when a survey element is hovered over or selected.
|
|
1681
1704
|
* - `"always"` - Displays the expand/collapse buttons permanently.
|
|
1682
1705
|
* - `"never"` - Hides the expand/collapse buttons.
|
|
1706
|
+
*
|
|
1707
|
+
* [View Demo](https://surveyjs.io/survey-creator/examples/expand-and-collapse-survey-elements/ (linkStyle))
|
|
1683
1708
|
* @see onElementGetExpandCollapseState
|
|
1684
1709
|
* @see collapseOnDrag
|
|
1685
1710
|
*/
|
|
@@ -1724,6 +1749,8 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
|
|
|
1724
1749
|
};
|
|
1725
1750
|
/**
|
|
1726
1751
|
* A theme for the Survey Creator UI.
|
|
1752
|
+
*
|
|
1753
|
+
* [View Demo](https://surveyjs.io/survey-creator/examples/dynamic-ui-customization/ (linkStyle))
|
|
1727
1754
|
* @see applyCreatorTheme
|
|
1728
1755
|
* @see showCreatorThemeSettings
|
|
1729
1756
|
*/
|
|
@@ -1731,6 +1758,8 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
|
|
|
1731
1758
|
preferredColorPalette: string;
|
|
1732
1759
|
/**
|
|
1733
1760
|
* Applies a specified UI theme to Survey Creator.
|
|
1761
|
+
*
|
|
1762
|
+
* [View Demo](https://surveyjs.io/survey-creator/examples/dynamic-ui-customization/ (linkStyle))
|
|
1734
1763
|
* @param theme An `ICreatorTheme` object with theme settings.
|
|
1735
1764
|
* @see creatorTheme
|
|
1736
1765
|
* @see showCreatorThemeSettings
|
|
@@ -1752,6 +1781,13 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
|
|
|
1752
1781
|
* Default value: `false`
|
|
1753
1782
|
*/
|
|
1754
1783
|
collapseOnDrag: boolean;
|
|
1784
|
+
/**
|
|
1785
|
+
* Specifies whether to clear translations to other languages when a source language translation is changed.
|
|
1786
|
+
*
|
|
1787
|
+
* Default value: `false`
|
|
1788
|
+
* @see showTranslationTab
|
|
1789
|
+
*/
|
|
1790
|
+
clearTranslationsOnSourceTextChange: boolean;
|
|
1755
1791
|
}
|
|
1756
1792
|
export declare class CreatorBase extends SurveyCreatorModel {
|
|
1757
1793
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Base, IAction, ItemValue, JsonObjectProperty, LocalizableString, MatrixDropdownColumn, PageModel, PanelModel, PopupBaseViewModel, Question, SurveyModel, IElement, ISurveyElement, IPanel, ITheme } from "survey-core";
|
|
2
2
|
import { SurveyLogicItem } from "./components/tabs/logic-items";
|
|
3
3
|
import { ICreatorPlugin } from "./creator-settings";
|
|
4
|
+
import { ICreatorTheme } from "./creator-theme/creator-themes";
|
|
4
5
|
export interface ElementDeletingEvent {
|
|
5
6
|
/**
|
|
6
7
|
* A survey element to be deleted.
|
|
@@ -1038,3 +1039,9 @@ export interface CreatorThemePropertyChangedEvent {
|
|
|
1038
1039
|
*/
|
|
1039
1040
|
value: any;
|
|
1040
1041
|
}
|
|
1042
|
+
export interface CreatorThemeSelectedEvent {
|
|
1043
|
+
/**
|
|
1044
|
+
* A selected Survey Creator theme.
|
|
1045
|
+
*/
|
|
1046
|
+
theme: ICreatorTheme;
|
|
1047
|
+
}
|
|
@@ -377,6 +377,8 @@ export interface ICreatorOptions {
|
|
|
377
377
|
*
|
|
378
378
|
* Default value: `false`
|
|
379
379
|
*
|
|
380
|
+
* [View Demo](https://surveyjs.io/survey-creator/examples/expand-and-collapse-survey-elements/ (linkStyle))
|
|
381
|
+
*
|
|
380
382
|
* This property specifies the expand/collapse state of all survey pages at once. To adjust the state of individual pages, handle the [`onElementGetExpandCollapseState`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#onElementGetExpandCollapseState) event.
|
|
381
383
|
* @see expandCollapseButtonVisibility
|
|
382
384
|
*/
|
|
@@ -386,6 +388,8 @@ export interface ICreatorOptions {
|
|
|
386
388
|
*
|
|
387
389
|
* Default value: `false`
|
|
388
390
|
*
|
|
391
|
+
* [View Demo](https://surveyjs.io/survey-creator/examples/expand-and-collapse-survey-elements/ (linkStyle))
|
|
392
|
+
*
|
|
389
393
|
* This property specifies the expand/collapse state of all panels at once. To adjust the state of individual panels, handle the [`onElementGetExpandCollapseState`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#onElementGetExpandCollapseState) event.
|
|
390
394
|
* @see expandCollapseButtonVisibility
|
|
391
395
|
*/
|
|
@@ -395,6 +399,8 @@ export interface ICreatorOptions {
|
|
|
395
399
|
*
|
|
396
400
|
* Default value: `false`
|
|
397
401
|
*
|
|
402
|
+
* [View Demo](https://surveyjs.io/survey-creator/examples/expand-and-collapse-survey-elements/ (linkStyle))
|
|
403
|
+
*
|
|
398
404
|
* This property specifies the expand/collapse state of all survey questions at once. To adjust the state of individual questions, handle the [`onElementGetExpandCollapseState`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#onElementGetExpandCollapseState) event.
|
|
399
405
|
* @see expandCollapseButtonVisibility
|
|
400
406
|
*/
|
|
@@ -424,4 +430,10 @@ export interface ICreatorOptions {
|
|
|
424
430
|
* Default value: `true`
|
|
425
431
|
*/
|
|
426
432
|
collapseOnDrag?: boolean;
|
|
433
|
+
/**
|
|
434
|
+
* Specifies whether to clear translations to other languages when a source language translation is changed.
|
|
435
|
+
*
|
|
436
|
+
* Default value: `false`
|
|
437
|
+
*/
|
|
438
|
+
clearTranslationsOnSourceTextChange?: boolean;
|
|
427
439
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare enum DropIndicatorPosition {
|
|
2
|
+
Inside = "inside",
|
|
3
|
+
Top = "top",
|
|
4
|
+
Bottom = "bottom",
|
|
5
|
+
Right = "right",
|
|
6
|
+
Left = "left"
|
|
7
|
+
}
|
|
8
|
+
export declare enum ElType {
|
|
9
|
+
Page = "page",
|
|
10
|
+
Panel = "panel",
|
|
11
|
+
Question = "question",
|
|
12
|
+
DynamicPanel = "dynamic-panel",
|
|
13
|
+
EmptySurvey = "empty-survey"
|
|
14
|
+
}
|
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
import { DragDropCore,
|
|
1
|
+
import { DragDropCore, IElement, IPanel, ISurveyElement, JsonObject, PageModel, QuestionRowModel } from "survey-core";
|
|
2
2
|
import { IQuestionToolboxItem } from "./toolbox";
|
|
3
|
+
import { SurveyElementAdornerBase } from "./components/survey-element-adorner-base";
|
|
4
|
+
import { DropIndicatorPosition } from "./drag-drop-enums";
|
|
3
5
|
export declare function calculateIsEdge(dropTargetNode: HTMLElement, clientY: number): boolean;
|
|
4
6
|
export declare function calculateIsSide(dropTargetNode: HTMLElement, clientX: number): boolean;
|
|
5
|
-
export declare function calculateDragOverLocation(clientX: number, clientY: number, rect: DOMRectInit, direction?: "top-bottom" | "left-right"):
|
|
6
|
-
export declare function isPanelDynamic(element: ISurveyElement): element is QuestionPanelDynamicModel;
|
|
7
|
+
export declare function calculateDragOverLocation(clientX: number, clientY: number, rect: DOMRectInit, direction?: "top-bottom" | "left-right"): DropIndicatorPosition;
|
|
7
8
|
export declare class DragDropSurveyElements extends DragDropCore<any> {
|
|
8
9
|
static newGhostPage: PageModel;
|
|
9
10
|
static restrictDragQuestionBetweenPages: boolean;
|
|
10
11
|
static edgeHeight: number;
|
|
11
12
|
static nestedPanelDepth: number;
|
|
12
13
|
static ghostSurveyElementName: string;
|
|
13
|
-
|
|
14
|
+
insideElement: any;
|
|
14
15
|
protected prevIsEdge: any;
|
|
15
16
|
protected dragOverIndicatorElement: any;
|
|
16
|
-
protected dragOverLocation:
|
|
17
|
+
protected dragOverLocation: DropIndicatorPosition;
|
|
18
|
+
protected get draggedElementAdorner(): SurveyElementAdornerBase | null;
|
|
19
|
+
protected get dropTargetAdorner(): SurveyElementAdornerBase | null;
|
|
17
20
|
protected get draggedElementType(): string;
|
|
18
21
|
protected isDraggedElementSelected: boolean;
|
|
19
22
|
onGetMaxNestedPanels: () => number;
|
|
@@ -21,23 +24,26 @@ export declare class DragDropSurveyElements extends DragDropCore<any> {
|
|
|
21
24
|
get maxNestedPanels(): number;
|
|
22
25
|
startDragToolboxItem(event: PointerEvent, draggedElementJson: JsonObject, toolboxItemModel: IQuestionToolboxItem): void;
|
|
23
26
|
startDragSurveyElement(event: PointerEvent, draggedElement: any, isElementSelected?: boolean): void;
|
|
24
|
-
protected getShortcutText(draggedElement:
|
|
27
|
+
protected getShortcutText(draggedElement: any): string;
|
|
25
28
|
protected createDraggedElementShortcut(text: string, draggedElementNode?: HTMLElement, event?: PointerEvent): HTMLElement;
|
|
26
29
|
protected createDraggedElementIcon(): HTMLElement;
|
|
27
30
|
protected getDraggedElementClass(): string;
|
|
28
31
|
protected createElementFromJson(json: object): HTMLElement;
|
|
29
32
|
private createNewElement;
|
|
33
|
+
private isPanelDynamic;
|
|
30
34
|
protected findDropTargetNodeByDragOverNode(dragOverNode: HTMLElement): HTMLElement;
|
|
31
35
|
protected getDropTargetByDataAttributeValue(dataAttributeValue: string, dropTargetNode: HTMLElement, event: PointerEvent): any;
|
|
32
|
-
protected isDropTargetValid(dropTarget: any, dropTargetNode?: HTMLElement, dragOverLocation?:
|
|
36
|
+
protected isDropTargetValid(dropTarget: any, dropTargetNode?: HTMLElement, dragOverLocation?: DropIndicatorPosition): boolean;
|
|
33
37
|
private getMaximumNestedPanelCount;
|
|
34
38
|
protected doBanDropHere: () => void;
|
|
35
39
|
private shouldRestricDragQuestionBetweenPages;
|
|
36
40
|
protected findDeepestDropTargetChild(parent: HTMLElement): HTMLElement;
|
|
37
41
|
private isAllowDragOver;
|
|
38
|
-
dragOverCore(dropTarget: ISurveyElement, dragOverLocation:
|
|
42
|
+
dragOverCore(dropTarget: ISurveyElement, dragOverLocation: DropIndicatorPosition): void;
|
|
43
|
+
private dragDropFindRow;
|
|
39
44
|
private isSameElement;
|
|
40
45
|
private isDragInsideItself;
|
|
46
|
+
private getDragDropElementType;
|
|
41
47
|
dragOver(event: PointerEvent): void;
|
|
42
48
|
protected onStartDrag(): void;
|
|
43
49
|
moveElementInPanel(panel: IPanel, src: IElement, target: IElement, targetIndex: number): void;
|
|
@@ -48,6 +48,7 @@ export declare class EditorLocalization {
|
|
|
48
48
|
}
|
|
49
49
|
export declare var editorLocalization: EditorLocalization;
|
|
50
50
|
export declare function getLocString(strName: string, locale?: string): string;
|
|
51
|
+
export declare function getLocaleStrings(loc: string): any;
|
|
51
52
|
export declare var defaultStrings: {
|
|
52
53
|
survey: {
|
|
53
54
|
edit: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare let Version: string;
|
|
2
2
|
import "../utils/context-button.scss";
|
|
3
3
|
export { enStrings } from "../localization/english";
|
|
4
|
-
export { editorLocalization, defaultStrings } from "../editorLocalization";
|
|
4
|
+
export { editorLocalization, defaultStrings, getLocaleStrings } from "../editorLocalization";
|
|
5
5
|
export { editorLocalization as localization } from "../editorLocalization";
|
|
6
6
|
export * from "../creator-settings";
|
|
7
7
|
export { ICreatorOptions } from "../creator-options";
|
|
@@ -102,7 +102,7 @@ export * from "../presets/presets";
|
|
|
102
102
|
export * from "../presets/presets-properties";
|
|
103
103
|
export * from "../presets/presets-tabs";
|
|
104
104
|
export * from "../presets/presets-toolbox";
|
|
105
|
-
export * from "../survey-elements";
|
|
105
|
+
export * from "../dragdrop-survey-elements";
|
|
106
106
|
import "../components/search.scss";
|
|
107
107
|
import "../components/scroll.scss";
|
|
108
108
|
import "../components/property-panel/property-panel-item.scss";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CreatorBase } from "./creator-base";
|
|
2
|
-
import { SurveyElementAdornerBase } from "./components/action-container-view-model";
|
|
3
2
|
import { SurveyElement } from "survey-core";
|
|
4
3
|
import { ElementGetExpandCollapseStateEventReason } from "./creator-events-api";
|
|
5
4
|
export declare class ExpandCollapseManager {
|
|
@@ -10,9 +9,6 @@ export declare class ExpandCollapseManager {
|
|
|
10
9
|
get questionsLocked(): boolean;
|
|
11
10
|
lockQuestions(locked: boolean): void;
|
|
12
11
|
private getCollapsableElements;
|
|
12
|
+
private sortElements;
|
|
13
13
|
private updateCollapsed;
|
|
14
|
-
private adorners;
|
|
15
|
-
add(adorner: SurveyElementAdornerBase): void;
|
|
16
|
-
remove(adorner: SurveyElementAdornerBase): void;
|
|
17
|
-
clear(): void;
|
|
18
14
|
}
|
|
@@ -5,6 +5,7 @@ export declare class UndoRedoController extends Base {
|
|
|
5
5
|
private creator;
|
|
6
6
|
private undoAction;
|
|
7
7
|
private redoAction;
|
|
8
|
+
ignoreChanges: boolean;
|
|
8
9
|
private onSurveyPropertyValueChangedCallback;
|
|
9
10
|
constructor(creator: SurveyCreatorModel);
|
|
10
11
|
undoRedoManager: UndoRedoManager;
|