survey-creator-core 1.9.110 → 1.9.112

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 (126) 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 +1244 -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 +619 -582
  95. package/survey-creator-core.fontless.css +618 -581
  96. package/survey-creator-core.fontless.css.map +1 -1
  97. package/survey-creator-core.fontless.min.css +37 -37
  98. package/survey-creator-core.i18n.js +2566 -18
  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 +1499 -370
  102. package/survey-creator-core.js.map +1 -1
  103. package/survey-creator-core.min.css +38 -38
  104. package/survey-creator-core.min.js +46 -46
  105. package/typings/components/tabs/designer-plugin.d.ts +1 -1
  106. package/typings/components/tabs/logic-actions-model.d.ts +9 -1
  107. package/typings/components/tabs/test-plugin.d.ts +2 -0
  108. package/typings/components/tabs/theme-builder.d.ts +33 -0
  109. package/typings/components/tabs/theme-plugin.d.ts +7 -0
  110. package/typings/components/tabs/themes.d.ts +1 -0
  111. package/typings/components/tabs/translation-plugin.d.ts +0 -1
  112. package/typings/components/tabs/translation-theme.d.ts +1 -0
  113. package/typings/components/tabs/translation.d.ts +36 -1
  114. package/typings/creator-base.d.ts +172 -110
  115. package/typings/creator-options.d.ts +14 -2
  116. package/typings/creator-settings.d.ts +13 -0
  117. package/typings/custom-questions/question-file.d.ts +5 -0
  118. package/typings/editorLocalization.d.ts +48 -0
  119. package/typings/localization/english.d.ts +48 -0
  120. package/typings/plugins/undo-redo/undo-redo-manager.d.ts +3 -0
  121. package/typings/property-grid/index.d.ts +1 -5
  122. package/typings/property-grid/matrices.d.ts +6 -3
  123. package/typings/questionconverter.d.ts +4 -3
  124. package/typings/survey-elements.d.ts +1 -0
  125. package/typings/survey-helper.d.ts +2 -1
  126. package/typings/toolbox.d.ts +2 -0
@@ -11,10 +11,10 @@ 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;
17
- private updatePropertyGridTabCaption;
18
18
  constructor(creator: CreatorBase);
19
19
  activate(): void;
20
20
  deactivate(): 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;
