survey-creator-core 1.12.28 → 1.12.30

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.
Files changed (142) hide show
  1. package/fesm/i18n/arabic.js +1 -1
  2. package/fesm/i18n/bulgarian.js +1 -1
  3. package/fesm/i18n/burmese.js +1 -1
  4. package/fesm/i18n/croatian.js +1 -1
  5. package/fesm/i18n/czech.js +1 -1
  6. package/fesm/i18n/danish.js +1 -1
  7. package/fesm/i18n/dutch.js +1 -1
  8. package/fesm/i18n/english.js +1 -1
  9. package/fesm/i18n/finnish.js +1 -1
  10. package/fesm/i18n/french.js +1 -1
  11. package/fesm/i18n/german.js +1 -1
  12. package/fesm/i18n/hebrew.js +1 -1
  13. package/fesm/i18n/hungarian.js +1 -1
  14. package/fesm/i18n/index.js +1 -1
  15. package/fesm/i18n/indonesian.js +1 -1
  16. package/fesm/i18n/italian.js +1 -1
  17. package/fesm/i18n/japanese.js +1 -1
  18. package/fesm/i18n/korean.js +1 -1
  19. package/fesm/i18n/malay.js +1 -1
  20. package/fesm/i18n/mongolian.js +1 -1
  21. package/fesm/i18n/norwegian.js +1 -1
  22. package/fesm/i18n/persian.js +1 -1
  23. package/fesm/i18n/polish.js +1 -1
  24. package/fesm/i18n/portuguese.js +1 -1
  25. package/fesm/i18n/romanian.js +1 -1
  26. package/fesm/i18n/russian.js +1 -1
  27. package/fesm/i18n/simplified-chinese.js +1 -1
  28. package/fesm/i18n/slovak.js +1 -1
  29. package/fesm/i18n/slovenian.js +1 -1
  30. package/fesm/i18n/spanish.js +1 -1
  31. package/fesm/i18n/swedish.js +1 -1
  32. package/fesm/i18n/tajik.js +1 -1
  33. package/fesm/i18n/thai.js +1 -1
  34. package/fesm/i18n/traditional-chinese.js +1 -1
  35. package/fesm/i18n/turkish.js +1 -1
  36. package/fesm/survey-creator-core.i18n.js +1 -1
  37. package/fesm/survey-creator-core.js +1680 -1374
  38. package/fesm/survey-creator-core.js.map +1 -1
  39. package/fesm/themes/index.js +34 -1
  40. package/fesm/themes/index.js.map +1 -1
  41. package/fonts.fontless.css +1 -1
  42. package/fonts.fontless.min.css +1 -1
  43. package/i18n/arabic.js +1 -1
  44. package/i18n/arabic.min.js.LICENSE.txt +1 -1
  45. package/i18n/bulgarian.js +1 -1
  46. package/i18n/bulgarian.min.js.LICENSE.txt +1 -1
  47. package/i18n/burmese.js +1 -1
  48. package/i18n/burmese.min.js.LICENSE.txt +1 -1
  49. package/i18n/croatian.js +1 -1
  50. package/i18n/croatian.min.js.LICENSE.txt +1 -1
  51. package/i18n/czech.js +1 -1
  52. package/i18n/czech.min.js.LICENSE.txt +1 -1
  53. package/i18n/danish.js +1 -1
  54. package/i18n/danish.min.js.LICENSE.txt +1 -1
  55. package/i18n/dutch.js +1 -1
  56. package/i18n/dutch.min.js.LICENSE.txt +1 -1
  57. package/i18n/english.js +1 -1
  58. package/i18n/english.min.js.LICENSE.txt +1 -1
  59. package/i18n/finnish.js +1 -1
  60. package/i18n/finnish.min.js.LICENSE.txt +1 -1
  61. package/i18n/french.js +1 -1
  62. package/i18n/french.min.js.LICENSE.txt +1 -1
  63. package/i18n/german.js +1 -1
  64. package/i18n/german.min.js.LICENSE.txt +1 -1
  65. package/i18n/hebrew.js +1 -1
  66. package/i18n/hebrew.min.js.LICENSE.txt +1 -1
  67. package/i18n/hungarian.js +1 -1
  68. package/i18n/hungarian.min.js.LICENSE.txt +1 -1
  69. package/i18n/index.js +1 -1
  70. package/i18n/index.min.js.LICENSE.txt +1 -1
  71. package/i18n/indonesian.js +1 -1
  72. package/i18n/indonesian.min.js.LICENSE.txt +1 -1
  73. package/i18n/italian.js +1 -1
  74. package/i18n/italian.min.js.LICENSE.txt +1 -1
  75. package/i18n/japanese.js +1 -1
  76. package/i18n/japanese.min.js.LICENSE.txt +1 -1
  77. package/i18n/korean.js +1 -1
  78. package/i18n/korean.min.js.LICENSE.txt +1 -1
  79. package/i18n/malay.js +1 -1
  80. package/i18n/malay.min.js.LICENSE.txt +1 -1
  81. package/i18n/mongolian.js +1 -1
  82. package/i18n/mongolian.min.js.LICENSE.txt +1 -1
  83. package/i18n/norwegian.js +1 -1
  84. package/i18n/norwegian.min.js.LICENSE.txt +1 -1
  85. package/i18n/persian.js +1 -1
  86. package/i18n/persian.min.js.LICENSE.txt +1 -1
  87. package/i18n/polish.js +1 -1
  88. package/i18n/polish.min.js.LICENSE.txt +1 -1
  89. package/i18n/portuguese.js +1 -1
  90. package/i18n/portuguese.min.js.LICENSE.txt +1 -1
  91. package/i18n/romanian.js +1 -1
  92. package/i18n/romanian.min.js.LICENSE.txt +1 -1
  93. package/i18n/russian.js +1 -1
  94. package/i18n/russian.min.js.LICENSE.txt +1 -1
  95. package/i18n/simplified-chinese.js +1 -1
  96. package/i18n/simplified-chinese.min.js.LICENSE.txt +1 -1
  97. package/i18n/slovak.js +1 -1
  98. package/i18n/slovak.min.js.LICENSE.txt +1 -1
  99. package/i18n/slovenian.js +1 -1
  100. package/i18n/slovenian.min.js.LICENSE.txt +1 -1
  101. package/i18n/spanish.js +1 -1
  102. package/i18n/spanish.min.js.LICENSE.txt +1 -1
  103. package/i18n/swedish.js +1 -1
  104. package/i18n/swedish.min.js.LICENSE.txt +1 -1
  105. package/i18n/tajik.js +1 -1
  106. package/i18n/tajik.min.js.LICENSE.txt +1 -1
  107. package/i18n/thai.js +1 -1
  108. package/i18n/thai.min.js.LICENSE.txt +1 -1
  109. package/i18n/traditional-chinese.js +1 -1
  110. package/i18n/traditional-chinese.min.js.LICENSE.txt +1 -1
  111. package/i18n/turkish.js +1 -1
  112. package/i18n/turkish.min.js.LICENSE.txt +1 -1
  113. package/package.json +2 -2
  114. package/survey-creator-core.css +2 -2
  115. package/survey-creator-core.fontless.css +1 -1
  116. package/survey-creator-core.fontless.min.css +1 -1
  117. package/survey-creator-core.i18n.js +1 -1
  118. package/survey-creator-core.i18n.min.js.LICENSE.txt +1 -1
  119. package/survey-creator-core.js +28 -20
  120. package/survey-creator-core.js.map +1 -1
  121. package/survey-creator-core.min.css +2 -2
  122. package/survey-creator-core.min.js +1 -1
  123. package/survey-creator-core.min.js.LICENSE.txt +1 -1
  124. package/themes/default-contrast.js +1 -1
  125. package/themes/default-contrast.min.js.LICENSE.txt +1 -1
  126. package/themes/default-dark.js +1 -1
  127. package/themes/default-dark.min.js.LICENSE.txt +1 -1
  128. package/themes/default-light.js +1 -1
  129. package/themes/default-light.min.js.LICENSE.txt +1 -1
  130. package/themes/index.d.ts +33 -0
  131. package/themes/index.js +1 -1
  132. package/themes/index.min.js.LICENSE.txt +1 -1
  133. package/themes/sc2020.d.ts +33 -0
  134. package/themes/sc2020.js +34 -1
  135. package/themes/sc2020.js.map +1 -1
  136. package/themes/sc2020.min.js +1 -1
  137. package/themes/sc2020.min.js.LICENSE.txt +1 -1
  138. package/typings/components/question-image.d.ts +2 -1
  139. package/typings/components/survey-element-adorner-base.d.ts +88 -0
  140. package/typings/drag-drop-enums.d.ts +14 -0
  141. package/typings/dragdrop-survey-elements.d.ts +55 -0
  142. package/typings/utils/creator-locstrings.d.ts +9 -0
