survey-creator-core 2.0.0 → 2.0.1

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 (159) 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 +1252 -1210
  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 +259 -245
  115. package/survey-creator-core.fontless.css +258 -244
  116. package/survey-creator-core.fontless.css.map +1 -1
  117. package/survey-creator-core.fontless.min.css +22 -22
  118. package/survey-creator-core.i18n.js +1 -1
  119. package/survey-creator-core.i18n.min.js.LICENSE.txt +1 -1
  120. package/survey-creator-core.js +5648 -5570
  121. package/survey-creator-core.js.map +1 -1
  122. package/survey-creator-core.min.css +23 -23
  123. package/survey-creator-core.min.js +1 -1
  124. package/survey-creator-core.min.js.LICENSE.txt +1 -1
  125. package/themes/default-contrast.js +1 -1
  126. package/themes/default-contrast.min.js.LICENSE.txt +1 -1
  127. package/themes/default-dark.js +1 -1
  128. package/themes/default-dark.min.js.LICENSE.txt +1 -1
  129. package/themes/index.d.ts +33 -0
  130. package/themes/index.js +34 -1
  131. package/themes/index.js.map +1 -1
  132. package/themes/index.min.js +1 -1
  133. package/themes/index.min.js.LICENSE.txt +1 -1
  134. package/themes/sc2020.d.ts +33 -0
  135. package/themes/sc2020.js +34 -1
  136. package/themes/sc2020.js.map +1 -1
  137. package/themes/sc2020.min.js +1 -1
  138. package/themes/sc2020.min.js.LICENSE.txt +1 -1
  139. package/typings/components/action-container-view-model.d.ts +1 -85
  140. package/typings/components/page.d.ts +3 -7
  141. package/typings/components/question.d.ts +3 -4
  142. package/typings/components/row.d.ts +3 -3
  143. package/typings/components/scroll.d.ts +0 -1
  144. package/typings/components/string-editor.d.ts +3 -0
  145. package/typings/components/survey-element-adorner-base.d.ts +88 -0
  146. package/typings/components/tabs/designer-state-manager.d.ts +3 -1
  147. package/typings/components/tabs/logic-theme.d.ts +1 -13
  148. package/typings/creator-base.d.ts +23 -5
  149. package/typings/creator-events-api.d.ts +7 -0
  150. package/typings/creator-options.d.ts +6 -0
  151. package/typings/drag-drop-enums.d.ts +14 -0
  152. package/typings/{survey-elements.d.ts → dragdrop-survey-elements.d.ts} +14 -8
  153. package/typings/editorLocalization.d.ts +1 -0
  154. package/typings/entries/index.d.ts +2 -2
  155. package/typings/expand-collapse-manager.d.ts +1 -1
  156. package/typings/property-grid/index.d.ts +0 -1
  157. package/typings/property-grid/matrices.d.ts +0 -1
  158. package/typings/survey-helper.d.ts +1 -1
  159. package/typings/utils/creator-utils.d.ts +0 -2
@@ -1,5 +1,4 @@
1
- import { Base, AdaptiveActionContainer, Action, SurveyElement, IAction, ActionContainer } from "survey-core";
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, DragTypeOverMeEnum, IAction, PageModel } from "survey-core";
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, SurveyElementAdornerBase } from "./action-container-view-model";
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, DragTypeOverMeEnum, IAction, ListModel } from "survey-core";
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, SurveyElementAdornerBase } from "./action-container-view-model";
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, DragTypeOverMeEnum } from "survey-core";
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
  }
@@ -1,7 +1,6 @@
1
1
  import "./row.scss";
