survey-creator-core 1.9.111 → 1.9.113

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 (128) hide show
  1. package/fonts.fontless.css +1 -1
  2. package/fonts.fontless.min.css +1 -1
  3. package/i18n/arabic.js +1717 -0
  4. package/i18n/arabic.js.map +1 -0
  5. package/i18n/arabic.min.js +7 -0
  6. package/i18n/bulgarian.js +1354 -0
  7. package/i18n/bulgarian.js.map +1 -0
  8. package/i18n/bulgarian.min.js +7 -0
  9. package/i18n/croatian.js +1801 -0
  10. package/i18n/croatian.js.map +1 -0
  11. package/i18n/croatian.min.js +7 -0
  12. package/i18n/czech.js +1356 -0
  13. package/i18n/czech.js.map +1 -0
  14. package/i18n/czech.min.js +7 -0
  15. package/i18n/danish.js +1992 -0
  16. package/i18n/danish.js.map +1 -0
  17. package/i18n/danish.min.js +7 -0
  18. package/i18n/dutch.js +1787 -0
  19. package/i18n/dutch.js.map +1 -0
  20. package/i18n/dutch.min.js +7 -0
  21. package/i18n/english.js +1247 -0
  22. package/i18n/english.js.map +1 -0
  23. package/i18n/english.min.js +7 -0
  24. package/i18n/finnish.js +1807 -0
  25. package/i18n/finnish.js.map +1 -0
  26. package/i18n/finnish.min.js +7 -0
  27. package/i18n/french.js +1864 -0
  28. package/i18n/french.js.map +1 -0
  29. package/i18n/french.min.js +7 -0
  30. package/i18n/german.js +1527 -0
  31. package/i18n/german.js.map +1 -0
  32. package/i18n/german.min.js +7 -0
  33. package/i18n/hungarian.js +1961 -0
  34. package/i18n/hungarian.js.map +1 -0
  35. package/i18n/hungarian.min.js +7 -0
  36. package/i18n/index.js +45735 -0
  37. package/i18n/index.js.map +1 -0
  38. package/i18n/index.min.js +7 -0
  39. package/i18n/indonesian.js +1961 -0
  40. package/i18n/indonesian.js.map +1 -0
  41. package/i18n/indonesian.min.js +7 -0
  42. package/i18n/italian.js +1549 -0
  43. package/i18n/italian.js.map +1 -0
  44. package/i18n/italian.min.js +7 -0
  45. package/i18n/japanese.js +1806 -0
  46. package/i18n/japanese.js.map +1 -0
  47. package/i18n/japanese.min.js +7 -0
  48. package/i18n/korean.js +2011 -0
  49. package/i18n/korean.js.map +1 -0
  50. package/i18n/korean.min.js +7 -0
  51. package/i18n/malay.js +1760 -0
  52. package/i18n/malay.js.map +1 -0
  53. package/i18n/malay.min.js +7 -0
  54. package/i18n/mongolian.js +1448 -0
  55. package/i18n/mongolian.js.map +1 -0
  56. package/i18n/mongolian.min.js +7 -0
  57. package/i18n/norwegian.js +1811 -0
  58. package/i18n/norwegian.js.map +1 -0
  59. package/i18n/norwegian.min.js +7 -0
  60. package/i18n/persian.js +1746 -0
  61. package/i18n/persian.js.map +1 -0
  62. package/i18n/persian.min.js +7 -0
  63. package/i18n/polish.js +2079 -0
  64. package/i18n/polish.js.map +1 -0
  65. package/i18n/polish.min.js +7 -0
  66. package/i18n/portuguese.js +1457 -0
  67. package/i18n/portuguese.js.map +1 -0
  68. package/i18n/portuguese.min.js +7 -0
  69. package/i18n/russian.js +1868 -0
  70. package/i18n/russian.js.map +1 -0
  71. package/i18n/russian.min.js +7 -0
  72. package/i18n/simplified-chinese.js +1948 -0
  73. package/i18n/simplified-chinese.js.map +1 -0
  74. package/i18n/simplified-chinese.min.js +7 -0
  75. package/i18n/slovak.js +1760 -0
  76. package/i18n/slovak.js.map +1 -0
  77. package/i18n/slovak.min.js +7 -0
  78. package/i18n/spanish.js +1573 -0
  79. package/i18n/spanish.js.map +1 -0
  80. package/i18n/spanish.min.js +7 -0
  81. package/i18n/swedish.js +1985 -0
  82. package/i18n/swedish.js.map +1 -0
  83. package/i18n/swedish.min.js +7 -0
  84. package/i18n/tajik.js +1037 -0
  85. package/i18n/tajik.js.map +1 -0
  86. package/i18n/tajik.min.js +7 -0
  87. package/i18n/traditional-chinese.js +2084 -0
  88. package/i18n/traditional-chinese.js.map +1 -0
  89. package/i18n/traditional-chinese.min.js +7 -0
  90. package/i18n/turkish.js +1802 -0
  91. package/i18n/turkish.js.map +1 -0
  92. package/i18n/turkish.min.js +7 -0
  93. package/package.json +2 -2
  94. package/survey-creator-core.css +14 -10
  95. package/survey-creator-core.fontless.css +13 -9
  96. package/survey-creator-core.fontless.css.map +1 -1
  97. package/survey-creator-core.fontless.min.css +4 -4
  98. package/survey-creator-core.i18n.js +2171 -99
  99. package/survey-creator-core.i18n.js.map +1 -1
  100. package/survey-creator-core.i18n.min.js +2 -2
  101. package/survey-creator-core.js +1456 -990
  102. package/survey-creator-core.js.map +1 -1
  103. package/survey-creator-core.min.css +5 -5
  104. package/survey-creator-core.min.js +45 -45
  105. package/typings/components/tabs/designer-plugin.d.ts +1 -0
  106. package/typings/components/tabs/json-editor-plugin.d.ts +12 -2
  107. package/typings/components/tabs/logic-actions-model.d.ts +9 -1
  108. package/typings/components/tabs/test-plugin.d.ts +2 -0
  109. package/typings/components/tabs/test.d.ts +2 -0
  110. package/typings/components/tabs/theme-builder.d.ts +29 -2
  111. package/typings/components/tabs/theme-custom-questions/element-settings.d.ts +4 -4
  112. package/typings/components/tabs/theme-custom-questions/font-settings.d.ts +4 -4
  113. package/typings/components/tabs/theme-plugin.d.ts +13 -3
  114. package/typings/components/tabs/themes.d.ts +1 -0
  115. package/typings/creator-base.d.ts +299 -244
  116. package/typings/creator-options.d.ts +0 -6
  117. package/typings/creator-settings.d.ts +5 -0
  118. package/typings/custom-questions/question-file.d.ts +8 -0
  119. package/typings/editorLocalization.d.ts +24 -9
  120. package/typings/localization/english.d.ts +23 -9
  121. package/typings/plugins/undo-redo/undo-redo-controller.d.ts +0 -10
  122. package/typings/plugins/undo-redo/undo-redo-manager.d.ts +3 -0
  123. package/typings/property-grid/index.d.ts +1 -5
  124. package/typings/property-grid/matrices.d.ts +4 -3
  125. package/typings/property-grid-theme/property-grid.d.ts +1 -0
  126. package/typings/questionconverter.d.ts +4 -3
  127. package/typings/survey-helper.d.ts +6 -6
  128. package/typings/utils/utils.d.ts +1 -0