@@ -7,6 +7,7 @@ export declare class ThemeBuilder extends Base {
7
7
  private startThemeClasses;
8
8
  private json;
9
9
  pages: ActionContainer;
10
+ prevPageAction: Action;
10
11
  testAgainAction: Action;
11
12
  nextPageAction: Action;
12
13
  undoRedoManager: UndoRedoManager;
@@ -62,6 +63,7 @@ export declare class ThemeBuilder extends Base {
62
63
  selectTheme(themeName: string, themePalette?: string, themeMode?: string): void;
63
64
  updateSimulatorSurvey(json: any, theme: any): void;
64
65
  setJSON(json: any, currTheme: any): void;
66
+ private creatorPropertyChanged;
65
67
  private blockThemeChangedNotifications;
66
68
  initialize(json: any, options: any): void;
67
69
  private updatePageItem;
@@ -71,23 +73,54 @@ export declare class ThemeBuilder extends Base {
71
73
  private updatePageList;
72
74
  show(): void;
73
75
  testAgain(): void;
76
+ buildActions(): void;
77
+ private updatePrevNextPageActionState;
74
78
  get availableThemes(): string[];
75
79
  set availableThemes(availebleThemes: string[]);
76
80
  private setActivePageItem;
77
81
  private getPageItemByPage;
82
+ private getPredefinedColorsItemValues;
78
83
  private initializeColorCalculator;
79
84
  private generalPropertiesChanged;
85
+ private headerViewContainerPropertiesChanged;
80
86
  private cssVariablePropertiesChanged;
81
87
  private updateDependentQuestionValues;
82
88
  private setThemeCssVariablesChanges;
83
89
  protected createThemeEditorSurvey(): SurveyModel;
84
90
  findSuitableTheme(themeName: string): ITheme;
91
+ private getCoverJson;
92
+ private setCoverCssVariables;
85
93
  private loadThemeIntoPropertyGrid;
94
+ private getBackgroundColorSwitchByValue;
95
+ private updateVisibilityOfPropertyGridGroups;
96
+ private setCoverPropertiesFromSurvey;
97
+ private setCoverColorsFromThemeVariables;
98
+ private updateHeaderViewContainerEditors;
86
99
  private updatePropertyGridEditorsAvailability;
87
100
  private updatePropertyGridEditors;
88
101
  private raiseThemeChanged;
89
102
  private raiseThemeModified;
90
103
  private updateSimulatorTheme;
91
104
  private getThemeEditorSurveyJSON;
105
+ getHorizontalAlignment(questionName: string, title: string, defaultValue: string): {
106
+ type: string;
107
+ name: string;
108
+ title: string;
109
+ choices: {
110
+ value: string;
111
+ text: string;
112
+ }[];
113
+ defaultValue: string;
114
+ };
115
+ getVerticalAlignment(questionName: string, defaultValue: string): {
116
+ type: string;
117
+ name: string;
118
+ titleLocation: string;
119
+ choices: {
120
+ value: string;
121
+ text: string;
122
+ }[];
123
+ defaultValue: string;
124
+ };
92
125
  dispose(): void;
93
126
  }
@@ -3,7 +3,12 @@ import { CreatorBase, ICreatorPlugin } from "../../creator-base";
3
3
  import { ThemeBuilder } from "./theme-builder";
4
4
  export declare class ThemeTabPlugin implements ICreatorPlugin {
5
5
  private creator;
6
+ private previewAction;
7
+ private invisibleToggleAction;
6
8
  private testAgainAction;
9
+ private designerAction;
10
+ private prevPageAction;
11
+ private nextPageAction;
7
12
  private themeSettingsAction;
8
13
  private resetTheme;
9
14
  private importAction;
@@ -15,6 +20,7 @@ export declare class ThemeTabPlugin implements ICreatorPlugin {
15
20
  private sidebarTab;
16
21
  private _availableThemes;
17
22
  model: ThemeBuilder;
23
+ private createVisibleUpdater;
18
24
  constructor(creator: CreatorBase);
19
25
  activate(): void;
20
26
  update(): void;
@@ -31,6 +37,7 @@ export declare class ThemeTabPlugin implements ICreatorPlugin {
31
37
  set availableThemes(availebleThemes: string[]);
32
38
  addTheme(theme: ITheme): string;
33
39
  removeTheme(fullThemeName: string): void;
40
+ getThemeChanges(): ITheme;
34
41
  onThemeSelected: EventBase<ThemeTabPlugin, {
35
42
  theme: ITheme;
36
43
  }>;
@@ -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;
@@ -8,7 +8,6 @@ export declare class TabTranslationPlugin implements ICreatorPlugin {
8
8
  private mergeLocaleWithDefaultAction;
9
9
  private importCsvAction;
10
10
  private exportCsvAction;
11
- private inputFileElement;
12
11
  private sidebarTab;
13
12
  model: Translation;
14
13
  constructor(creator: CreatorBase);
@@ -11,6 +11,7 @@ export declare var translationCss: {
11
11
  logoImage: string;
12
12
  headerText: string;
13
13
  navigationButton: string;
14
+ bodyNavigationButton: string;
14
15
  completedPage: string;
15
16
  navigation: {
16
17
  complete: string;
@@ -1,4 +1,4 @@
1
- import { Base, SurveyModel, JsonObjectProperty, PageModel, ILocalizableString, IAction, QuestionMatrixDynamicModel } from "survey-core";
1
+ import { Base, SurveyModel, JsonObjectProperty, PageModel, ILocalizableString, Action, IAction, QuestionMatrixDynamicModel } from "survey-core";
2
2
  import { ISurveyCreatorOptions } from "../../creator-settings";
3
3
  export declare class TranslationItemBase extends Base {
4
4
  name: string;
@@ -9,12 +9,14 @@ export declare class TranslationItemBase extends Base {
9
9
  mergeLocaleWithDefault(loc: string): void;
10
10
  makeObservable(): void;
11
11
  deleteLocaleStrings(locale: string): void;
12
+ applyEditLocale(locale: string): void;
12
13
  protected fireOnObjCreating(obj?: Base): void;
13
14
  }
14
15
  export declare class TranslationItemString extends Base {
15
16
  locString: ILocalizableString;
16
17
  locale: string;
17
18
  constructor(locString: ILocalizableString, locale: string);
19
+ isReadOnly: boolean;
18
20
  text: string;
19
21
  placeholder: string;
20
22
  protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
@@ -38,6 +40,7 @@ export declare class TranslationItem extends TranslationItemBase {
38
40
  get localizableName(): string;
39
41
  getLocText(loc: string): string;
40
42
  setLocText(loc: string, newValue: string): void;
43
+ applyEditLocale(locale: string): void;
41
44
  values(loc: string): TranslationItemString;
42
45
  fillLocales(locales: Array<string>): void;
43
46
  toJSON(): any;
@@ -45,6 +48,7 @@ export declare class TranslationItem extends TranslationItemBase {
45
48
  private getKeys;
46
49
  mergeLocaleWithDefault(loc: string): void;
47
50
  deleteLocaleStrings(locale: string): void;
51
+ getDefaultLocaleText(): string;
48
52
  getPlaceholder(locale: string): string;
49
53
  getTextForExport(loc: string): string;
50
54
  getPlaceholderText(loc: string): string;
@@ -62,6 +66,7 @@ export interface ITranslationLocales {
62
66
  fireOnObjCreating(obj: Base): any;
63
67
  removeLocale(loc: string): void;
64
68
  canShowProperty(obj: Base, prop: JsonObjectProperty, isEmpty: boolean): boolean;
69
+ getEditLocale(): string;
65
70
  getProcessedTranslationItemText(locale: string, name: ILocalizableString, newValue: string, context: any): string;
66
71
  }
67
72
  export declare class TranslationGroup extends TranslationItemBase {
@@ -100,6 +105,7 @@ export declare class TranslationGroup extends TranslationItemBase {
100
105
  get hasItems(): boolean;
101
106
  mergeLocaleWithDefault(loc: string): void;
102
107
  deleteLocaleStrings(locale: string): void;
108
+ applyEditLocale(locale: string): void;
103
109
  private fillItems;
104
110
  private sortItems;
105
111
  private getLocalizedProperties;
@@ -145,6 +151,11 @@ export declare class Translation extends Base implements ITranslationLocales {
145
151
  stringsSurvey: SurveyModel;
146
152
  stringsHeaderSurvey: SurveyModel;
147
153
  isEmpty: boolean;
154
+ private editLocale;
155
+ getEditLocale(): string;
156
+ setEditMode(locale: string): void;
157
+ get isEditMode(): boolean;
158
+ applyEditLocale(): void;
148
159
  makeObservable(onBaseObjCreating: (obj: Base) => void): void;
149
160
  fireOnObjCreating(obj: Base): void;
150
161
  get settingsSurvey(): SurveyModel;
@@ -157,6 +168,8 @@ export declare class Translation extends Base implements ITranslationLocales {
157
168
  private updateLocales;
158
169
  private getSettingsSurveyJSON;
159
170
  getSurveyLocales(): any[];
171
+ private inputFileElement;
172
+ importFromCSVFileDOM(): void;
160
173
  private updateSettingsSurveyLocales;
161
174
  private resetStringsSurvey;
162
175
  private createStringsSurvey;
@@ -165,6 +178,7 @@ export declare class Translation extends Base implements ITranslationLocales {
165
178
  private addTranslationGroupIntoStringsSurvey;
166
179
  private addLocaleColumns;
167
180
  private getStringsSurveyData;
181
+ updateStringsSurveyData(): void;
168
182
  private getStringsQuestionData;
169
183
  private updateHeaderStringsSurveyColumns;
170
184
  private updateStringsSurveyColumns;
@@ -198,6 +212,8 @@ export declare class Translation extends Base implements ITranslationLocales {
198
212
  exportToSCVFile(fileName: string): void;
199
213
  importFromCSVFile(file: File): void;
200
214
  mergeLocaleWithDefault(): void;
215
+ createTranslationEditor(locale: string): TranslationEditor;
216
+ showTranslationEditor(locale: string): void;
201
217
  translateItemAfterRender(item: TranslationItem, el: any, locale: string): void;
202
218
  /**
203
219
  * Update a translation item with given values
@@ -206,3 +222,22 @@ export declare class Translation extends Base implements ITranslationLocales {
206
222
  private fillItemsHash;
207
223
  dispose(): void;
208
224
  }
225
+ export declare class TranslationEditor {
226
+ private survey;
227
+ private translationValue;
228
+ private options;
229
+ private locale;
230
+ onApply: () => void;
231
+ constructor(survey: SurveyModel, locale: string, options: ISurveyCreatorOptions);
232
+ get translation(): Translation;
233
+ showDialog(): void;
234
+ doMachineTranslation(): void;
235
+ apply(): void;
236
+ cancel(): void;
237
+ dispose(): void;
238
+ private setupNavigationButtons;
239
+ private createStringsToTranslate;
240
+ private addStringsToTranlate;
241
+ }
242
+ export declare function createImportCSVAction(action: () => void, needSeparator: boolean, isInEditor?: boolean): Action;
243
+ export declare function createExportCSVAction(action: () => void, isInEditor?: boolean): Action;