2
2
  export declare class ScrollViewModel {
3
3
  private _containerElementValue;
4
- private _rootElementValue;
5
4
  private _scrollbarElement;
6
5
  private _containerBodyElement;
7
6
  private _scrollbarSizerElement;
@@ -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
- getElementState(element: SurveyElement): ElementState;
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
  /**
@@ -355,6 +359,10 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
355
359
  onHtmlToMarkdown: EventBase<SurveyCreatorModel, any>;
356
360
  /**
357
361
  * 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.
362
+ *
363
+ * For information on event handler parameters, refer to descriptions within the interface.
364
+ *
365
+ * [View Demo](https://surveyjs.io/survey-creator/examples/expand-and-collapse-survey-elements/ (linkStyle))
358
366
  * @see [ICreatorOptions.collapseQuestions](https://surveyjs.io/survey-creator/documentation/api-reference/icreatoroptions#collapseQuestions)
359
367
  * @see [ICreatorOptions.collapsePanels](https://surveyjs.io/survey-creator/documentation/api-reference/icreatoroptions#collapsePanels)
360
368
  * @see [ICreatorOptions.collapsePages](https://surveyjs.io/survey-creator/documentation/api-reference/icreatoroptions#collapsePages)
@@ -749,9 +757,10 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
749
757
  * 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
758
  */
751
759
  onCreatorThemePropertyChanged: EventBase<SurveyCreatorModel, CreatorThemePropertyChangedEvent>;
752
- onCreatorThemeSelected: EventBase<SurveyCreatorModel, {
753
- theme: ICreatorTheme;
754
- }>;
760
+ /**
761
+ * 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.
762
+ */
763
+ onCreatorThemeSelected: EventBase<SurveyCreatorModel, CreatorThemeSelectedEvent>;
755
764
  getSurveyJSONTextCallback: () => {
756
765
  text: string;
757
766
  isModified: boolean;
@@ -1419,10 +1428,13 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
1419
1428
  private currentFocusInterval;
1420
1429
  private currentFocusTimeout;
1421
1430
  focusElement(element: any, focus: string | boolean, selEl?: any, propertyName?: string, startEdit?: boolean): void;
1431
+ private getHtmlElementForScroll;
1422
1432
  private getSelectedSurveyElement;
1423
1433
  private onSelectingElement;
1424
1434
  /**
1425
1435
  * 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"`.
1436
+ *
1437
+ * [View Demo](https://surveyjs.io/survey-creator/examples/dynamic-ui-customization/ (linkStyle))
1426
1438
  * @see closeCreatorThemeSettings
1427
1439
  * @see showCreatorThemeSettings
1428
1440
  */
@@ -1680,6 +1692,8 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
1680
1692
  * - `"onhover"` (default) - Displays an expand/collapse button when a survey element is hovered over or selected.
1681
1693
  * - `"always"` - Displays the expand/collapse buttons permanently.
1682
1694
  * - `"never"` - Hides the expand/collapse buttons.
1695
+ *
1696
+ * [View Demo](https://surveyjs.io/survey-creator/examples/expand-and-collapse-survey-elements/ (linkStyle))
1683
1697
  * @see onElementGetExpandCollapseState
1684
1698
  * @see collapseOnDrag
1685
1699
  */
@@ -1724,6 +1738,8 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
1724
1738
  };
1725
1739
  /**
1726
1740
  * A theme for the Survey Creator UI.
1741
+ *
1742
+ * [View Demo](https://surveyjs.io/survey-creator/examples/dynamic-ui-customization/ (linkStyle))
1727
1743
  * @see applyCreatorTheme
1728
1744
  * @see showCreatorThemeSettings
1729
1745
  */
@@ -1731,6 +1747,8 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
1731
1747
  preferredColorPalette: string;
1732
1748
  /**
1733
1749
  * Applies a specified UI theme to Survey Creator.
1750
+ *
1751
+ * [View Demo](https://surveyjs.io/survey-creator/examples/dynamic-ui-customization/ (linkStyle))
1734
1752
  * @param theme An `ICreatorTheme` object with theme settings.
1735
1753
  * @see creatorTheme
1736
1754
  * @see showCreatorThemeSettings
@@ -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
  */
@@ -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, DragTypeOverMeEnum, IElement, IPanel, IShortcutText, ISurveyElement, JsonObject, PageModel, QuestionPanelDynamicModel, QuestionRowModel } from "survey-core";
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"): DragTypeOverMeEnum;
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
- insideContainer: any;
14
+ insideElement: any;
14
15
  protected prevIsEdge: any;
15
16
  protected dragOverIndicatorElement: any;
16
- protected dragOverLocation: DragTypeOverMeEnum;
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: IShortcutText): string;
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?: DragTypeOverMeEnum): boolean;
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: DragTypeOverMeEnum): void;
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,5 @@
1
1
  import { CreatorBase } from "./creator-base";
