survey-creator-core 1.9.61 → 1.9.63

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,4 +1,3 @@
1
- /// <reference types="ace" />
2
1
  declare module "localization/english" {
3
2
  export var enStrings: {
4
3
  survey: {
@@ -912,6 +911,18 @@ declare module "creator-settings" {
912
911
  * Use it to change the default question JSON on dropping it into designer or converting questions
913
912
  */
914
913
  defaultJSON: {
914
+ dropdown: {
915
+ choices: string[];
916
+ };
917
+ checkbox: {
918
+ choices: string[];
919
+ };
920
+ radiogroup: {
921
+ choices: string[];
922
+ };
923
+ ranking: {
924
+ choices: string[];
925
+ };
915
926
  imagepicker: {
916
927
  choices: {
917
928
  value: string;
@@ -3288,7 +3299,7 @@ declare module "components/tabs/json-editor-ace" {
3288
3299
  constructor(creator: CreatorBase);
3289
3300
  protected getText(): string;
3290
3301
  protected setText(value: string): void;
3291
- init(aceEditor: AceAjax.Editor): void;
3302
+ init(aceEditor: any): void;
3292
3303
  private updateUndoRedoState;
3293
3304
  protected onTextChanged(): void;
3294
3305
  private createAnnotations;
@@ -3878,6 +3889,8 @@ declare module "components/tabs/logic" {
3878
3889
  import { ISurveyLogicItemOwner, SurveyLogicItem, SurveyLogicAction } from "components/tabs/logic-items";
3879
3890
  import { SurveyLogicType } from "components/tabs/logic-types";
3880
3891
  export function initLogicOperator(question: QuestionDropdownModel): void;
3892
+ export class LogicEvent extends Event<(sender: SurveyLogic, options: any) => any, any> {
3893
+ }
3881
3894
  export class SurveyLogic extends Base implements ISurveyLogicItemOwner {
3882
3895
  survey: SurveyModel;
3883
3896
  options: ISurveyCreatorOptions;
@@ -3891,7 +3904,7 @@ declare module "components/tabs/logic" {
3891
3904
  * The event is called when logic item is saved.
3892
3905
  * options.item is the saved logic item.
3893
3906
  */
3894
- onLogicItemSaved: Event<(sender: SurveyLogic, options: any) => any, any>;
3907
+ onLogicItemSaved: LogicEvent;
3895
3908
  /**
3896
3909
  * The event is called before logic item is saved. You can set options.error to non empty string to show error instead of saving the item.
3897
3910
  * You can use options.item.actions to access actions and optionally set errorText to a particular action.
@@ -3900,18 +3913,18 @@ declare module "components/tabs/logic" {
3900
3913
  * usedNamesInExpression - the string list of all variables (questions, calculatedValues, and so on) that are used in expression
3901
3914
  * error - the error string. It is empty by default. You have to set it to non-empty string to show the error on saving.
3902
3915
  */
3903
- onLogicItemValidation: Event<(sender: SurveyLogic, options: any) => any, any>;
3916
+ onLogicItemValidation: LogicEvent;
3904
3917
  /**
3905
3918
  * The event is called before logic item is being removed.
3906
3919
  * options.allowRemove is the option you can set to false and prevent removing.
3907
3920
  * options.item is the logic item to remove.
3908
3921
  */
3909
- onLogicItemRemoving: Event<(sender: SurveyLogic, options: any) => any, any>;
3922
+ onLogicItemRemoving: LogicEvent;
3910
3923
  /**
3911
3924
  * The event is called when logic item is removed.
3912
3925
  * options.item is the removed logic item.
3913
3926
  */
3914
- onLogicItemRemoved: Event<(sender: SurveyLogic, options: any) => any, any>;
3927
+ onLogicItemRemoved: LogicEvent;
3915
3928
  constructor(survey: SurveyModel, options?: ISurveyCreatorOptions);
3916
3929
  dispose(): void;
3917
3930
  items: Array<SurveyLogicItem>;
@@ -5038,6 +5051,7 @@ declare module "components/link-value" {
5038
5051
  showTooltip: boolean;
5039
5052
  constructor(name: string, json?: any);
5040
5053
  protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
5054
+ get ariaRole(): string;
5041
5055
  get tooltip(): string;
5042
5056
  getType(): string;
5043
5057
  doLinkClick(): void;
@@ -5345,8 +5359,8 @@ declare module "plugins/undo-redo/undo-redo-manager" {
5345
5359
  }
5346
5360
  }
5347
5361
  declare module "plugins/undo-redo/undo-redo-controller" {
5348
- import { Action, Base, Event } from "survey-core";
5349
- import { CreatorBase } from "creator-base";
5362
+ import { Action, Base } from "survey-core";
5363
+ import { CreatorBase, CreatorEvent } from "creator-base";
5350
5364
  import { UndoRedoManager } from "plugins/undo-redo/undo-redo-manager";
5351
5365
  export class UndoRedoController extends Base {
5352
5366
  private creator;
@@ -5368,22 +5382,22 @@ declare module "plugins/undo-redo/undo-redo-controller" {
5368
5382
  * The event is called before undo happens.
5369
5383
  * options.canUndo a boolean value. It is true by default. Set it false to hide prevent undo operation.
5370
5384
  */
5371
- onBeforeUndo: Event<(sender: CreatorBase, options: any) => any, any>;
5385
+ onBeforeUndo: CreatorEvent;
5372
5386
  /**
5373
5387
  * The event is called before redo happens.
5374
5388
  * options.canRedo a boolean value. It is true by default. Set it false to hide prevent redo operation.
5375
5389
  */
5376
- onBeforeRedo: Event<(sender: CreatorBase, options: any) => any, any>;
5390
+ onBeforeRedo: CreatorEvent;
5377
5391
  /**
5378
5392
  * The event is called after undo happens.
5379
5393
  * options.state is an undo/redo item.
5380
5394
  */
5381
- onAfterUndo: Event<(sender: CreatorBase, options: any) => any, any>;
5395
+ onAfterUndo: CreatorEvent;
5382
5396
  /**
5383
5397
  * The event is called after redo happens.
5384
5398
  * options.state is an undo/redo item.
5385
5399
  */
5386
- onAfterRedo: Event<(sender: CreatorBase, options: any) => any, any>;
5400
+ onAfterRedo: CreatorEvent;
5387
5401
  }
5388
5402
  }
5389
5403
  declare module "plugins/undo-redo/index" {
@@ -5839,6 +5853,8 @@ declare module "creator-base" {
5839
5853
  protected getRenderedActions(): Array<Action>;
5840
5854
  }
5841
5855
  export type toolboxLocationType = "left" | "right" | "sidebar";
5856
+ export class CreatorEvent extends Survey.Event<(sender: CreatorBase, options: any) => any, any> {
5857
+ }
5842
5858
  /**
5843
5859
  * Base class for Survey Creator.
5844
5860
  */
@@ -5999,7 +6015,7 @@ declare module "creator-base" {
5999
6015
  *- options.elementType the type of the element: 'question', 'panel' or 'page'.
6000
6016
  *- options.allowing set it to false to cancel the element deleting
6001
6017
  */
6002
- onElementDeleting: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6018
+ onElementDeleting: CreatorEvent;
6003
6019
  /**
6004
6020
  * The event is called on setting a readOnly property of the property editor. By default the property.readOnly property is used.
6005
6021
  * You may changed it and make the property editor read only or enabled for a particular object.
@@ -6010,14 +6026,14 @@ declare module "creator-base" {
6010
6026
  *- options.parentObj the parent object. It is null for non-nested properties. It is not null for itemvalue or column objects. The parent object is a question (dropdown, radigroup, checkbox, matrices and so on).
6011
6027
  *- options.parentProperty the parent property (Survey.JsonObjectProperty object). It is null for non-nested properties. It is not null for itemvalue or column objects. The parent object is choices, columns, rows, triggers and so on.
6012
6028
  */
6013
- onGetPropertyReadOnly: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6029
+ onGetPropertyReadOnly: CreatorEvent;
6014
6030
  /**
6015
6031
  * The event is fired when the survey creator creates a survey object (Survey.Survey).
6016
6032
  *- sender the survey creator object that fires the event
6017
6033
  *- options.survey the survey object showing in the creator.
6018
6034
  *- options.reason indicates what component of the creator requests the survey. There are several reason types: "designer" - survey for designer survey, "test" - survey for "Preview" tab and "conditionEditor", "defaultValueEditor", "restfulEditor" - surveys for different property editors.
6019
6035
  */
6020
- onSurveyInstanceCreated: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6036
+ onSurveyInstanceCreated: CreatorEvent;
6021
6037
  /**
6022
6038
  * An event that is raised when Survey Creator obtains a survey element name to display it in the UI.
6023
6039
  *
@@ -6049,7 +6065,7 @@ declare module "creator-base" {
6049
6065
  * - `"property-grid"` - Use the `"property-grid-header:element-list"` value of `options.area` instead.
6050
6066
  * - `"property-grid-title"` - Use the `"property-grid-header:selected-element"` value of `options.area` instead.
6051
6067
  */
6052
- onGetObjectDisplayName: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6068
+ onGetObjectDisplayName: CreatorEvent;
6053
6069
  /**
6054
6070
  * This event is raised after a user has edited a text value on the design surface. This value may include HTML markup. You can handle the `onHtmlToMarkdown` event to convert the HTML markup to Markdown.
6055
6071
  *
@@ -6061,7 +6077,7 @@ declare module "creator-base" {
6061
6077
  * - `options.html` - HTML content. Pass this field's value to an HTML-to-Markdown converter.
6062
6078
  * - `options.text` - A text string that may contain Markdown. Assign the result of the HTML-to-Markdown conversion to this field.
6063
6079
  */
6064
- onHtmlToMarkdown: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6080
+ onHtmlToMarkdown: CreatorEvent;
6065
6081
  /**
6066
6082
  * Use this event to disable user interactions with a question or panel on the design surface.
6067
6083
  *
@@ -6079,7 +6095,7 @@ declare module "creator-base" {
6079
6095
  *
6080
6096
  * To disable a user interaction, set the correponding `allow...` property to `false`.
6081
6097
  */
6082
- onElementAllowOperations: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6098
+ onElementAllowOperations: CreatorEvent;
6083
6099
  /**
6084
6100
  * Use this event to add/remove/modify the element (question/panel) menu items.
6085
6101
  *- sender the survey creator object that fires the event
@@ -6087,7 +6103,7 @@ declare module "creator-base" {
6087
6103
  *- options.items the list of menu items. It has two required fields: text and onClick: function(obj: Survey.Base) {} and optional name field.
6088
6104
  * @see onElementAllowOperations
6089
6105
  */
6090
- onDefineElementMenuItems: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6106
+ onDefineElementMenuItems: CreatorEvent;
6091
6107
  /**
6092
6108
  * The event is called before showing a property in the Properties Grid or in the Question Editor.
6093
6109
  *- sender the survey creator object that fires the event
@@ -6099,7 +6115,7 @@ declare module "creator-base" {
6099
6115
  *
6100
6116
  * [Example: Hide a category in the Properties Grid](https://surveyjs.io/Examples/Survey-Creator?id=hidecategoryinpropertiesgrid)
6101
6117
  */
6102
- onShowingProperty: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6118
+ onShowingProperty: CreatorEvent;
6103
6119
  /**
6104
6120
  * @Deprecated Obsolete, please use onShowingProperty event.
6105
6121
  * The event is called before showing a property in the Property Grid or in Question Editor.
@@ -6110,14 +6126,14 @@ declare module "creator-base" {
6110
6126
  *- options.parentObj the parent object. It is null for non-nested properties. It is not null for itemvalue or column objects. The parent object is a question (dropdown, radigroup, checkbox, matrices and so on).
6111
6127
  *- options.parentProperty the parent property (Survey.JsonObjectProperty object). It is null for non-nested properties. It is not null for itemvalue or column objects. The parent object is choices, columns, rows, triggers and so on.
6112
6128
  */
6113
- onCanShowProperty: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6129
+ onCanShowProperty: CreatorEvent;
6114
6130
  /**
6115
6131
  * The event is called after a survey that represents the Property Grid is created and all its questions (property editors) are setup.
6116
6132
  * You can use this event to modify this survey to change the property grid behavior
6117
6133
  *- options.obj the survey object that is currently editing in the property grid
6118
6134
  *- options.survey the property grid survey
6119
6135
  */
6120
- onPropertyGridSurveyCreated: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6136
+ onPropertyGridSurveyCreated: CreatorEvent;
6121
6137
  /**
6122
6138
  * The event is called after a property editor (in fact a survey question) has been created and all it's properties have been assign.
6123
6139
  * You can use this event to modify the property editor properties or set event handlers to customize it's behavior
@@ -6125,7 +6141,7 @@ declare module "creator-base" {
6125
6141
  *- options.property the property that the current property editor is editing
6126
6142
  *- options.editor the property editor. In fact it is a survey question. We are using a heavily customizable survey as a property grid in Creator V2. It means that every property editor is a question.
6127
6143
  */
6128
- onPropertyEditorCreated: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6144
+ onPropertyEditorCreated: CreatorEvent;
6129
6145
  /**
6130
6146
  * The event is called after a property editor setups its title actions.
6131
6147
  * You can use this event to modify the property editor title actions
@@ -6134,7 +6150,7 @@ declare module "creator-base" {
6134
6150
  *- options.editor the property editor. In fact it is a survey question. We are using a heavily customizable survey as a property grid in Creator V2. It means that every property editor is a question.
6135
6151
  *- options.titleActions the list of title actions.
6136
6152
  */
6137
- onPropertyEditorUpdateTitleActions: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6153
+ onPropertyEditorUpdateTitleActions: CreatorEvent;
6138
6154
  /**
6139
6155
  * An event that is raised before Survey Creator displays a pop-up window called from the Property Grid. This window allows users to edit choices, conditions, and so on.
6140
6156
  *
@@ -6149,7 +6165,7 @@ declare module "creator-base" {
6149
6165
  * - `options.popupEditor` - An editor inside the pop-up window.
6150
6166
  * - `options.popupModel` - A `PopupBaseViewModel` object that describes the pop-up window model. Use `options.popupModel.footerToolbar` to access the actions at the bottom of the window.
6151
6167
  */
6152
- onPropertyGridShowModal: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6168
+ onPropertyGridShowModal: CreatorEvent;
6153
6169
  /**
6154
6170
  * The event is called before rendering a delete button in the Property Grid or in Question Editor.
6155
6171
  * Obsolete, please use onCollectionItemAllowOperations
@@ -6159,7 +6175,7 @@ declare module "creator-base" {
6159
6175
  *- options.canDelete a boolean value. It is true by default. Set it false to remove delete button from the Property Grid or in Question Editor
6160
6176
  * @see onCollectionItemAllowOperations
6161
6177
  */
6162
- onCanDeleteItem: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6178
+ onCanDeleteItem: CreatorEvent;
6163
6179
  /**
6164
6180
  * The event is called on deleting a collection item from the Property Editor. For example: column in columns editor or item in choices and so on.
6165
6181
  * Obsolete, please use onCollectionItemAllowOperations
@@ -6172,7 +6188,7 @@ declare module "creator-base" {
6172
6188
  *- options.allowDelete a boolean value. It is true by default. Set it false to abondome the element removing from the collection
6173
6189
  * @see onCollectionItemAllowOperations
6174
6190
  */
6175
- onCollectionItemDeleting: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6191
+ onCollectionItemDeleting: CreatorEvent;
6176
6192
  /**
6177
6193
  * The event is called before rendering a collection item from the Property Editor. For example: column in columns editor or item in choices and so on.
6178
6194
  * You can make detail/edit and remove buttons invsible and/or disable editing.
@@ -6185,7 +6201,7 @@ declare module "creator-base" {
6185
6201
  *- options.allowDelete a boolean value. It is true by default. Set it false to abondome the element removing from the collection
6186
6202
  *- options.allowEdit a boolean value. It is true by default. Set it false to disable editing.
6187
6203
  */
6188
- onCollectionItemAllowOperations: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6204
+ onCollectionItemAllowOperations: CreatorEvent;
6189
6205
  /**
6190
6206
  * The event is called on adding a new Survey.ItemValue object. It uses as an element in choices array in Radiogroup, checkbox and dropdown questions or Matrix columns and rows properties.
6191
6207
  * Use this event, to set ItemValue.value and ItemValue.text properties by default or set a value to the custom property.
@@ -6195,7 +6211,7 @@ declare module "creator-base" {
6195
6211
  *- options.newItem a new created Survey.ItemValue object.
6196
6212
  *- options.itemValues an editing Survey.ItemValue array. newItem object is not added yet into this array.
6197
6213
  */
6198
- onItemValueAdded: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6214
+ onItemValueAdded: CreatorEvent;
6199
6215
  /**
6200
6216
  * The event is called when a user adds a new column into MatrixDropdown or MatrixDynamic questions. Use it to set some properties of Survey.MatrixDropdownColumn by default, for example name or a custom property.
6201
6217
  *- sender the survey creator object that fires the event
@@ -6203,7 +6219,7 @@ declare module "creator-base" {
6203
6219
  *- options.newColumn a new created Survey.MatrixDropdownColumn object.
6204
6220
  *- options.columns editable columns objects. They can be different from options.matrix.columns. options.columns and options.matrix.columns are equal after user press Apply or Cancel and options.columns will be set to options.matrix.columns or reset to initial state.
6205
6221
  */
6206
- onMatrixColumnAdded: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6222
+ onMatrixColumnAdded: CreatorEvent;
6207
6223
  /**
6208
6224
  * Use this event to control Property Editors UI.
6209
6225
  *- sender the survey creator object that fires the event
@@ -6215,7 +6231,7 @@ declare module "creator-base" {
6215
6231
  *- options.editorOptions.allowBatchEdit a boolean property, true by default. Set it false to hide the "Edit" button for the "choices" property.
6216
6232
  *- options.editorOptions.itemsEntryType a string property, 'form' by default. Set it 'fast' to show "Manual Entry" tab for "choices" property by default.
6217
6233
  */
6218
- onSetPropertyEditorOptions: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6234
+ onSetPropertyEditorOptions: CreatorEvent;
6219
6235
  /**
6220
6236
  * The event is called on generation a new name for a new created element.
6221
6237
  *- sender the survey creator object that fires the event
@@ -6223,7 +6239,7 @@ declare module "creator-base" {
6223
6239
  *- options.name a new suggested name, that is unique for the current survey. You can suggest your own name. If it is unique, creator will assign it to the element.
6224
6240
  *- options.isUnique a boolean property, set this property to false, if you want to ask Creator to generate another name
6225
6241
  */
6226
- onGenerateNewName: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6242
+ onGenerateNewName: CreatorEvent;
6227
6243
  /**
6228
6244
  * Use this event to show a custom error in the Question Editor on pressing Apply or OK buttons, if the values are not set correctly. The error will be displayed under the property editor.
6229
6245
  *- sender the survey creator object that fires the event
@@ -6233,7 +6249,7 @@ declare module "creator-base" {
6233
6249
  *- options.error the error you want to display. Set the empty string (the default value) or null if there is no errors.
6234
6250
  * @see onPropertyValueChanging
6235
6251
  */
6236
- onPropertyValidationCustomError: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6252
+ onPropertyValidationCustomError: CreatorEvent;
6237
6253
  /**
6238
6254
  * An event that is raised each time a user edits a survey object property.
6239
6255
  * Use this event to correct or validate the property value while the user enters it.
@@ -6248,7 +6264,7 @@ declare module "creator-base" {
6248
6264
  * @see onPropertyValidationCustomError
6249
6265
  * @see onSurveyPropertyValueChanged
6250
6266
  */
6251
- onPropertyValueChanging: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6267
+ onPropertyValueChanging: CreatorEvent;
6252
6268
  /**
6253
6269
  * An event that is raised after a property in a survey object has changed.
6254
6270
  *
@@ -6259,7 +6275,7 @@ declare module "creator-base" {
6259
6275
  * @see onPropertyValidationCustomError
6260
6276
  * @see onPropertyValueChanging
6261
6277
  */
6262
- onSurveyPropertyValueChanged: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6278
+ onSurveyPropertyValueChanged: CreatorEvent;
6263
6279
  /**
6264
6280
  * Use this event to modify the list (name and titles) of the questions available in a condition editor.
6265
6281
  *- sender the survey creator object that fires the event
@@ -6269,14 +6285,14 @@ declare module "creator-base" {
6269
6285
  *- options.list the list of the questions available for condition
6270
6286
  *- options.sortOrder "asc" (default) | "none". Change it to "none", if you don't want to sort your condition list
6271
6287
  */
6272
- onConditionQuestionsGetList: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6288
+ onConditionQuestionsGetList: CreatorEvent;
6273
6289
  /**
6274
6290
  * Use this event to modify the title in a condition editor. The title is changing during editing. In case of empty or incorrect expression it tells that expression is incorrect
6275
6291
  *- sender the survey creator object that fires the event.
6276
6292
  *- options.expression the current expression. If the expression is empty or incorrect then the value is empty.
6277
6293
  *- options.title the default value of the title. You can change the default value.
6278
6294
  */
6279
- onConditionGetTitle: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6295
+ onConditionGetTitle: CreatorEvent;
6280
6296
  /**
6281
6297
  * Use this event to modify the display text of a logic item in the Logic tab.
6282
6298
  *
@@ -6288,7 +6304,7 @@ declare module "creator-base" {
6288
6304
  * - `options.logicItem` - A logic item object. Contains an array of actions and other properties.
6289
6305
  * - `options.text` - The expression and actions in a user-friendly format. Redefine this property if you want to change the display text.
6290
6306
  */
6291
- onLogicItemDisplayText: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6307
+ onLogicItemDisplayText: CreatorEvent;
6292
6308
  /**
6293
6309
  * The event is called when a survey is changed in the designer. A new page/question/page is added or existing is removed, a property is changed and so on.
6294
6310
  *- sender the survey creator object that fires the event
@@ -6336,7 +6352,7 @@ declare module "creator-base" {
6336
6352
  *- options.type: "TRANSLATIONS_CHANGED"
6337
6353
  *- options.type: "JSON_EDITOR"
6338
6354
  */
6339
- onModified: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6355
+ onModified: CreatorEvent;
6340
6356
  /**
6341
6357
  * The event is called on adding a new question into the survey. Typically, when a user dropped a Question from the Question Toolbox into designer Survey area.
6342
6358
  *- sender the survey creator object that fires the event
@@ -6344,53 +6360,53 @@ declare module "creator-base" {
6344
6360
  *- options.page the survey Page object where question has been added.
6345
6361
  *- options.reason how question has been added via UI: ADDED_FROM_TOOLBOX, ADDED_FROM_PAGEBUTTON, ELEMENT_COPIED.
6346
6362
  */
6347
- onQuestionAdded: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6363
+ onQuestionAdded: CreatorEvent;
6348
6364
  /**
6349
6365
  * The event is called on adding a new panel into the survey. Typically, when a user dropped a Panel from the Question Toolbox into designer Survey area.
6350
6366
  *- sender the survey creator object that fires the event
6351
6367
  *- options.panel a new added survey panel. Survey.Panel object
6352
6368
  *- options.page the survey Page object where question has been added.
6353
6369
  */
6354
- onPanelAdded: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6370
+ onPanelAdded: CreatorEvent;
6355
6371
  /**
6356
6372
  * The event is called on adding a new page into the survey.
6357
6373
  *- sender the survey creator object that fires the event
6358
6374
  *- options.page the new survey Page object.
6359
6375
  */
6360
- onPageAdded: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6376
+ onPageAdded: CreatorEvent;
6361
6377
  /**
6362
6378
  * The event is fired when the survey creator is initialized and a survey object (Survey.Survey) is created.
6363
6379
  *- sender the survey creator object that fires the event
6364
6380
  *- options.survey the survey object showing in the creator.
6365
6381
  */
6366
- onDesignerSurveyCreated: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6382
+ onDesignerSurveyCreated: CreatorEvent;
6367
6383
  /**
6368
6384
  * The event is fired when the survey creator creates survey in Preview tab for testing.
6369
6385
  *- sender the survey creator object that fires the event
6370
6386
  *- options.survey the survey object showing in the "Preview" tab.
6371
6387
  */
6372
- onPreviewSurveyCreated: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6388
+ onPreviewSurveyCreated: CreatorEvent;
6373
6389
  /**
6374
6390
  * Obsolete. Please use onPreviewSurveyCreated event.
6375
6391
  * @see onPreviewSurveyCreated
6376
6392
  */
6377
- onTestSurveyCreated: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6393
+ onTestSurveyCreated: CreatorEvent;
6378
6394
  /**
6379
6395
  * The event is called in case of UI notifications. By default all notifications are done via built-in alert () function.
6380
6396
  * In case of any subscriptions to this event all notifications will be redirected into the event handler.
6381
6397
  *- options.message is a message to show.
6382
6398
  */
6383
- onNotify: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6399
+ onNotify: CreatorEvent;
6384
6400
  /**
6385
6401
  * The event is called on changing the selected element. You may change the new selected element by changing the property options.newSelectedElement to your own
6386
6402
  *- options.newSelectedElement the element that is going to be selected in the survey desiger: question, panel, page or survey.
6387
6403
  */
6388
- onSelectedElementChanging: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6404
+ onSelectedElementChanging: CreatorEvent;
6389
6405
  /**
6390
6406
  * The event is called after the selected element is changed.
6391
6407
  *- options.newSelectedElement the new selected element in the survey desiger: question, panel, page or survey.
6392
6408
  */
6393
- onSelectedElementChanged: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6409
+ onSelectedElementChanged: CreatorEvent;
6394
6410
  /**
6395
6411
  * The event is fired then one need to choose files.
6396
6412
  *- sender the survey creator object that fires the event
@@ -6398,7 +6414,7 @@ declare module "creator-base" {
6398
6414
  * callback need to be called after files has been chosen
6399
6415
  * @see uploadFile
6400
6416
  */
6401
- onOpenFileChooser: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6417
+ onOpenFileChooser: CreatorEvent;
6402
6418
  /**
6403
6419
  * The event is fired on uploading the files.
6404
6420
  *- sender the survey creator object that fires the event
@@ -6409,7 +6425,7 @@ declare module "creator-base" {
6409
6425
  * a status and an image link
6410
6426
  * @see uploadFile
6411
6427
  */
6412
- onUploadFile: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6428
+ onUploadFile: CreatorEvent;
6413
6429
  /**
6414
6430
  * Use this event to modify the list of the strings available in the Translation tab.
6415
6431
  *
@@ -6420,7 +6436,7 @@ declare module "creator-base" {
6420
6436
  * - `options.propertyName` - The name of a property being translated.
6421
6437
  * - `options.visible` - A Boolean value that specifies the property visibility. Set it to `false` to hide the property.
6422
6438
  */
6423
- onTranslationStringVisibility: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6439
+ onTranslationStringVisibility: CreatorEvent;
6424
6440
  /**
6425
6441
  * Use this event to define is the locale initially selected (default value) and ready for translaion or it is unselected.
6426
6442
  *
@@ -6430,7 +6446,7 @@ declare module "creator-base" {
6430
6446
  * - `options.locale` - the locale name, like 'en', 'de' and so on.
6431
6447
  * - `options.isSelected` - it is true by default. Set it to false to make the translation unselected.
6432
6448
  */
6433
- onTranslationLocaleInitiallySelected: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6449
+ onTranslationLocaleInitiallySelected: CreatorEvent;
6434
6450
  /**
6435
6451
  * Use this event to modify the imported localizable text. To block importing a particular localization text, set the options.text into undefined.
6436
6452
  *
@@ -6441,13 +6457,13 @@ declare module "creator-base" {
6441
6457
  * - `options.name` - The full name of the localizable string, it can be: "survey.page1.question2.title"
6442
6458
  * - `options.text` - The imported text for the locale for this item. Set it to undefined or empty string to block importing for this item
6443
6459
  */
6444
- onTranslationImportItem: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6460
+ onTranslationImportItem: CreatorEvent;
6445
6461
  /**
6446
6462
  * The event is called when the translation from csv file is imported.
6447
6463
  * @see translation
6448
6464
  * @see showTranslationTab
6449
6465
  */
6450
- onTranslationImported: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6466
+ onTranslationImported: CreatorEvent;
6451
6467
  /**
6452
6468
  * Use this event to modify a translated string before it is exported to CSV.
6453
6469
  *
@@ -6460,7 +6476,7 @@ declare module "creator-base" {
6460
6476
  * - `options.locString` - A `LocalizableString` instance. Call the `options.locString.getLocaleText(locale)` method if you need to get a text string for a specific locale.
6461
6477
  * - `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.
6462
6478
  */
6463
- onTranslationExportItem: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6479
+ onTranslationExportItem: CreatorEvent;
6464
6480
  /**
6465
6481
  * Use this event to control drag&drop operations.
6466
6482
  *- sender the survey creator object that fires the event.
@@ -6472,7 +6488,7 @@ declare module "creator-base" {
6472
6488
  *- options.insertBefore an element before the target element is dragging. It can be null if parent container (page or panel) is empty or dragging an element under the last element of the container.
6473
6489
  *- options.insertAfter an element after the target element is dragging. It can be null if parent container (page or panel) is empty or dragging element to the top of the parent container.
6474
6490
  */
6475
- onDragDropAllow: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6491
+ onDragDropAllow: CreatorEvent;
6476
6492
  /**
6477
6493
  * This callback is used internally for providing survey JSON text.
6478
6494
  */
@@ -6674,14 +6690,14 @@ declare module "creator-base" {
6674
6690
  *- sender the survey creator object that fires the event
6675
6691
  *- options.tabName the name of new active tab
6676
6692
  */
6677
- onActiveTabChanging: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6693
+ onActiveTabChanging: CreatorEvent;
6678
6694
  /**
6679
6695
  * The event is called when creator active tab is changed.
6680
6696
  *- sender the survey creator object that fires the event
6681
6697
  *- options.tabName the name of new active tab
6682
6698
  *- options.model the instance of the model of the new active tab
6683
6699
  */
6684
- onActiveTabChanged: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6700
+ onActiveTabChanged: CreatorEvent;
6685
6701
  /**
6686
6702
  * Get/set the active tab.
6687
6703
  * The following values are available: "designer", "editor", "test", "embed", "logic" and "translation".
@@ -6706,14 +6722,14 @@ declare module "creator-base" {
6706
6722
  get showToolbox(): boolean;
6707
6723
  set showToolbox(val: boolean);
6708
6724
  private showSidebarValue;
6709
- onShowSidebarVisibilityChanged: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6725
+ onShowSidebarVisibilityChanged: CreatorEvent;
6710
6726
  /**
6711
6727
  * Set this this property grid false to hide the property grid.
6712
6728
  */
6713
6729
  get showSidebar(): boolean;
6714
6730
  set showSidebar(val: boolean);
6715
6731
  setShowSidebar(value: boolean, isManualMode?: boolean): void;
6716
- onShowPropertyGridVisiblityChanged: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6732
+ onShowPropertyGridVisiblityChanged: CreatorEvent;
6717
6733
  get showPropertyGrid(): boolean;
6718
6734
  set showPropertyGrid(val: boolean);
6719
6735
  rightContainerActiveItem(name: string): void;
@@ -6722,22 +6738,22 @@ declare module "creator-base" {
6722
6738
  * The event is called before undo happens.
6723
6739
  *- options.canUndo a boolean value. It is true by default. Set it false to hide prevent undo operation.
6724
6740
  */
6725
- onBeforeUndo: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6741
+ onBeforeUndo: CreatorEvent;
6726
6742
  /**
6727
6743
  * The event is called before redo happens.
6728
6744
  *- options.canRedo a boolean value. It is true by default. Set it false to hide prevent redo operation.
6729
6745
  */
6730
- onBeforeRedo: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6746
+ onBeforeRedo: CreatorEvent;
6731
6747
  /**
6732
6748
  * The event is called after undo happens.
6733
6749
  *- options.state is an undo/redo item.
6734
6750
  */
6735
- onAfterUndo: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6751
+ onAfterUndo: CreatorEvent;
6736
6752
  /**
6737
6753
  * The event is called after redo happens.
6738
6754
  *- options.state is an undo/redo item.
6739
6755
  */
6740
- onAfterRedo: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6756
+ onAfterRedo: CreatorEvent;
6741
6757
  get undoRedoManager(): UndoRedoManager;
6742
6758
  get undoRedoController(): UndoRedoController;
6743
6759
  /**
@@ -6839,7 +6855,7 @@ declare module "creator-base" {
6839
6855
  */
6840
6856
  get state(): string;
6841
6857
  protected setState(value: string): void;
6842
- onStateChanged: Survey.Event<(sender: CreatorBase, options: any) => any, any>;
6858
+ onStateChanged: CreatorEvent;
6843
6859
  notifier: Notifier;
6844
6860
  setModified(options?: any): void;
6845
6861
  notifySurveyPropertyChanged(options: any): void;
@@ -7674,4 +7690,5 @@ declare module "entries/index" {
7674
7690
  export * from "plugins/undo-redo/undo-redo-manager";
7675
7691
  export * from "pages-controller";
7676
7692
  }
7677
- declare module 'survey-creator-core' { import main = require('entries/index'); export = main; }
7693
+
7694
+ declare module "survey-creator-core" { import main = require("entries/index"); export = main; }