survey-creator-core 1.9.34 → 1.9.35
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.
- package/package.json +1 -1
- package/survey-creator-core.css +54 -32
- package/survey-creator-core.d.ts +202 -201
- package/survey-creator-core.i18n.js +22 -25
- package/survey-creator-core.i18n.min.js +2 -2
- package/survey-creator-core.js +236 -215
- package/survey-creator-core.min.css +13 -13
- package/survey-creator-core.min.js +2 -2
package/survey-creator-core.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Type definition for Survey Creatorlibrary. Platform independent (core) v1.9.
|
|
2
|
+
* Type definition for Survey Creatorlibrary. Platform independent (core) v1.9.35
|
|
3
3
|
* Copyright (c) 2015-2022 Devsoft Baltic OÜ - https://surveyjs.io/
|
|
4
4
|
* License: https://surveyjs.io/Licenses#SurveyCreator
|
|
5
5
|
*/
|
|
@@ -405,43 +405,44 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
405
405
|
getPlugin<P extends ICreatorPlugin = ICreatorPlugin>(name: string): any;
|
|
406
406
|
/*
|
|
407
407
|
* The event is called on deleting an element (question/panel/page) from the survey. Typically, when a user click the delete from the element menu.
|
|
408
|
-
*
|
|
409
|
-
*
|
|
410
|
-
*
|
|
411
|
-
*
|
|
408
|
+
* sender the survey creator object that fires the event
|
|
409
|
+
* options.element an instance of the deleting element
|
|
410
|
+
* options.elementType the type of the element: 'question', 'panel' or 'page'.
|
|
411
|
+
* options.allowing set it to false to cancel the element deleting
|
|
412
412
|
*/
|
|
413
413
|
onElementDeleting: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
414
414
|
/*
|
|
415
415
|
* The event is called on setting a readOnly property of the property editor. By default the property.readOnly property is used.
|
|
416
416
|
* You may changed it and make the property editor read only or enabled for a particular object.
|
|
417
|
-
*
|
|
418
|
-
*
|
|
419
|
-
*
|
|
420
|
-
*
|
|
421
|
-
*
|
|
422
|
-
*
|
|
417
|
+
* sender the survey creator object that fires the event
|
|
418
|
+
* options.obj the survey object, Survey, Page, Panel or Question
|
|
419
|
+
* options.property the object property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties.
|
|
420
|
+
* options.readOnly a boolean value. It has value equals to options.readOnly property by default. You may change it.
|
|
421
|
+
* 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).
|
|
422
|
+
* 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.
|
|
423
423
|
*/
|
|
424
424
|
onGetPropertyReadOnly: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
425
425
|
/*
|
|
426
426
|
* The event is fired when the survey creator creates a survey object (Survey.Survey).
|
|
427
|
-
*
|
|
428
|
-
*
|
|
429
|
-
*
|
|
427
|
+
* sender the survey creator object that fires the event
|
|
428
|
+
* options.survey the survey object showing in the creator.
|
|
429
|
+
* 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.
|
|
430
430
|
*/
|
|
431
431
|
onSurveyInstanceCreated: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
432
432
|
/*
|
|
433
433
|
* The event allows to display the custom name for objects: questions, pages and panels. By default the object name is using. You may show object title by setting showObjectTitles property to true.
|
|
434
434
|
* Use this event, if you want custom display name for objects.
|
|
435
|
-
*
|
|
436
|
-
*
|
|
437
|
-
*
|
|
438
|
-
*
|
|
439
|
-
*
|
|
440
|
-
*
|
|
441
|
-
*
|
|
442
|
-
*
|
|
443
|
-
*
|
|
444
|
-
*
|
|
435
|
+
* sender the survey creator object that fires the event
|
|
436
|
+
* options.obj the survey object, Survey, Page, Panel or Question
|
|
437
|
+
* options.reason the name of the UI that requests the object display name.
|
|
438
|
+
* options.displayName change this property to show your custom display name for the object
|
|
439
|
+
* The list of possible values in options.reason:
|
|
440
|
+
* "condition" - raised from Condition modal window or on setup condition in a logic tab
|
|
441
|
+
* "survey-tester" - raised from page selector list in "Preview" tab
|
|
442
|
+
* "survey-tester-selected" - raised on setting page selector title in "Preview" tab
|
|
443
|
+
* "survey-translation" - raised from translation tab
|
|
444
|
+
* "property-grid" - raised from showing object selector for property grid in "Designer" tab.
|
|
445
|
+
* "property-grid-title" - raised on rendering selected object title in property grid in "Designer" tab.
|
|
445
446
|
*/
|
|
446
447
|
onGetObjectDisplayName: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
447
448
|
/*
|
|
@@ -476,127 +477,127 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
476
477
|
onElementAllowOperations: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
477
478
|
/*
|
|
478
479
|
* Use this event to add/remove/modify the element (question/panel) menu items.
|
|
479
|
-
*
|
|
480
|
-
*
|
|
481
|
-
*
|
|
480
|
+
* sender the survey creator object that fires the event
|
|
481
|
+
* options.obj the survey object which property is edited in the Property Editor.
|
|
482
|
+
* options.items the list of menu items. It has two required fields: text and onClick: function(obj: Survey.Base) {} and optional name field.
|
|
482
483
|
*/
|
|
483
484
|
onDefineElementMenuItems: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
484
485
|
/*
|
|
485
486
|
* The event is called before showing a property in the Properties Grid or in the Question Editor.
|
|
486
|
-
*
|
|
487
|
-
*
|
|
488
|
-
*
|
|
489
|
-
*
|
|
490
|
-
*
|
|
491
|
-
*
|
|
492
|
-
*
|
|
493
|
-
*
|
|
487
|
+
* sender the survey creator object that fires the event
|
|
488
|
+
* options.obj the survey object, Survey, Page, Panel or Question
|
|
489
|
+
* options.property the object property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties.
|
|
490
|
+
* options.canShow a boolean value. It is true by default. Set it false to hide the property from the Properties Grid and in the Question Editor.
|
|
491
|
+
* 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).
|
|
492
|
+
* 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.
|
|
493
|
+
*
|
|
494
|
+
* [Example: Hide a category in the Properties Grid](https://surveyjs.io/Examples/Survey-Creator?id=hidecategoryinpropertiesgrid)
|
|
494
495
|
*/
|
|
495
496
|
onShowingProperty: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
496
497
|
onCanShowProperty: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
497
498
|
/*
|
|
498
499
|
* The event is called after a survey that represents the Property Grid is created and all its questions (property editors) are setup.
|
|
499
500
|
* You can use this event to modify this survey to change the property grid behavior
|
|
500
|
-
*
|
|
501
|
-
*
|
|
501
|
+
* options.obj the survey object that is currently editing in the property grid
|
|
502
|
+
* options.survey the property grid survey
|
|
502
503
|
*/
|
|
503
504
|
onPropertyGridSurveyCreated: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
504
505
|
/*
|
|
505
506
|
* The event is called after a property editor (in fact a survey question) has been created and all it's properties have been assign.
|
|
506
507
|
* You can use this event to modify the property editor properties or set event handlers to customize it's behavior
|
|
507
|
-
*
|
|
508
|
-
*
|
|
509
|
-
*
|
|
508
|
+
* options.obj the survey object that is currently editing in the property grid
|
|
509
|
+
* options.property the property that the current property editor is editing
|
|
510
|
+
* 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.
|
|
510
511
|
*/
|
|
511
512
|
onPropertyEditorCreated: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
512
513
|
/*
|
|
513
514
|
* The event is called after a property editor setups its title actions.
|
|
514
515
|
* You can use this event to modify the property editor title actions
|
|
515
|
-
*
|
|
516
|
-
*
|
|
517
|
-
*
|
|
518
|
-
*
|
|
516
|
+
* options.obj the survey object that is currently editing in the property grid
|
|
517
|
+
* options.property the property that the current property editor is editing
|
|
518
|
+
* 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.
|
|
519
|
+
* options.titleActions the list of title actions.
|
|
519
520
|
*/
|
|
520
521
|
onPropertyEditorUpdateTitleActions: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
521
522
|
/*
|
|
522
523
|
* The event is called before rendering a delete button in the Property Grid or in Question Editor.
|
|
523
524
|
* Obsolete, please use onCollectionItemAllowOperations
|
|
524
|
-
*
|
|
525
|
-
*
|
|
526
|
-
*
|
|
527
|
-
*
|
|
525
|
+
* sender the survey creator object that fires the event
|
|
526
|
+
* options.obj the survey Question
|
|
527
|
+
* options.item the object property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties
|
|
528
|
+
* 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
|
|
528
529
|
*/
|
|
529
530
|
onCanDeleteItem: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
530
531
|
/*
|
|
531
532
|
* 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.
|
|
532
533
|
* Obsolete, please use onCollectionItemAllowOperations
|
|
533
|
-
*
|
|
534
|
-
*
|
|
535
|
-
*
|
|
536
|
-
*
|
|
537
|
-
*
|
|
538
|
-
*
|
|
539
|
-
*
|
|
534
|
+
* sender the survey creator object that fires the event
|
|
535
|
+
* options.obj the survey object: Question, Panel, Page or Survey
|
|
536
|
+
* options.property the collection property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties
|
|
537
|
+
* options.propertyName the collection property name
|
|
538
|
+
* options.collection the editing collection where deleting item is located. It is can be columns in the matrices or choices in dropdown question and so on.
|
|
539
|
+
* options.item the collection item that we are going to delete
|
|
540
|
+
* options.allowDelete a boolean value. It is true by default. Set it false to abondome the element removing from the collection
|
|
540
541
|
*/
|
|
541
542
|
onCollectionItemDeleting: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
542
543
|
/*
|
|
543
544
|
* 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.
|
|
544
545
|
* You can make detail/edit and remove buttons invsible and/or disable editing.
|
|
545
|
-
*
|
|
546
|
-
*
|
|
547
|
-
*
|
|
548
|
-
*
|
|
549
|
-
*
|
|
550
|
-
*
|
|
551
|
-
*
|
|
552
|
-
*
|
|
546
|
+
* sender the survey creator object that fires the event
|
|
547
|
+
* options.obj the survey object: Question, Panel, Page or Survey
|
|
548
|
+
* options.property the collection property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties
|
|
549
|
+
* options.propertyName the collection property name
|
|
550
|
+
* options.collection the editing collection where deleting item is located. It is can be columns in the matrices or choices in dropdown question and so on.
|
|
551
|
+
* options.item the collection item that we are going to delete
|
|
552
|
+
* options.allowDelete a boolean value. It is true by default. Set it false to abondome the element removing from the collection
|
|
553
|
+
* options.allowEdit a boolean value. It is true by default. Set it false to disable editing.
|
|
553
554
|
*/
|
|
554
555
|
onCollectionItemAllowOperations: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
555
556
|
/*
|
|
556
557
|
* 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.
|
|
557
558
|
* Use this event, to set ItemValue.value and ItemValue.text properties by default or set a value to the custom property.
|
|
558
|
-
*
|
|
559
|
-
*
|
|
560
|
-
*
|
|
561
|
-
*
|
|
562
|
-
*
|
|
559
|
+
* sender the survey creator object that fires the event
|
|
560
|
+
* options.obj the object that contains the itemsValues array, for example selector, rating and single choice matrix questions.
|
|
561
|
+
* options.propertyName the object property Name. It can be "choices" for selector questions or rateValues for rating question or columns/rows for single choice matrix.
|
|
562
|
+
* options.newItem a new created Survey.ItemValue object.
|
|
563
|
+
* options.itemValues an editing Survey.ItemValue array. newItem object is not added yet into this array.
|
|
563
564
|
*/
|
|
564
565
|
onItemValueAdded: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
565
566
|
/*
|
|
566
567
|
* 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.
|
|
567
|
-
*
|
|
568
|
-
*
|
|
569
|
-
*
|
|
570
|
-
*
|
|
568
|
+
* sender the survey creator object that fires the event
|
|
569
|
+
* options.matrix a matrix question where column is located, matrix.columns.
|
|
570
|
+
* options.newColumn a new created Survey.MatrixDropdownColumn object.
|
|
571
|
+
* 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.
|
|
571
572
|
*/
|
|
572
573
|
onMatrixColumnAdded: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
573
574
|
/*
|
|
574
575
|
* Use this event to control Property Editors UI.
|
|
575
|
-
*
|
|
576
|
-
*
|
|
577
|
-
*
|
|
578
|
-
*
|
|
579
|
-
*
|
|
580
|
-
*
|
|
581
|
-
*
|
|
582
|
-
*
|
|
576
|
+
* sender the survey creator object that fires the event
|
|
577
|
+
* options.obj the survey object which property is edited in the Property Editor.
|
|
578
|
+
* options.propertyName the name of the edited property.
|
|
579
|
+
* options.editorOptions options that can be changed.
|
|
580
|
+
* options.editorOptions.allowAddRemoveItems a boolean property, true by default. Set it false to disable add/remove items in array properties. For example 'choices', 'columns', 'rows'.
|
|
581
|
+
* options.editorOptions.allowRemoveAllItems a boolean property, true by default. Set it false to disable remove all items in array properties. For example 'choices', 'columns', 'rows'.
|
|
582
|
+
* options.editorOptions.showTextView a boolean property, true by default. Set it false to disable "Manual Entry" tab for "choices" property.
|
|
583
|
+
* options.editorOptions.itemsEntryType a string property, 'form' by default. Set it 'fast' to show "Manual Entry" tab for "choices" property by default.
|
|
583
584
|
*/
|
|
584
585
|
onSetPropertyEditorOptions: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
585
586
|
/*
|
|
586
587
|
* The event is called on generation a new name for a new created element.
|
|
587
|
-
*
|
|
588
|
-
*
|
|
589
|
-
*
|
|
590
|
-
*
|
|
588
|
+
* sender the survey creator object that fires the event
|
|
589
|
+
* options.element a new created survey element. It can be question, panel or page
|
|
590
|
+
* 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.
|
|
591
|
+
* options.isUnique a boolean property, set this property to false, if you want to ask Creator to generate another name
|
|
591
592
|
*/
|
|
592
593
|
onGenerateNewName: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
593
594
|
/*
|
|
594
595
|
* 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.
|
|
595
|
-
*
|
|
596
|
-
*
|
|
597
|
-
*
|
|
598
|
-
*
|
|
599
|
-
*
|
|
596
|
+
* sender the survey creator object that fires the event
|
|
597
|
+
* options.obj the survey object which property is edited in the Property Editor.
|
|
598
|
+
* options.propertyName the name of the edited property.
|
|
599
|
+
* options.value the property value.
|
|
600
|
+
* options.error the error you want to display. Set the empty string (the default value) or null if there is no errors.
|
|
600
601
|
*/
|
|
601
602
|
onPropertyValidationCustomError: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
602
603
|
/*
|
|
@@ -624,98 +625,98 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
624
625
|
onSurveyPropertyValueChanged: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
625
626
|
/*
|
|
626
627
|
* Use this event to modify the list (name and titles) of the questions available in a condition editor.
|
|
627
|
-
*
|
|
628
|
-
*
|
|
629
|
-
*
|
|
630
|
-
*
|
|
631
|
-
*
|
|
628
|
+
* sender the survey creator object that fires the event
|
|
629
|
+
* options.obj the survey object which property is edited in the Property Editor.
|
|
630
|
+
* options.propertyName the name of the edited property.
|
|
631
|
+
* options.editor the instance of Property Editor.
|
|
632
|
+
* options.list the list of the questions available for condition
|
|
632
633
|
*/
|
|
633
634
|
onConditionQuestionsGetList: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
634
635
|
/*
|
|
635
636
|
* 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
|
|
636
|
-
*
|
|
637
|
-
*
|
|
638
|
-
*
|
|
637
|
+
* sender the survey creator object that fires the event.
|
|
638
|
+
* options.expression the current expression. If the expression is empty or incorrect then the value is empty.
|
|
639
|
+
* options.title the default value of the title. You can change the default value.
|
|
639
640
|
*/
|
|
640
641
|
onConditionGetTitle: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
641
642
|
/*
|
|
642
643
|
* 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.
|
|
643
|
-
*
|
|
644
|
-
*
|
|
645
|
-
*
|
|
646
|
-
*
|
|
647
|
-
*
|
|
648
|
-
*
|
|
649
|
-
*
|
|
650
|
-
*
|
|
651
|
-
*
|
|
652
|
-
*
|
|
653
|
-
*
|
|
654
|
-
*
|
|
655
|
-
*
|
|
656
|
-
*
|
|
657
|
-
*
|
|
658
|
-
*
|
|
659
|
-
*
|
|
660
|
-
*
|
|
661
|
-
*
|
|
662
|
-
*
|
|
663
|
-
*
|
|
664
|
-
*
|
|
665
|
-
*
|
|
666
|
-
*
|
|
667
|
-
*
|
|
668
|
-
*
|
|
669
|
-
*
|
|
670
|
-
*
|
|
671
|
-
*
|
|
672
|
-
*
|
|
673
|
-
*
|
|
674
|
-
*
|
|
675
|
-
*
|
|
676
|
-
*
|
|
677
|
-
*
|
|
678
|
-
*
|
|
679
|
-
*
|
|
680
|
-
*
|
|
681
|
-
*
|
|
682
|
-
*
|
|
683
|
-
*
|
|
684
|
-
*
|
|
685
|
-
*
|
|
686
|
-
*
|
|
644
|
+
* sender the survey creator object that fires the event
|
|
645
|
+
* options object contains the information about certain modifications
|
|
646
|
+
* options.type contains string constant describing certain modification
|
|
647
|
+
* Available values:
|
|
648
|
+
*
|
|
649
|
+
* options.type: "ADDED_FROM_TOOLBOX"
|
|
650
|
+
* options.question: newly added question
|
|
651
|
+
*
|
|
652
|
+
* options.type: "PAGE_ADDED"
|
|
653
|
+
* options.newValue: newly created page
|
|
654
|
+
*
|
|
655
|
+
* options.type: "PAGE_MOVED"
|
|
656
|
+
* options.page: page has been moved
|
|
657
|
+
* options.indexFrom: pevious index
|
|
658
|
+
* options.indexTo: new index
|
|
659
|
+
*
|
|
660
|
+
* options.type: "QUESTION_CONVERTED"
|
|
661
|
+
* options.className: the converted class name
|
|
662
|
+
* options.oldValue: pevious object
|
|
663
|
+
* options.newValue: the new object, converted from oldVale to the given class name
|
|
664
|
+
*
|
|
665
|
+
* options.type: "QUESTION_CHANGED_BY_EDITOR"
|
|
666
|
+
* options.question: question has been edited in the popup question editor
|
|
667
|
+
*
|
|
668
|
+
* options.type: "PROPERTY_CHANGED"
|
|
669
|
+
* options.name: the name of the property has been changed
|
|
670
|
+
* options.target: the object containing the changed property
|
|
671
|
+
* options.oldValue: the previous value of the changed property
|
|
672
|
+
* options.newValue: the new value of the changed property
|
|
673
|
+
*
|
|
674
|
+
* options.type: "OBJECT_DELETED"
|
|
675
|
+
* options.target: deleted object
|
|
676
|
+
*
|
|
677
|
+
* options.type: "VIEW_TYPE_CHANGED"
|
|
678
|
+
* options.newType: new type of the creator view: editor or designer
|
|
679
|
+
*
|
|
680
|
+
* options.type: "DO_DROP"
|
|
681
|
+
* options.page: the page of the drap/drop operation
|
|
682
|
+
* options.source: the source dragged object
|
|
683
|
+
* options.target: the drop target
|
|
684
|
+
* options.newElement: a new element. It is defined if a user drops question or panel from the toolbox
|
|
685
|
+
*
|
|
686
|
+
* options.type: "TRANSLATIONS_CHANGED"
|
|
687
|
+
* options.type: "JSON_EDITOR"
|
|
687
688
|
*/
|
|
688
689
|
onModified: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
689
690
|
/*
|
|
690
691
|
* 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.
|
|
691
|
-
*
|
|
692
|
-
*
|
|
693
|
-
*
|
|
692
|
+
* sender the survey creator object that fires the event
|
|
693
|
+
* options.question a new added survey question. Survey.Question object
|
|
694
|
+
* options.page the survey Page object where question has been added.
|
|
694
695
|
*/
|
|
695
696
|
onQuestionAdded: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
696
697
|
/*
|
|
697
698
|
* 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.
|
|
698
|
-
*
|
|
699
|
-
*
|
|
700
|
-
*
|
|
699
|
+
* sender the survey creator object that fires the event
|
|
700
|
+
* options.panel a new added survey panel. Survey.Panel object
|
|
701
|
+
* options.page the survey Page object where question has been added.
|
|
701
702
|
*/
|
|
702
703
|
onPanelAdded: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
703
704
|
/*
|
|
704
705
|
* The event is called on adding a new page into the survey.
|
|
705
|
-
*
|
|
706
|
-
*
|
|
706
|
+
* sender the survey creator object that fires the event
|
|
707
|
+
* options.page the new survey Page object.
|
|
707
708
|
*/
|
|
708
709
|
onPageAdded: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
709
710
|
/*
|
|
710
711
|
* The event is fired when the survey creator is initialized and a survey object (Survey.Survey) is created.
|
|
711
|
-
*
|
|
712
|
-
*
|
|
712
|
+
* sender the survey creator object that fires the event
|
|
713
|
+
* options.survey the survey object showing in the creator.
|
|
713
714
|
*/
|
|
714
715
|
onDesignerSurveyCreated: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
715
716
|
/*
|
|
716
717
|
* The event is fired when the survey creator creates survey in Preview tab for testing.
|
|
717
|
-
*
|
|
718
|
-
*
|
|
718
|
+
* sender the survey creator object that fires the event
|
|
719
|
+
* options.survey the survey object showing in the "Preview" tab.
|
|
719
720
|
*/
|
|
720
721
|
onPreviewSurveyCreated: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
721
722
|
/*
|
|
@@ -725,34 +726,34 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
725
726
|
/*
|
|
726
727
|
* The event is called in case of UI notifications. By default all notifications are done via built-in alert () function.
|
|
727
728
|
* In case of any subscriptions to this event all notifications will be redirected into the event handler.
|
|
728
|
-
*
|
|
729
|
+
* options.message is a message to show.
|
|
729
730
|
*/
|
|
730
731
|
onNotify: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
731
732
|
/*
|
|
732
733
|
* 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
|
|
733
|
-
*
|
|
734
|
+
* options.newSelectedElement the element that is going to be selected in the survey desiger: question, panel, page or survey.
|
|
734
735
|
*/
|
|
735
736
|
onSelectedElementChanging: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
736
737
|
/*
|
|
737
738
|
* The event is called after the selected element is changed.
|
|
738
|
-
*
|
|
739
|
+
* options.newSelectedElement the new selected element in the survey desiger: question, panel, page or survey.
|
|
739
740
|
*/
|
|
740
741
|
onSelectedElementChanged: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
741
742
|
/*
|
|
742
743
|
* The event is fired then one need to choose files.
|
|
743
|
-
*
|
|
744
|
-
*
|
|
745
|
-
*
|
|
744
|
+
* sender the survey creator object that fires the event
|
|
745
|
+
* input file input HTML element
|
|
746
|
+
* callback need to be called after files has been chosen
|
|
746
747
|
*/
|
|
747
748
|
onOpenFileChooser: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
748
749
|
/*
|
|
749
750
|
* The event is fired on uploading the files.
|
|
750
|
-
*
|
|
751
|
-
*
|
|
752
|
-
*
|
|
753
|
-
*
|
|
754
|
-
*
|
|
755
|
-
*
|
|
751
|
+
* sender the survey creator object that fires the event
|
|
752
|
+
* There are two properties in options:
|
|
753
|
+
* files the Javascript File objects array
|
|
754
|
+
* callback called on upload complete,
|
|
755
|
+
* which takes two string arguments:
|
|
756
|
+
* a status and an image link
|
|
756
757
|
*/
|
|
757
758
|
onUploadFile: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
758
759
|
/*
|
|
@@ -778,30 +779,30 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
778
779
|
onTranslationLocaleInitiallySelected: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
779
780
|
/*
|
|
780
781
|
* Use this event to control drag&drop operations.
|
|
781
|
-
*
|
|
782
|
-
*
|
|
783
|
-
*
|
|
784
|
-
*
|
|
785
|
-
*
|
|
786
|
-
*
|
|
787
|
-
*
|
|
788
|
-
*
|
|
782
|
+
* sender the survey creator object that fires the event.
|
|
783
|
+
* options.survey the editing survey object.
|
|
784
|
+
* options.allow set it to false to disable dragging.
|
|
785
|
+
* options.target a target element that is dragging.
|
|
786
|
+
* options.source a source element. It can be null, if it is a new element, dragging from toolbox.
|
|
787
|
+
* options.parent a page or panel where target element is dragging.
|
|
788
|
+
* 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.
|
|
789
|
+
* 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.
|
|
789
790
|
*/
|
|
790
791
|
onDragDropAllow: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
791
792
|
/*
|
|
792
793
|
* Use this event to override/disable element adorners - wrapping component name.
|
|
793
|
-
*
|
|
794
|
-
*
|
|
795
|
-
*
|
|
796
|
-
*
|
|
794
|
+
* sender the survey creator object that fires the event.
|
|
795
|
+
* options.element a survey object to be wrapped.
|
|
796
|
+
* options.reason why we need to wrap an element.
|
|
797
|
+
* options.conponentName component wrapper name.
|
|
797
798
|
*/
|
|
798
799
|
onGetElementWrapperComponentName: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
799
800
|
/*
|
|
800
801
|
* Use this event to override/disable element adorners - wrapping component data.
|
|
801
|
-
*
|
|
802
|
-
*
|
|
803
|
-
*
|
|
804
|
-
*
|
|
802
|
+
* sender the survey creator object that fires the event.
|
|
803
|
+
* options.element a survey object to be wrapped.
|
|
804
|
+
* options.reason why we need to wrap an element.
|
|
805
|
+
* options.conponentData component wrapper data.
|
|
805
806
|
*/
|
|
806
807
|
onGetElementWrapperComponentData: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
807
808
|
/*
|
|
@@ -931,14 +932,14 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
931
932
|
set isRTL(val: boolean);
|
|
932
933
|
/*
|
|
933
934
|
* The event is called when creator is going to change the active tab.
|
|
934
|
-
*
|
|
935
|
-
*
|
|
935
|
+
* sender the survey creator object that fires the event
|
|
936
|
+
* options.tabName the name of new active tab
|
|
936
937
|
*/
|
|
937
938
|
onActiveTabChanging: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
938
939
|
/*
|
|
939
940
|
* The event is called when creator active tab is changed.
|
|
940
|
-
*
|
|
941
|
-
*
|
|
941
|
+
* sender the survey creator object that fires the event
|
|
942
|
+
* options.tabName the name of new active tab
|
|
942
943
|
*/
|
|
943
944
|
onActiveTabChanged: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
944
945
|
/*
|
|
@@ -974,22 +975,22 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
974
975
|
leftContainerActiveItem(name: string): void;
|
|
975
976
|
/*
|
|
976
977
|
* The event is called before undo happens.
|
|
977
|
-
*
|
|
978
|
+
* options.canUndo a boolean value. It is true by default. Set it false to hide prevent undo operation.
|
|
978
979
|
*/
|
|
979
980
|
onBeforeUndo: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
980
981
|
/*
|
|
981
982
|
* The event is called before redo happens.
|
|
982
|
-
*
|
|
983
|
+
* options.canRedo a boolean value. It is true by default. Set it false to hide prevent redo operation.
|
|
983
984
|
*/
|
|
984
985
|
onBeforeRedo: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
985
986
|
/*
|
|
986
987
|
* The event is called after undo happens.
|
|
987
|
-
*
|
|
988
|
+
* options.state is an undo/redo item.
|
|
988
989
|
*/
|
|
989
990
|
onAfterUndo: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
990
991
|
/*
|
|
991
992
|
* The event is called after redo happens.
|
|
992
|
-
*
|
|
993
|
+
* options.state is an undo/redo item.
|
|
993
994
|
*/
|
|
994
995
|
onAfterRedo: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
995
996
|
get undoRedoManager(): UndoRedoManager;
|
|
@@ -1893,27 +1894,27 @@ export declare class SurveyLogic extends Base implements ISurveyLogicItemOwner {
|
|
|
1893
1894
|
onChangedCallback: (item: SurveyLogicItem, changeType: string) => void;
|
|
1894
1895
|
/*
|
|
1895
1896
|
* The event is called when logic item is saved.
|
|
1896
|
-
*
|
|
1897
|
+
* options.item is the saved logic item.
|
|
1897
1898
|
*/
|
|
1898
1899
|
onLogicItemSaved: Event<(sender: SurveyLogic, options: any) => any, any>;
|
|
1899
1900
|
/*
|
|
1900
1901
|
* 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.
|
|
1901
1902
|
* You can use options.item.actions to access actions and optionally set errorText to a particular action.
|
|
1902
|
-
*
|
|
1903
|
-
*
|
|
1904
|
-
*
|
|
1905
|
-
*
|
|
1903
|
+
* options.item is the editing logic item. options.item.actions contains the old actions.
|
|
1904
|
+
* options.actions is the array of logic actions that user edit and create.
|
|
1905
|
+
* usedNamesInExpression - the string list of all variables (questions, calculatedValues, and so on) that are used in expression
|
|
1906
|
+
* error - the error string. It is empty by default. You have to set it to non-empty string to show the error on saving.
|
|
1906
1907
|
*/
|
|
1907
1908
|
onLogicItemValidation: Event<(sender: SurveyLogic, options: any) => any, any>;
|
|
1908
1909
|
/*
|
|
1909
1910
|
* The event is called before logic item is being removed.
|
|
1910
|
-
*
|
|
1911
|
-
*
|
|
1911
|
+
* options.allowRemove is the option you can set to false and prevent removing.
|
|
1912
|
+
* options.item is the logic item to remove.
|
|
1912
1913
|
*/
|
|
1913
1914
|
onLogicItemRemoving: Event<(sender: SurveyLogic, options: any) => any, any>;
|
|
1914
1915
|
/*
|
|
1915
1916
|
* The event is called when logic item is removed.
|
|
1916
|
-
*
|
|
1917
|
+
* options.item is the removed logic item.
|
|
1917
1918
|
*/
|
|
1918
1919
|
onLogicItemRemoved: Event<(sender: SurveyLogic, options: any) => any, any>;
|
|
1919
1920
|
koAfterRender: any;
|
|
@@ -2328,22 +2329,22 @@ export declare class UndoRedoController extends Base {
|
|
|
2328
2329
|
createActions(): any;
|
|
2329
2330
|
/*
|
|
2330
2331
|
* The event is called before undo happens.
|
|
2331
|
-
*
|
|
2332
|
+
* options.canUndo a boolean value. It is true by default. Set it false to hide prevent undo operation.
|
|
2332
2333
|
*/
|
|
2333
2334
|
onBeforeUndo: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
2334
2335
|
/*
|
|
2335
2336
|
* The event is called before redo happens.
|
|
2336
|
-
*
|
|
2337
|
+
* options.canRedo a boolean value. It is true by default. Set it false to hide prevent redo operation.
|
|
2337
2338
|
*/
|
|
2338
2339
|
onBeforeRedo: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
2339
2340
|
/*
|
|
2340
2341
|
* The event is called after undo happens.
|
|
2341
|
-
*
|
|
2342
|
+
* options.state is an undo/redo item.
|
|
2342
2343
|
*/
|
|
2343
2344
|
onAfterUndo: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
2344
2345
|
/*
|
|
2345
2346
|
* The event is called after redo happens.
|
|
2346
|
-
*
|
|
2347
|
+
* options.state is an undo/redo item.
|
|
2347
2348
|
*/
|
|
2348
2349
|
onAfterRedo: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
2349
2350
|
}
|