2
- import { SurveyElementAdornerBase } from "./components/action-container-view-model";
2
+ import { SurveyElementAdornerBase } from "./components/survey-element-adorner-base";
3
3
  import { SurveyElement } from "survey-core";
4
4
  import { ElementGetExpandCollapseStateEventReason } from "./creator-events-api";
5
5
  export declare class ExpandCollapseManager {
@@ -101,7 +101,6 @@ export declare class PropertyJSONGenerator {
101
101
  private createPanelJSON;
102
102
  private createQuestionJSON;
103
103
  private getColumnPropertyJSON;
104
- private isPropertyVisible;
105
104
  private getPanelTitle;
106
105
  private getQuestionTitle;
107
106
  private isQuestionTitleHidden;
@@ -23,7 +23,6 @@ export declare abstract class PropertyGridEditorMatrix extends PropertyGridEdito
23
23
  protected getDefinedListProperties(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions, propGridDefinition: ISurveyPropertyGridDefinition): Array<any>;
24
24
  protected getDefaultListProperties(prop: JsonObjectProperty): Array<string>;
25
25
  protected getDefaulColumnNames(): Array<string>;
26
- private isPropertyShownInList;
27
26
  protected getObjTypeName(): string;
28
27
  protected hasDetailPanel(): boolean;
29
28
  private hasPropertiesInDetail;
@@ -24,7 +24,7 @@ export declare class SurveyHelper {
24
24
  static getElements(element: any, includeHidden?: boolean): Array<any>;
25
25
  static addElements(elements: Array<any>, isPanel: boolean, result: Array<any>): void;
26
26
  static getAllElements(survey: SurveyModel, isPanel: boolean): Array<any>;
27
- static isPropertyVisible(obj: any, property: JsonObjectProperty, options?: ISurveyCreatorOptions, showMode?: string, parentObj?: any, parentProperty?: JsonObjectProperty): boolean;
27
+ static isPropertyVisible(obj: any, prop: JsonObjectProperty, options?: ISurveyCreatorOptions, showMode?: string, parentObj?: any, parentProperty?: JsonObjectProperty): boolean;
28
28
  static isNeedScrollIntoView(el: HTMLElement, scrollIfElementBiggerThanContainer?: boolean): undefined | "top" | "bottom";
29
29
  static scrollIntoViewIfNeeded(el: HTMLElement, getOptions?: (overTop: boolean) => ScrollIntoViewOptions, scrollIfElementBiggerThanContainer?: boolean): void;
30
30
  static getScrollableDiv(el: HTMLElement): HTMLElement;
@@ -2,8 +2,6 @@ import { ItemValue, Question, SurveyElement } from "survey-core";
2
2
  export declare function getNextItemValue(prefix: string, choices: ItemValue[]): string | number;
3
3
  export declare function getNextItemText(choices: ItemValue[]): string;
4
4
  export declare function getNextValue(prefix: string, values: any[], isText?: boolean): string | number;
5
- export declare function propertyExists(obj: any, propertyName: string): boolean;
6
- export declare function isPropertyVisible(obj: any, propertyName: string): boolean;
7
5
  export declare function getQuestionFromObj(obj: SurveyElement): Question;
8
6
  export declare function scrollElementIntoView(elementId: string): void;
9
7
  export declare function assignDefaultClasses(destination: any, questionType: string): void;