survey-creator-core 1.9.51 → 1.9.53

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.
@@ -1,16 +1,16 @@
1
1
  /*
2
- * Type definition for Survey Creatorlibrary. Platform independent (core) v1.9.51
2
+ * Type definition for Survey Creatorlibrary. Platform independent (core) v1.9.53
3
3
  * Copyright (c) 2015-2022 Devsoft Baltic OÜ - https://surveyjs.io/
4
4
  * License: https://surveyjs.io/Licenses#SurveyCreator
5
5
  */
6
6
  import { Base, JsonObjectProperty, Question, SurveyModel, ItemValue } from "survey-core";
7
- import { MatrixDropdownColumn, IAction, Action, ILocalizableOwner, LocalizableString } from "survey-core";
8
- import { ActionContainer, DragDropSurveyElements, DragDropChoices, Event, AdaptiveActionContainer } from "survey-core";
9
- import { PageModel, IElement, IPanel, ISurveyElement, SurveyElement } from "survey-core";
10
- import { QuestionSelectBase, Operand, DragOrClickHelper, PanelModel, QuestionDropdownModel } from "survey-core";
11
- import { ListModel, PopupModel, EventBase, PanelModelBase, QuestionNonValue } from "survey-core";
12
- import { SurveyTemplateRendererTemplateData, QuestionRatingModel, QuestionRowModel, ComputedUpdater, QuestionCheckboxModel } from "survey-core";
13
- import { ILocalizableString, ArrayChanges, ImageItemValue, HashTable, QuestionMatrixDynamicModel } from "survey-core";
7
+ import { MatrixDropdownColumn, ILocalizableString, IAction, Action, ILocalizableOwner } from "survey-core";
8
+ import { LocalizableString, ActionContainer, DragDropSurveyElements, DragDropChoices, Event } from "survey-core";
9
+ import { AdaptiveActionContainer, PageModel, IElement, IPanel, ISurveyElement } from "survey-core";
10
+ import { SurveyElement, QuestionSelectBase, Operand, DragOrClickHelper, PanelModel } from "survey-core";
11
+ import { QuestionDropdownModel, ListModel, PopupModel, EventBase, PanelModelBase } from "survey-core";
12
+ import { QuestionNonValue, SurveyTemplateRendererTemplateData, QuestionRatingModel, QuestionRowModel, ComputedUpdater } from "survey-core";
13
+ import { QuestionCheckboxModel, ArrayChanges, ImageItemValue, HashTable, QuestionMatrixDynamicModel } from "survey-core";
14
14
  import { QuestionMatrixModel, QuestionMatrixDropdownModel, QuestionPanelDynamicModel, QuestionCommentModel, MatrixDynamicRowModel } from "survey-core";
15
15
 
16
16
  export { editorLocalization as localization };
@@ -63,6 +63,7 @@ export interface ISurveyCreatorOptions {
63
63
  onConditionQuestionsGetListCallback(propertyName: string, obj: Base, editor: any, list: any): string;
64
64
  onConditionGetTitleCallback(expression: string, title: string): string;
65
65
  onLogicGetTitleCallback(expression: string, displayExpression: string, text: string, logicItem: any): string;
66
+ getTranslationExportedText(obj: Base, name: string, locString: ILocalizableString, locale: string, text: string): string;
66
67
  }
67
68
  /*
68
69
  * Survey Creator configuration. Pass it as an argument to the `SurveyCreator` constructor:
@@ -1037,10 +1038,23 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
1037
1038
  */
1038
1039
  onTranslationImportItem: Event<(sender: CreatorBase, options: any) => any, any>;
1039
1040
  /*
1040
- * The method is called when the translation from csv file is imported.
1041
+ * The event is called when the translation from csv file is imported.
1041
1042
  */
1042
1043
  onTranslationImported: Event<(sender: CreatorBase, options: any) => any, any>;
