survey-creator-core 1.9.89 → 1.9.90
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 +173 -86
- package/survey-creator-core.fontless.css +172 -85
- package/survey-creator-core.fontless.css.map +1 -1
- package/survey-creator-core.fontless.min.css +11 -11
- package/survey-creator-core.i18n.js +1 -1
- package/survey-creator-core.i18n.min.js +1 -1
- package/survey-creator-core.js +1345 -283
- package/survey-creator-core.js.map +1 -1
- package/survey-creator-core.min.css +12 -12
- package/survey-creator-core.min.js +2 -2
- package/typings/components/item-value.d.ts +1 -0
- package/typings/components/page.d.ts +5 -2
- package/typings/components/question-rating.d.ts +1 -0
- package/typings/components/question.d.ts +1 -1
- package/typings/components/tabs/theme-custom-questions/boxshadow-settings.d.ts +2 -0
- package/typings/components/tabs/theme-custom-questions/color-settings.d.ts +5 -0
- package/typings/components/tabs/theme.d.ts +11 -4
- package/typings/creator-base.d.ts +19 -1
- package/typings/editorLocalization.d.ts +10 -0
- package/typings/entries/index.d.ts +2 -0
- package/typings/localization/english.d.ts +10 -0
- package/typings/property-grid/matrices.d.ts +1 -0
- package/typings/survey-elements.d.ts +44 -0
- package/typings/utils/utils.d.ts +19 -0
|
@@ -24,6 +24,7 @@ export declare class ItemValueWrapperViewModel extends Base {
|
|
|
24
24
|
startDragItemValue: (pointerDownEvent: PointerEvent, currentTarget: any) => void;
|
|
25
25
|
private get dragDropHelper();
|
|
26
26
|
dispose(): void;
|
|
27
|
+
private getGhostPosition;
|
|
27
28
|
private handleDragDropGhostPositionChanged;
|
|
28
29
|
get isDraggable(): boolean;
|
|
29
30
|
isDraggableItem(item: ItemValue): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PageModel } from "survey-core";
|
|
1
|
+
import { ActionContainer, DragTypeOverMeEnum, PageModel } from "survey-core";
|
|
2
2
|
import { CreatorBase } from "../creator-base";
|
|
3
3
|
import { IPortableMouseEvent } from "../utils/events";
|
|
4
4
|
import { SurveyElementAdornerBase } from "./action-container-view-model";
|
|
@@ -8,6 +8,7 @@ export declare class PageAdorner extends SurveyElementAdornerBase<PageModel> {
|
|
|
8
8
|
onPageSelectedCallback: () => void;
|
|
9
9
|
questionTypeSelectorModel: any;
|
|
10
10
|
currentAddQuestionType: string;
|
|
11
|
+
dragTypeOverMe: DragTypeOverMeEnum;
|
|
11
12
|
constructor(creator: CreatorBase, page: PageModel);
|
|
12
13
|
protected attachElement(surveyElement: PageModel): void;
|
|
13
14
|
protected onElementSelectedChanged(isSelected: boolean): void;
|
|
@@ -18,11 +19,13 @@ export declare class PageAdorner extends SurveyElementAdornerBase<PageModel> {
|
|
|
18
19
|
protected getPage(): PageModel;
|
|
19
20
|
get page(): PageModel;
|
|
20
21
|
private addGhostPage;
|
|
21
|
-
addNewQuestion(model: PageAdorner, event: IPortableMouseEvent): void;
|
|
22
|
+
addNewQuestion(model: PageAdorner, event: IPortableMouseEvent, type?: string): void;
|
|
22
23
|
select(model: PageAdorner, event: IPortableMouseEvent): void;
|
|
23
24
|
get css(): string;
|
|
24
25
|
hover(event: MouseEvent, element: HTMLElement | any): void;
|
|
25
26
|
hoverStopper(event: MouseEvent, element: HTMLElement | any): void;
|
|
26
27
|
protected duplicate(): void;
|
|
27
28
|
get addNewQuestionText(): string;
|
|
29
|
+
private _footerActionsBar;
|
|
30
|
+
get footerActionsBar(): ActionContainer;
|
|
28
31
|
}
|
|
@@ -14,6 +14,7 @@ export declare class QuestionRatingAdornerViewModel extends Base {
|
|
|
14
14
|
get enableAdd(): boolean;
|
|
15
15
|
get addClassNames(): string;
|
|
16
16
|
static allowRemoveForElement(element: QuestionRatingModel): boolean;
|
|
17
|
+
private canAddOrRemove;
|
|
17
18
|
get allowRemove(): boolean;
|
|
18
19
|
get enableRemove(): boolean;
|
|
19
20
|
get removeClassNames(): string;
|
|
@@ -15,7 +15,7 @@ export declare class QuestionAdornerViewModel extends SurveyElementAdornerBase {
|
|
|
15
15
|
rootCss(): "" | " svc-question__adorner--start-with-new-line";
|
|
16
16
|
css(): string;
|
|
17
17
|
get isDragMe(): boolean;
|
|
18
|
-
dragTypeOverMe: DragTypeOverMeEnum;
|
|
18
|
+
get dragTypeOverMe(): DragTypeOverMeEnum;
|
|
19
19
|
dispose(): void;
|
|
20
20
|
get isDraggable(): boolean;
|
|
21
21
|
hover(event: MouseEvent, element: HTMLElement | any): void;
|
|
@@ -4,6 +4,8 @@ import { CreatorBase } from "../../creator-base";
|
|
|
4
4
|
export declare const Themes: {
|
|
5
5
|
"default-light": {
|
|
6
6
|
"--sjs-primary-backcolor": string;
|
|
7
|
+
"--sjs-primary-backcolor-light": string;
|
|
8
|
+
"--sjs-primary-backcolor-dark": string;
|
|
7
9
|
"--background": string;
|
|
8
10
|
"--background-dim": string;
|
|
9
11
|
"--background-dim-light": string;
|
|
@@ -20,6 +22,8 @@ export declare const Themes: {
|
|
|
20
22
|
};
|
|
21
23
|
"default-dark": {
|
|
22
24
|
"--sjs-primary-backcolor": string;
|
|
25
|
+
"--sjs-primary-backcolor-light": string;
|
|
26
|
+
"--sjs-primary-backcolor-dark": string;
|
|
23
27
|
"--background": string;
|
|
24
28
|
"--background-dim": string;
|
|
25
29
|
"--background-dim-light": string;
|
|
@@ -45,6 +49,8 @@ export declare class ThemeSurveyTabViewModel extends Base {
|
|
|
45
49
|
nextPageAction: Action;
|
|
46
50
|
private selectPageAction;
|
|
47
51
|
private themeEditorSurveyValue;
|
|
52
|
+
private themeChanges;
|
|
53
|
+
private colorCalculator;
|
|
48
54
|
onSurveyCreatedCallback: (survey: SurveyModel) => any;
|
|
49
55
|
simulator: SurveySimulatorModel;
|
|
50
56
|
showInvisibleElements: any;
|
|
@@ -52,6 +58,10 @@ export declare class ThemeSurveyTabViewModel extends Base {
|
|
|
52
58
|
isRunning: boolean;
|
|
53
59
|
pageListItems: Array<IAction>;
|
|
54
60
|
activePage: PageModel;
|
|
61
|
+
themeName: any;
|
|
62
|
+
themePalette: any;
|
|
63
|
+
themeMode: any;
|
|
64
|
+
get themeVariables(): any;
|
|
55
65
|
get activeLanguage(): string;
|
|
56
66
|
set activeLanguage(val: string);
|
|
57
67
|
get survey(): SurveyModel;
|
|
@@ -76,10 +86,7 @@ export declare class ThemeSurveyTabViewModel extends Base {
|
|
|
76
86
|
setTheme(themeName: string, themeMapper: any): void;
|
|
77
87
|
protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
|
|
78
88
|
private updatePrevNextPageActionState;
|
|
89
|
+
initializeColorCalculator(): void;
|
|
79
90
|
protected createThemeEditorSurvey(): SurveyModel;
|
|
80
|
-
themeName: any;
|
|
81
|
-
themePalette: any;
|
|
82
|
-
themeMode: any;
|
|
83
|
-
get themeVariables(): any;
|
|
84
91
|
private getThemeEditorSurveyJSON;
|
|
85
92
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Survey from "survey-core";
|
|
2
2
|
import { Base, SurveyModel, Question, PageModel, IElement, JsonObjectProperty, ActionContainer, AdaptiveActionContainer, IAction, Action, IPanel, SurveyElement, ItemValue, QuestionSelectBase, LocalizableString, ILocalizableString, ILocalizableOwner, PopupBaseViewModel, EventBase } from "survey-core";
|
|
3
3
|
import { ISurveyCreatorOptions, ICollectionItemAllowOperations } from "./creator-settings";
|
|
4
|
-
import {
|
|
4
|
+
import { DragDropChoices } from "survey-core";
|
|
5
5
|
import { QuestionToolbox } from "./toolbox";
|
|
6
6
|
import { PropertyGridModel } from "./property-grid";
|
|
7
7
|
import { ICreatorSelectionOwner } from "./selection-owner";
|
|
@@ -11,6 +11,8 @@ import { UndoRedoManager } from "./plugins/undo-redo/undo-redo-manager";
|
|
|
11
11
|
import { UndoRedoController } from "./plugins/undo-redo/undo-redo-controller";
|
|
12
12
|
import { SidebarModel } from "./components/side-bar/side-bar-model";
|
|
13
13
|
import { ICreatorOptions } from "./creator-options";
|
|
14
|
+
import { DragDropSurveyElements } from "./survey-elements";
|
|
15
|
+
import { PageAdorner } from "./components/page";
|
|
14
16
|
export interface IKeyboardShortcut {
|
|
15
17
|
name?: string;
|
|
16
18
|
hotKey: {
|
|
@@ -580,6 +582,21 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
580
582
|
*- options.page the new survey Page object.
|
|
581
583
|
*/
|
|
582
584
|
onPageAdded: CreatorEvent;
|
|
585
|
+
/**
|
|
586
|
+
* An event that is raised when Survey Creator renders action buttons under each page on the design surface. Use this event to add, remove, or modify the buttons.
|
|
587
|
+
*
|
|
588
|
+
* Parameters:
|
|
589
|
+
*
|
|
590
|
+
* - `sender`: `CreatorBase`\
|
|
591
|
+
* A Survey Creator instance that raised the event.
|
|
592
|
+
* - `options.actions`: [`IAction[]`](/form-library/documentation/api-reference/iaction)\
|
|
593
|
+
* An array of actions. You can add or remove actions from this array.
|
|
594
|
+
* - `options.page`: [`PageModel`](/form-library/documentation/api-reference/page-model)\
|
|
595
|
+
* A page for which the event is raised.
|
|
596
|
+
* - `options.addNewQuestion(type)`: Method\
|
|
597
|
+
* Adds a new question of a specified [`type`](/form-library/documentation/api-reference/question#getType) to the page.
|
|
598
|
+
*/
|
|
599
|
+
onGetPageActions: CreatorEvent;
|
|
583
600
|
/**
|
|
584
601
|
* The event is fired when the survey creator is initialized and a survey object (Survey.Survey) is created.
|
|
585
602
|
*- sender the survey creator object that fires the event
|
|
@@ -1339,6 +1356,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1339
1356
|
getAddNewQuestionText(currentAddQuestionType?: string): any;
|
|
1340
1357
|
get addNewQuestionText(): any;
|
|
1341
1358
|
getQuestionTypeSelectorModel(beforeAdd: (type: string) => void, panel?: IPanel): any;
|
|
1359
|
+
getUpdatedPageAdornerFooterActions(pageAdorner: PageAdorner, actions: Array<IAction>): Survey.IAction[];
|
|
1342
1360
|
addNewQuestionInPage(beforeAdd: (string: any) => void, panel?: IPanel, type?: string): void;
|
|
1343
1361
|
createIActionBarItemByClass(className: string, title: string, iconName: string, needSeparator: boolean): Action;
|
|
1344
1362
|
onElementMenuItemsChanged(element: any, items: Action[]): void;
|
|
@@ -471,6 +471,7 @@ export declare var defaultStrings: {
|
|
|
471
471
|
maxTextLength: string;
|
|
472
472
|
maxOthersLength: string;
|
|
473
473
|
autoGrowComment: string;
|
|
474
|
+
allowResizeComment: string;
|
|
474
475
|
textUpdateMode: string;
|
|
475
476
|
focusOnFirstError: string;
|
|
476
477
|
checkErrorsMode: string;
|
|
@@ -948,6 +949,7 @@ export declare var defaultStrings: {
|
|
|
948
949
|
navigationDescription: string;
|
|
949
950
|
longTap: string;
|
|
950
951
|
autoGrow: string;
|
|
952
|
+
allowResize: string;
|
|
951
953
|
acceptCarriageReturn: string;
|
|
952
954
|
displayMode: string;
|
|
953
955
|
rateType: string;
|
|
@@ -1012,6 +1014,7 @@ export declare var defaultStrings: {
|
|
|
1012
1014
|
color: string;
|
|
1013
1015
|
size: string;
|
|
1014
1016
|
fontWeightRegular: string;
|
|
1017
|
+
fontWeightHeavy: string;
|
|
1015
1018
|
fontWeightSemiBold: string;
|
|
1016
1019
|
fontWeightBold: string;
|
|
1017
1020
|
scale: string;
|
|
@@ -1019,5 +1022,12 @@ export declare var defaultStrings: {
|
|
|
1019
1022
|
surveyTitle: string;
|
|
1020
1023
|
pageTitle: string;
|
|
1021
1024
|
pageDescription: string;
|
|
1025
|
+
boxShadowX: string;
|
|
1026
|
+
boxShadowY: string;
|
|
1027
|
+
opacity: string;
|
|
1028
|
+
boxShadowBlur: string;
|
|
1029
|
+
boxShadowSpread: string;
|
|
1030
|
+
questionShadow: string;
|
|
1031
|
+
editorShadow: string;
|
|
1022
1032
|
};
|
|
1023
1033
|
};
|
|
@@ -12,6 +12,8 @@ export * from "../components/tabs/json-editor-plugin";
|
|
|
12
12
|
export * from "../components/tabs/json-editor-textarea";
|
|
13
13
|
export * from "../components/tabs/test";
|
|
14
14
|
export * from "../components/tabs/test-plugin";
|
|
15
|
+
export * from "../components/tabs/theme-custom-questions/color-settings";
|
|
16
|
+
export * from "../components/tabs/theme-custom-questions/boxshadow-settings";
|
|
15
17
|
export * from "../components/tabs/theme";
|
|
16
18
|
export * from "../components/tabs/theme-plugin";
|
|
17
19
|
export * from "../components/tabs/logic";
|
|
@@ -442,6 +442,7 @@ export declare var enStrings: {
|
|
|
442
442
|
maxTextLength: string;
|
|
443
443
|
maxOthersLength: string;
|
|
444
444
|
autoGrowComment: string;
|
|
445
|
+
allowResizeComment: string;
|
|
445
446
|
textUpdateMode: string;
|
|
446
447
|
focusOnFirstError: string;
|
|
447
448
|
checkErrorsMode: string;
|
|
@@ -919,6 +920,7 @@ export declare var enStrings: {
|
|
|
919
920
|
navigationDescription: string;
|
|
920
921
|
longTap: string;
|
|
921
922
|
autoGrow: string;
|
|
923
|
+
allowResize: string;
|
|
922
924
|
acceptCarriageReturn: string;
|
|
923
925
|
displayMode: string;
|
|
924
926
|
rateType: string;
|
|
@@ -983,6 +985,7 @@ export declare var enStrings: {
|
|
|
983
985
|
color: string;
|
|
984
986
|
size: string;
|
|
985
987
|
fontWeightRegular: string;
|
|
988
|
+
fontWeightHeavy: string;
|
|
986
989
|
fontWeightSemiBold: string;
|
|
987
990
|
fontWeightBold: string;
|
|
988
991
|
scale: string;
|
|
@@ -990,5 +993,12 @@ export declare var enStrings: {
|
|
|
990
993
|
surveyTitle: string;
|
|
991
994
|
pageTitle: string;
|
|
992
995
|
pageDescription: string;
|
|
996
|
+
boxShadowX: string;
|
|
997
|
+
boxShadowY: string;
|
|
998
|
+
opacity: string;
|
|
999
|
+
boxShadowBlur: string;
|
|
1000
|
+
boxShadowSpread: string;
|
|
1001
|
+
questionShadow: string;
|
|
1002
|
+
editorShadow: string;
|
|
993
1003
|
};
|
|
994
1004
|
};
|
|
@@ -7,6 +7,7 @@ export declare abstract class PropertyGridEditorMatrix extends PropertyGridEdito
|
|
|
7
7
|
private initializeAcceptedTypes;
|
|
8
8
|
private initializePlaceholder;
|
|
9
9
|
onMatrixCellCreated(obj: Base, options: any): void;
|
|
10
|
+
onMatrixCellValueChanged(obj: Base, options: any): void;
|
|
10
11
|
private updateMatixActionsClasses;
|
|
11
12
|
onGetMatrixRowAction(obj: Base, options: any, setObjFunc: (obj: Base) => void): void;
|
|
12
13
|
private getShowDetailActionIconName;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { DragDropCore, DragTypeOverMeEnum, IElement, IPanel, IShortcutText, ISurveyElement, JsonObject, PageModel, QuestionRowModel } from "survey-core";
|
|
2
|
+
export declare function calculateIsEdge(dropTargetNode: HTMLElement, clientY: number): boolean;
|
|
3
|
+
export declare function calculateIsSide(dropTargetNode: HTMLElement, clientX: number): boolean;
|
|
4
|
+
export declare function calculateDragOverLocation(clientX: number, clientY: number, dropTargetNode: HTMLElement): DragTypeOverMeEnum;
|
|
5
|
+
export declare class DragDropSurveyElements extends DragDropCore<any> {
|
|
6
|
+
static newGhostPage: PageModel;
|
|
7
|
+
static restrictDragQuestionBetweenPages: boolean;
|
|
8
|
+
static edgeHeight: number;
|
|
9
|
+
static nestedPanelDepth: number;
|
|
10
|
+
static ghostSurveyElementName: string;
|
|
11
|
+
protected isEdge: boolean;
|
|
12
|
+
protected isSide: boolean;
|
|
13
|
+
protected prevIsEdge: any;
|
|
14
|
+
protected dragOverIndicatorElement: any;
|
|
15
|
+
protected dragOverLocation: DragTypeOverMeEnum;
|
|
16
|
+
protected get draggedElementType(): string;
|
|
17
|
+
protected isDraggedElementSelected: boolean;
|
|
18
|
+
startDragToolboxItem(event: PointerEvent, draggedElementJson: JsonObject, toolboxItemTitle: string): void;
|
|
19
|
+
startDragSurveyElement(event: PointerEvent, draggedElement: any, isElementSelected?: boolean): void;
|
|
20
|
+
protected getShortcutText(draggedElement: IShortcutText): string;
|
|
21
|
+
protected createDraggedElementShortcut(text: string, draggedElementNode?: HTMLElement, event?: PointerEvent): HTMLElement;
|
|
22
|
+
protected createDraggedElementIcon(): HTMLElement;
|
|
23
|
+
protected getDraggedElementClass(): string;
|
|
24
|
+
protected createElementFromJson(json: object): HTMLElement;
|
|
25
|
+
private createNewElement;
|
|
26
|
+
protected findDropTargetNodeByDragOverNode(dragOverNode: HTMLElement): HTMLElement;
|
|
27
|
+
protected getDropTargetByDataAttributeValue(dataAttributeValue: string, dropTargetNode: HTMLElement, event: PointerEvent): any;
|
|
28
|
+
protected isDropTargetValid(dropTarget: any, dropTargetNode?: HTMLElement): boolean;
|
|
29
|
+
protected doBanDropHere: () => void;
|
|
30
|
+
private shouldRestricDragQuestionBetweenPages;
|
|
31
|
+
private getPanelDropTarget;
|
|
32
|
+
protected findDeepestDropTargetChild(parent: HTMLElement): HTMLElement;
|
|
33
|
+
dragOverCore(dropTarget: ISurveyElement, dragOverLocation: DragTypeOverMeEnum, isEdge?: boolean, isSide?: boolean): void;
|
|
34
|
+
dragOver(event: PointerEvent): void;
|
|
35
|
+
protected onStartDrag(): void;
|
|
36
|
+
private getElementIndexInPanel;
|
|
37
|
+
moveElementInPanel(panel: IPanel, src: IElement, target: IElement, targetIndex: number): void;
|
|
38
|
+
protected doDrop: () => any;
|
|
39
|
+
private removeDragOverMarker;
|
|
40
|
+
clear(): void;
|
|
41
|
+
private getTargetParent;
|
|
42
|
+
protected getTargetRow(dropTarget: any): QuestionRowModel;
|
|
43
|
+
protected isDragOverInsideEmptyPanel(): boolean;
|
|
44
|
+
}
|
package/typings/utils/utils.d.ts
CHANGED
|
@@ -20,3 +20,22 @@ export declare function notShortCircuitAnd(...args: Array<boolean>): boolean;
|
|
|
20
20
|
export declare const imageMimeTypes = "image/png, image/gif, image/jpeg, image/apng, image/avif, image/svg+xml, image/webp";
|
|
21
21
|
export declare function getAcceptedTypesByContentMode(contentMode: string): "" | "image/png, image/gif, image/jpeg, image/apng, image/avif, image/svg+xml, image/webp" | "video/*";
|
|
22
22
|
export declare function getQuestionFromObj(obj: SurveyElement): Question;
|
|
23
|
+
export declare function ingectAlpha(baseColor: any, alpha: number): any;
|
|
24
|
+
export declare function convertRgbaToString(rgbValues: Array<number>, alpha: number): string;
|
|
25
|
+
export declare function parseRgbaFromString(value: string): Array<number>;
|
|
26
|
+
export declare function HSBToRGB(h: any, s: any, b: any): number[];
|
|
27
|
+
export declare function RGBToHSB(r: any, g: any, b: any): number[];
|
|
28
|
+
export declare function assign(...objects: Array<any>): void;
|
|
29
|
+
export declare class ColorCalculator {
|
|
30
|
+
colorSettings: {
|
|
31
|
+
baseColorAlpha: number;
|
|
32
|
+
darkColorAlpha: number;
|
|
33
|
+
lightColorAlpha: number;
|
|
34
|
+
deltaDarkColor: number;
|
|
35
|
+
deltaLightColor: number;
|
|
36
|
+
newColorLight: string;
|
|
37
|
+
newColorDark: string;
|
|
38
|
+
};
|
|
39
|
+
initialize(baseColor: string, lightColor: string, darkColor: string): void;
|
|
40
|
+
calculateColors(newColor: string): void;
|
|
41
|
+
}
|