@@ -11,6 +11,7 @@ export declare class TabDesignerPlugin implements ICreatorPlugin {
11
11
  private surveySettingsAction;
12
12
  private saveSurveyAction;
13
13
  previewAction: Action;
14
+ private designerAction;
14
15
  private get isSurveySelected();
15
16
  private get isSettingsActive();
16
17
  private createVisibleUpdater;
@@ -1,6 +1,7 @@
1
- import { Base, ListModel } from "survey-core";
1
+ import { Base, ListModel, Action } from "survey-core";
2
2
  import { ICreatorPlugin, CreatorBase } from "../../creator-base";
3
3
  import { SurveyTextWorkerError } from "../../textWorker";
4
+ import { saveToFileHandler } from "../../utils/utils";
4
5
  export declare abstract class JsonEditorBaseModel extends Base {
5
6
  protected creator: CreatorBase;
6
7
  isJSONChanged: boolean;
@@ -26,8 +27,17 @@ export declare abstract class JsonEditorBaseModel extends Base {
26
27
  }
27
28
  export declare abstract class TabJsonEditorBasePlugin implements ICreatorPlugin {
28
29
  private creator;
29
- model: JsonEditorBaseModel;
30
+ private inputFileElement;
31
+ private importAction;
32
+ private exportAction;
33
+ private copyAction;
30
34
  constructor(creator: CreatorBase);
35
+ saveToFileHandler: typeof saveToFileHandler;
36
+ exportToFile(fileName: string): void;
37
+ importFromFile(file: File, callback?: (json: string) => void): void;
38
+ copyToClipboard(): void;
39
+ protected createActions(): Array<Action>;
40
+ model: JsonEditorBaseModel;
31
41
  activate(): void;
32
42
  deactivate(): boolean;
33
43
  defaultAllowingDeactivate(): boolean;
@@ -20,13 +20,21 @@ export declare class LogicActionModelBase {
20
20
  export declare class LogicActionModel extends LogicActionModelBase {
21
21
  private selectorElementsHash;
22
22
  private getSelectorOptionsText;
23
- private getElementBySelectorName;
23
+ protected getElementBySelectorName(panel: PanelModel): Base;
24
24
  constructor(panel: PanelModel, logicAction: SurveyLogicAction, logicType: SurveyLogicType, selectorElementsHash: any);
25
25
  updateCurrentLogicAction(survey: SurveyModel): boolean;
26
26
  resetElements(): void;
27
27
  updatePanelElements(selectedElement: string, choices: Array<ItemValue>): void;
28
28
  getSelectedElement(): string;
29
29
  }
30
+ export declare class LogicActionSetValueModel extends LogicActionModel {
31
+ updatePanelElements(selectedElement: string, choices: Array<ItemValue>): void;
32
+ afterUpdateInitialLogicAction(): void;
33
+ private setValueExpressionValue;
34
+ private getValueIfPanel;
35
+ private getValueIfQuestion;
36
+ resetElements(): void;
37
+ }
30
38
  export declare class LogicActionTriggerModel extends LogicActionModelBase {
31
39
  private panelObj;
32
40
  isTrigger: boolean;
@@ -12,6 +12,7 @@ export declare class TabTestPlugin implements ICreatorPlugin {
12
12
  private invisibleToggleAction;
13
13
  private testAgainAction;
14
14
  private designerAction;
15
+ private previewAction;
15
16
  private prevPageAction;
16
17
  private nextPageAction;
17
18
  private simulatorTheme;
@@ -21,6 +22,7 @@ export declare class TabTestPlugin implements ICreatorPlugin {
21
22
  private getLanguages;
22
23
  private updateActions;
23
24
  private setPreviewTheme;
25
+ private createVisibleUpdater;
24
26
  constructor(creator: CreatorBase);
25
27
  activate(): void;
26
28
  update(): void;
@@ -25,6 +25,8 @@ export declare class TestSurveyTabViewModel extends Base {
25
25
  get pageActions(): Array<Action>;
26
26
  get isPageToolbarVisible(): boolean;
27
27
  constructor(surveyProvider: CreatorBase, startTheme?: any);
28
+ get isMobileView(): boolean;
29
+ get showResults(): boolean;
28
30
  updateSimulatorSurvey(json: any, theme: any): void;
29
31
  setJSON(json: any, currTheme: any): void;
30
32
  initialize(json: any, options: any): void;
@@ -5,8 +5,10 @@ import { UndoRedoManager } from "../../plugins/undo-redo/undo-redo-manager";
5
5
  export declare class ThemeBuilder extends Base {
6
6
  private surveyProvider;
7
7
  private startThemeClasses;
8
+ static DefaultTheme: ITheme;
8
9
  private json;
9
10
  pages: ActionContainer;
11
+ prevPageAction: Action;
10
12
  testAgainAction: Action;
11
13
  nextPageAction: Action;
12
14
  undoRedoManager: UndoRedoManager;
@@ -56,12 +58,15 @@ export declare class ThemeBuilder extends Base {
56
58
  canModify: boolean;
57
59
  }>;
58
60
  constructor(surveyProvider: CreatorBase, startThemeClasses?: any);
61
+ get isMobileView(): boolean;
62
+ get showResults(): boolean;
59
63
  loadTheme(theme: ITheme): void;
60
64
  resetTheme(): void;
61
65
  setTheme(theme: ITheme): void;
62
66
  selectTheme(themeName: string, themePalette?: string, themeMode?: string): void;
63
67
  updateSimulatorSurvey(json: any, theme: any): void;
64
68
  setJSON(json: any, currTheme: any): void;
69
+ private creatorPropertyChanged;
65
70
  private blockThemeChangedNotifications;
66
71
  initialize(json: any, options: any): void;
67
72
  private updatePageItem;
@@ -71,6 +76,8 @@ export declare class ThemeBuilder extends Base {
71
76
  private updatePageList;
72
77
  show(): void;
73
78
  testAgain(): void;
79
+ buildActions(): void;
80
+ private updatePrevNextPageActionState;
74
81
  get availableThemes(): string[];
75
82
  set availableThemes(availebleThemes: string[]);
76
83
  private setActivePageItem;
@@ -84,16 +91,36 @@ export declare class ThemeBuilder extends Base {
84
91
  private setThemeCssVariablesChanges;
85
92
  protected createThemeEditorSurvey(): SurveyModel;
86
93
  findSuitableTheme(themeName: string): ITheme;
94
+ private patchFileEditors;
87
95
  private getCoverJson;
88
96
  private setCoverCssVariables;
89
97
  private loadThemeIntoPropertyGrid;
90
98
  private getBackgroundColorSwitchByValue;
99
+ private updateVisibilityOfPropertyGridGroups;
100
+ private setCoverPropertiesFromSurvey;
101
+ private setCoverColorsFromThemeVariables;
91
102
  private updateHeaderViewContainerEditors;
103
+ private updatePropertyGridEditorAvailablesFromSurveyElement;
92
104
  private updatePropertyGridEditorsAvailability;
93
105
  private updatePropertyGridEditors;
94
- private raiseThemeChanged;
95
- private raiseThemeModified;
106
+ private setCssVariablesIntoCurrentTheme;
96
107
  private updateSimulatorTheme;
108
+ private _saveThemeFuncValue;
109
+ /**
110
+ * A function that is called [auto-save](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#isAutoSave) is triggered to save a theme JSON object.
111
+ *
112
+ * For more information, refer to the [Save and Load Custom Themes](/survey-creator/documentation/theme-editor#save-and-load-custom-themes) help topic.
113
+ */
114
+ get saveThemeFunc(): any;
115
+ set saveThemeFunc(value: any);
116
+ private autoSaveTimerId;
117
+ protected processAutoSave(): void;
118
+ protected themeModified(options: {
119
+ theme: ITheme;
120
+ } | {
121
+ name: string;
122
+ value: any;
123
+ }): void;
97
124
  private getThemeEditorSurveyJSON;
98
125
  getHorizontalAlignment(questionName: string, title: string, defaultValue: string): {
99
126
  type: string;
@@ -1,7 +1,7 @@
1
- import { IQuestion } from "survey-core";
2
- export declare function elementSettingsToCssVariable(question: IQuestion, themeCssVariables: {
1
+ import { Question } from "survey-core";
2
+ export declare function elementSettingsToCssVariable(question: Question, themeCssVariables: {
3
3
  [index: string]: string;
4
4
  }): void;
5
- export declare function elementSettingsFromCssVariable(question: IQuestion, themeCssVariables: {
5
+ export declare function elementSettingsFromCssVariable(question: Question, themeCssVariables: {
6
6
  [index: string]: string;
7
- }, defaultBackcolorVariable: string, defaultHovercolorVariable: string): any;
7
+ }, defaultBackcolorVariable: string, defaultHovercolorVariable: string): void;
@@ -1,8 +1,8 @@
1
- import { IQuestion } from "survey-core";
1
+ import { Question } from "survey-core";
2
2
  export declare const DefaultFonts: string[];
3
- export declare function fontsettingsToCssVariable(question: IQuestion, themeCssVariables: {
3
+ export declare function fontsettingsToCssVariable(question: Question, themeCssVariables: {
4
4
  [index: string]: string;
5
5
  }): void;
6
- export declare function fontsettingsFromCssVariable(question: IQuestion, themeCssVariables: {
6
+ export declare function fontsettingsFromCssVariable(question: Question, themeCssVariables: {
7
7
  [index: string]: string;
8
- }, defaultColorVariable?: string, defaultPlaceholderColorVariable?: string): any;
8
+ }, defaultColorVariable?: string, defaultPlaceholderColorVariable?: string): void;
@@ -1,9 +1,15 @@
1
1
  import { Action, ITheme, EventBase } from "survey-core";
2
2
  import { CreatorBase, ICreatorPlugin } from "../../creator-base";
3
3
  import { ThemeBuilder } from "./theme-builder";
4
+ import { saveToFileHandler } from "../../utils/utils";
4
5
  export declare class ThemeTabPlugin implements ICreatorPlugin {
5
6
  private creator;
7
+ private previewAction;
8
+ private invisibleToggleAction;
6
9
  private testAgainAction;
10
+ private designerAction;
11
+ private prevPageAction;
12
+ private nextPageAction;
7
13
  private themeSettingsAction;
8
14
  private resetTheme;
9
15
  private importAction;
@@ -15,11 +21,12 @@ export declare class ThemeTabPlugin implements ICreatorPlugin {
15
21
  private sidebarTab;
16
22
  private _availableThemes;
17
23
  model: ThemeBuilder;
24
+ private createVisibleUpdater;
18
25
  constructor(creator: CreatorBase);
19
26
  activate(): void;
20
27
  update(): void;
21
28
  deactivate(): boolean;
22
- saveToFileHandler: (fileName: string, blob: Blob) => void;
29
+ saveToFileHandler: typeof saveToFileHandler;
23
30
  exportToFile(fileName: string): void;
24
31
  importFromFile(file: File, callback?: (theme: ITheme) => void): void;
25
32
  createActions(): Array<Action>;
@@ -29,8 +36,11 @@ export declare class ThemeTabPlugin implements ICreatorPlugin {
29
36
  addFooterActions(): void;
30
37
  get availableThemes(): string[];
31
38
  set availableThemes(availebleThemes: string[]);
32
- addTheme(theme: ITheme): string;
33
- removeTheme(fullThemeName: string): void;
39
+ addTheme(theme: ITheme, setAsDefault?: boolean): string;
40
+ removeTheme(themeAccessor: string | ITheme): void;
41
+ getCurrentTheme(content?: "full" | "changes"): ITheme;
42
+ getThemeChanges(): ITheme;
43
+ get isThemePristine(): boolean;
34
44
  onThemeSelected: EventBase<ThemeTabPlugin, {
35
45
  theme: ITheme;
36
46
  }>;
@@ -24,3 +24,4 @@ export declare const PredefinedColors: {
24
24
  green: string;
25
25
  };
26
26
  };
27
+ export declare function findSuitableTheme(themeName: string, probeThemeFullName: string): ITheme;