1043
1044
  /*
1045
+ * Use this event to modify a translated string before it is exported to CSV.
1046
+ *
1047
+ * The event handler accepts the following arguments:
1048
+ *
1049
+ * - `sender` - A Survey Creator instance that raised the event.
1050
+ * - `options.obj` - A survey object instance (survey, page, panel, question) whose string translations are being exported to CSV.
1051
+ * - `options.locale` - The current locale identifier (`"en"`, `"de"`, etc.). Contains an empty string if the default locale is used.
1052
+ * - `options.name` - A full name of the translated string. It is composed of names of all parent elements, for example: `"mySurvey.page1.question2.title"`.
1053
+ * - `options.locString` - A `LocalizableString` instance. Call the `options.locString.getLocaleText(locale)` method if you need to get a text string for a specific locale.
1054
+ * - `options.text` - A text string to be exported. The string is taken from the current locale. Redefine this property if you want to export a different string.
1055
+ */
1056
+ onTranslationExportItem: Event<(sender: CreatorBase, options: any) => any, any>;
1057
+ /*
1044
1058
  * Use this event to control drag&drop operations.
1045
1059
  * - sender the survey creator object that fires the event.
1046
1060
  * - options.survey the editing survey object.
@@ -1498,6 +1512,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
1498
1512
  onConditionQuestionsGetListCallback(propertyName: string, obj: Base, editor: any, list: any): string;
1499
1513
  onConditionGetTitleCallback(expression: string, title: string): string;
1500
1514
  onLogicGetTitleCallback(expression: string, expressionText: string, text: string, logicItem: any): string;
1515
+ getTranslationExportedText(obj: Base, name: string, locString: ILocalizableString, locale: string, text: string): string;
1501
1516
  /*
1502
1517
  * The delay on saving survey JSON on autoSave in ms. It is 500 ms by default.
1503
1518
  * If during this period of time an end-user modify survey, then the last version will be saved only. Set to 0 to save immediately.
@@ -2122,6 +2137,7 @@ export declare class StringEditorConnector extends Base {
2122
2137
  setItemValue(item: ItemValueWrapperViewModel): void;
2123
2138
  onDoActivate: Event<(sender: StringEditorViewModelBase, options: any) => any, any>;
2124
2139
  onEditComplete: Event<(sender: StringEditorViewModelBase, options: any) => any, any>;
2140
+ onBackspaceEmptyString: Event<(sender: StringEditorViewModelBase, options: any) => any, any>;
2125
2141
  }
2126
2142
  export declare class StringEditorViewModelBase extends Base {
2127
2143
  constructor(locString: LocalizableString, creator: CreatorBase);
@@ -2792,6 +2808,7 @@ export declare class EmptySurveyCreatorOptions implements ISurveyCreatorOptions
2792
2808
  onConditionQuestionsGetListCallback(propertyName: string, obj: Base, editor: any, list: any): string;
2793
2809
  onConditionGetTitleCallback(expression: string, title: string): string;
2794
2810
  onLogicGetTitleCallback(expression: string, displayExpression: string, text: string, logicItem: any): string;
2811
+ getTranslationExportedText(obj: Base, name: string, locString: ILocalizableString, locale: string, text: string): string;
2795
2812
  }
2796
2813
  export declare class ImageItemValueWrapperViewModel extends ItemValueWrapperViewModel {
2797
2814
  constructor(creator: CreatorBase, question: QuestionSelectBase, item: ImageItemValue, templateData: any, itemsRoot: any);
@@ -3085,6 +3102,7 @@ export declare class TranslationItem extends TranslationItemBase {
3085
3102
  name: string;
3086
3103
  locString: ILocalizableString;
3087
3104
  defaultValue: string;
3105
+ context: any;
3088
3106
  hashValues: any;
3089
3107
  customText: string;
3090
3108
  afterRender: any;
@@ -3323,6 +3341,7 @@ export declare class QuestionDropdownAdornerViewModel extends QuestionAdornerVie
3323
3341
  isCollapsed: boolean;
3324
3342
  visibleCount: number;
3325
3343
  get question(): QuestionDropdownModel;
3344
+ get itemComponent(): string;
3326
3345
  get needToCollapse(): boolean;
3327
3346
  get isCollapseView(): boolean;
3328
3347
  leftFocus(): void;