@@ -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
+ }
@@ -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
+ }
@@ -0,0 +1,55 @@
1
+ import { DragDropCore, IElement, IPanel, ISurveyElement, JsonObject, PageModel, QuestionRowModel } from "survey-core";
2
+ import { IQuestionToolboxItem } from "./toolbox";
3
+ import { SurveyElementAdornerBase } from "./components/survey-element-adorner-base";
4
+ import { DropIndicatorPosition } from "./drag-drop-enums";
5
+ export declare function calculateIsEdge(dropTargetNode: HTMLElement, clientY: number): boolean;
6
+ export declare function calculateIsSide(dropTargetNode: HTMLElement, clientX: number): boolean;
7
+ export declare function calculateDragOverLocation(clientX: number, clientY: number, rect: DOMRectInit, direction?: "top-bottom" | "left-right"): DropIndicatorPosition;
8
+ export declare class DragDropSurveyElements extends DragDropCore<any> {
9
+ static newGhostPage: PageModel;
10
+ static restrictDragQuestionBetweenPages: boolean;
11
+ static edgeHeight: number;
12
+ static nestedPanelDepth: number;
13
+ static ghostSurveyElementName: string;
14
+ insideElement: any;
15
+ protected prevIsEdge: any;
16
+ protected dragOverIndicatorElement: any;
17
+ protected dragOverLocation: DropIndicatorPosition;
18
+ protected get draggedElementAdorner(): SurveyElementAdornerBase | null;
19
+ protected get dropTargetAdorner(): SurveyElementAdornerBase | null;
20
+ protected get draggedElementType(): string;
21
+ protected isDraggedElementSelected: boolean;
22
+ onGetMaxNestedPanels: () => number;
23
+ onDragOverLocationCalculating: (options: any) => void;
24
+ get maxNestedPanels(): number;
25
+ startDragToolboxItem(event: PointerEvent, draggedElementJson: JsonObject, toolboxItemModel: IQuestionToolboxItem): void;
26
+ startDragSurveyElement(event: PointerEvent, draggedElement: any, isElementSelected?: boolean): void;
27
+ protected getShortcutText(draggedElement: any): string;
28
+ protected createDraggedElementShortcut(text: string, draggedElementNode?: HTMLElement, event?: PointerEvent): HTMLElement;
29
+ protected createDraggedElementIcon(): HTMLElement;
30
+ protected getDraggedElementClass(): string;
31
+ protected createElementFromJson(json: object): HTMLElement;
32
+ private createNewElement;
33
+ private isPanelDynamic;
34
+ protected findDropTargetNodeByDragOverNode(dragOverNode: HTMLElement): HTMLElement;
35
+ protected getDropTargetByDataAttributeValue(dataAttributeValue: string, dropTargetNode: HTMLElement, event: PointerEvent): any;
36
+ protected isDropTargetValid(dropTarget: any, dropTargetNode?: HTMLElement, dragOverLocation?: DropIndicatorPosition): boolean;
37
+ private getMaximumNestedPanelCount;
38
+ protected doBanDropHere: () => void;
39
+ private shouldRestricDragQuestionBetweenPages;
40
+ protected findDeepestDropTargetChild(parent: HTMLElement): HTMLElement;
41
+ private isAllowDragOver;
42
+ dragOverCore(dropTarget: ISurveyElement, dragOverLocation: DropIndicatorPosition): void;
43
+ private dragDropFindRow;
44
+ private isSameElement;
45
+ private isDragInsideItself;
46
+ private getDragDropElementType;
47
+ dragOver(event: PointerEvent): void;
48
+ protected onStartDrag(): void;
49
+ moveElementInPanel(panel: IPanel, src: IElement, target: IElement, targetIndex: number): void;
50
+ protected doDrop: () => any;
51
+ private removeDragOverMarker;
52
+ clear(): void;
53
+ private getTargetParent;
54
+ protected getTargetRow(dropTarget: any): QuestionRowModel;
55
+ }
@@ -0,0 +1,9 @@
1
+ import { LocalizableString, SurveyModel, Base, JsonObjectProperty } from "survey-core";
2
+ import { ISurveyCreatorOptions } from "../creator-settings";
3
+ export declare function doMachineStringsTranslation(survey: SurveyModel, creatorOptions: ISurveyCreatorOptions, locales: Array<string>): void;
4
+ export interface ICollectLocalizableStringsOptions {
5
+ canShowProperty(reason: string, obj: Base, property: JsonObjectProperty, locStr: LocalizableString, isShowing: boolean, defaultValue?: any): boolean;
6
+ onAddLocalizedString(obj: Base, property: JsonObjectProperty, locStr: LocalizableString, translatedObj: any): void;
7
+ onCreateNewTranslateObj(obj: Base, property: JsonObjectProperty, translateObj: any): any;
8
+ }
9
+ export declare function collectLocalizableStrings(survey: SurveyModel, options: ICollectLocalizableStringsOptions, translateObj?: any): void;