survey-creator-core 1.9.32 → 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/README.md +2 -2
- package/package.json +1 -1
- package/survey-creator-core.css +70 -38
- package/survey-creator-core.d.ts +216 -196
- package/survey-creator-core.i18n.js +22 -25
- package/survey-creator-core.i18n.min.js +2 -2
- package/survey-creator-core.js +355 -247
- package/survey-creator-core.min.css +14 -14
- package/survey-creator-core.min.js +3 -3
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
|
*/
|
|
@@ -92,6 +92,7 @@ export interface ICreatorOptions {
|
|
|
92
92
|
showDefaultLanguageInPreviewTab?: string | boolean;
|
|
93
93
|
showInvisibleElementsInPreviewTab?: boolean;
|
|
94
94
|
showObjectTitles?: boolean;
|
|
95
|
+
showHeaderInEmptySurvey?: boolean;
|
|
95
96
|
allowModifyPages?: boolean;
|
|
96
97
|
maximumColumnsCount?: number;
|
|
97
98
|
maximumChoicesCount?: number;
|
|
@@ -404,43 +405,44 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
404
405
|
getPlugin<P extends ICreatorPlugin = ICreatorPlugin>(name: string): any;
|
|
405
406
|
/*
|
|
406
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.
|
|
407
|
-
*
|
|
408
|
-
*
|
|
409
|
-
*
|
|
410
|
-
*
|
|
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
|
|
411
412
|
*/
|
|
412
413
|
onElementDeleting: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
413
414
|
/*
|
|
414
415
|
* The event is called on setting a readOnly property of the property editor. By default the property.readOnly property is used.
|
|
415
416
|
* You may changed it and make the property editor read only or enabled for a particular object.
|
|
416
|
-
*
|
|
417
|
-
*
|
|
418
|
-
*
|
|
419
|
-
*
|
|
420
|
-
*
|
|
421
|
-
*
|
|
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.
|
|
422
423
|
*/
|
|
423
424
|
onGetPropertyReadOnly: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
424
425
|
/*
|
|
425
426
|
* The event is fired when the survey creator creates a survey object (Survey.Survey).
|
|
426
|
-
*
|
|
427
|
-
*
|
|
428
|
-
*
|
|
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.
|
|
429
430
|
*/
|
|
430
431
|
onSurveyInstanceCreated: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
431
432
|
/*
|
|
432
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.
|
|
433
434
|
* Use this event, if you want custom display name for objects.
|
|
434
|
-
*
|
|
435
|
-
*
|
|
436
|
-
*
|
|
437
|
-
*
|
|
438
|
-
*
|
|
439
|
-
*
|
|
440
|
-
*
|
|
441
|
-
*
|
|
442
|
-
*
|
|
443
|
-
*
|
|
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.
|
|
444
446
|
*/
|
|
445
447
|
onGetObjectDisplayName: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
446
448
|
/*
|
|
@@ -475,127 +477,127 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
475
477
|
onElementAllowOperations: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
476
478
|
/*
|
|
477
479
|
* Use this event to add/remove/modify the element (question/panel) menu items.
|
|
478
|
-
*
|
|
479
|
-
*
|
|
480
|
-
*
|
|
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.
|
|
481
483
|
*/
|
|
482
484
|
onDefineElementMenuItems: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
483
485
|
/*
|
|
484
486
|
* The event is called before showing a property in the Properties Grid or in the Question Editor.
|
|
485
|
-
*
|
|
486
|
-
*
|
|
487
|
-
*
|
|
488
|
-
*
|
|
489
|
-
*
|
|
490
|
-
*
|
|
491
|
-
*
|
|
492
|
-
*
|
|
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)
|
|
493
495
|
*/
|
|
494
496
|
onShowingProperty: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
495
497
|
onCanShowProperty: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
496
498
|
/*
|
|
497
499
|
* The event is called after a survey that represents the Property Grid is created and all its questions (property editors) are setup.
|
|
498
500
|
* You can use this event to modify this survey to change the property grid behavior
|
|
499
|
-
*
|
|
500
|
-
*
|
|
501
|
+
* options.obj the survey object that is currently editing in the property grid
|
|
502
|
+
* options.survey the property grid survey
|
|
501
503
|
*/
|
|
502
504
|
onPropertyGridSurveyCreated: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
503
505
|
/*
|
|
504
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.
|
|
505
507
|
* You can use this event to modify the property editor properties or set event handlers to customize it's behavior
|
|
506
|
-
*
|
|
507
|
-
*
|
|
508
|
-
*
|
|
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.
|
|
509
511
|
*/
|
|
510
512
|
onPropertyEditorCreated: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
511
513
|
/*
|
|
512
514
|
* The event is called after a property editor setups its title actions.
|
|
513
515
|
* You can use this event to modify the property editor title actions
|
|
514
|
-
*
|
|
515
|
-
*
|
|
516
|
-
*
|
|
517
|
-
*
|
|
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.
|
|
518
520
|
*/
|
|
519
521
|
onPropertyEditorUpdateTitleActions: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
520
522
|
/*
|
|
521
523
|
* The event is called before rendering a delete button in the Property Grid or in Question Editor.
|
|
522
524
|
* Obsolete, please use onCollectionItemAllowOperations
|
|
523
|
-
*
|
|
524
|
-
*
|
|
525
|
-
*
|
|
526
|
-
*
|
|
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
|
|
527
529
|
*/
|
|
528
530
|
onCanDeleteItem: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
529
531
|
/*
|
|
530
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.
|
|
531
533
|
* Obsolete, please use onCollectionItemAllowOperations
|
|
532
|
-
*
|
|
533
|
-
*
|
|
534
|
-
*
|
|
535
|
-
*
|
|
536
|
-
*
|
|
537
|
-
*
|
|
538
|
-
*
|
|
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
|
|
539
541
|
*/
|
|
540
542
|
onCollectionItemDeleting: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
541
543
|
/*
|
|
542
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.
|
|
543
545
|
* You can make detail/edit and remove buttons invsible and/or disable editing.
|
|
544
|
-
*
|
|
545
|
-
*
|
|
546
|
-
*
|
|
547
|
-
*
|
|
548
|
-
*
|
|
549
|
-
*
|
|
550
|
-
*
|
|
551
|
-
*
|
|
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.
|
|
552
554
|
*/
|
|
553
555
|
onCollectionItemAllowOperations: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
554
556
|
/*
|
|
555
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.
|
|
556
558
|
* Use this event, to set ItemValue.value and ItemValue.text properties by default or set a value to the custom property.
|
|
557
|
-
*
|
|
558
|
-
*
|
|
559
|
-
*
|
|
560
|
-
*
|
|
561
|
-
*
|
|
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.
|
|
562
564
|
*/
|
|
563
565
|
onItemValueAdded: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
564
566
|
/*
|
|
565
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.
|
|
566
|
-
*
|
|
567
|
-
*
|
|
568
|
-
*
|
|
569
|
-
*
|
|
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.
|
|
570
572
|
*/
|
|
571
573
|
onMatrixColumnAdded: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
572
574
|
/*
|
|
573
575
|
* Use this event to control Property Editors UI.
|
|
574
|
-
*
|
|
575
|
-
*
|
|
576
|
-
*
|
|
577
|
-
*
|
|
578
|
-
*
|
|
579
|
-
*
|
|
580
|
-
*
|
|
581
|
-
*
|
|
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.
|
|
582
584
|
*/
|
|
583
585
|
onSetPropertyEditorOptions: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
584
586
|
/*
|
|
585
587
|
* The event is called on generation a new name for a new created element.
|
|
586
|
-
*
|
|
587
|
-
*
|
|
588
|
-
*
|
|
589
|
-
*
|
|
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
|
|
590
592
|
*/
|
|
591
593
|
onGenerateNewName: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
592
594
|
/*
|
|
593
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.
|
|
594
|
-
*
|
|
595
|
-
*
|
|
596
|
-
*
|
|
597
|
-
*
|
|
598
|
-
*
|
|
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.
|
|
599
601
|
*/
|
|
600
602
|
onPropertyValidationCustomError: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
601
603
|
/*
|
|
@@ -623,98 +625,98 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
623
625
|
onSurveyPropertyValueChanged: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
624
626
|
/*
|
|
625
627
|
* Use this event to modify the list (name and titles) of the questions available in a condition editor.
|
|
626
|
-
*
|
|
627
|
-
*
|
|
628
|
-
*
|
|
629
|
-
*
|
|
630
|
-
*
|
|
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
|
|
631
633
|
*/
|
|
632
634
|
onConditionQuestionsGetList: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
633
635
|
/*
|
|
634
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
|
|
635
|
-
*
|
|
636
|
-
*
|
|
637
|
-
*
|
|
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.
|
|
638
640
|
*/
|
|
639
641
|
onConditionGetTitle: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
640
642
|
/*
|
|
641
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.
|
|
642
|
-
*
|
|
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
|
-
*
|
|
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"
|
|
686
688
|
*/
|
|
687
689
|
onModified: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
688
690
|
/*
|
|
689
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.
|
|
690
|
-
*
|
|
691
|
-
*
|
|
692
|
-
*
|
|
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.
|
|
693
695
|
*/
|
|
694
696
|
onQuestionAdded: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
695
697
|
/*
|
|
696
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.
|
|
697
|
-
*
|
|
698
|
-
*
|
|
699
|
-
*
|
|
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.
|
|
700
702
|
*/
|
|
701
703
|
onPanelAdded: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
702
704
|
/*
|
|
703
705
|
* The event is called on adding a new page into the survey.
|
|
704
|
-
*
|
|
705
|
-
*
|
|
706
|
+
* sender the survey creator object that fires the event
|
|
707
|
+
* options.page the new survey Page object.
|
|
706
708
|
*/
|
|
707
709
|
onPageAdded: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
708
710
|
/*
|
|
709
711
|
* The event is fired when the survey creator is initialized and a survey object (Survey.Survey) is created.
|
|
710
|
-
*
|
|
711
|
-
*
|
|
712
|
+
* sender the survey creator object that fires the event
|
|
713
|
+
* options.survey the survey object showing in the creator.
|
|
712
714
|
*/
|
|
713
715
|
onDesignerSurveyCreated: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
714
716
|
/*
|
|
715
717
|
* The event is fired when the survey creator creates survey in Preview tab for testing.
|
|
716
|
-
*
|
|
717
|
-
*
|
|
718
|
+
* sender the survey creator object that fires the event
|
|
719
|
+
* options.survey the survey object showing in the "Preview" tab.
|
|
718
720
|
*/
|
|
719
721
|
onPreviewSurveyCreated: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
720
722
|
/*
|
|
@@ -724,34 +726,34 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
724
726
|
/*
|
|
725
727
|
* The event is called in case of UI notifications. By default all notifications are done via built-in alert () function.
|
|
726
728
|
* In case of any subscriptions to this event all notifications will be redirected into the event handler.
|
|
727
|
-
*
|
|
729
|
+
* options.message is a message to show.
|
|
728
730
|
*/
|
|
729
731
|
onNotify: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
730
732
|
/*
|
|
731
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
|
|
732
|
-
*
|
|
734
|
+
* options.newSelectedElement the element that is going to be selected in the survey desiger: question, panel, page or survey.
|
|
733
735
|
*/
|
|
734
736
|
onSelectedElementChanging: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
735
737
|
/*
|
|
736
738
|
* The event is called after the selected element is changed.
|
|
737
|
-
*
|
|
739
|
+
* options.newSelectedElement the new selected element in the survey desiger: question, panel, page or survey.
|
|
738
740
|
*/
|
|
739
741
|
onSelectedElementChanged: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
740
742
|
/*
|
|
741
743
|
* The event is fired then one need to choose files.
|
|
742
|
-
*
|
|
743
|
-
*
|
|
744
|
-
*
|
|
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
|
|
745
747
|
*/
|
|
746
748
|
onOpenFileChooser: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
747
749
|
/*
|
|
748
750
|
* The event is fired on uploading the files.
|
|
749
|
-
*
|
|
750
|
-
*
|
|
751
|
-
*
|
|
752
|
-
*
|
|
753
|
-
*
|
|
754
|
-
*
|
|
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
|
|
755
757
|
*/
|
|
756
758
|
onUploadFile: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
757
759
|
/*
|
|
@@ -777,17 +779,33 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
777
779
|
onTranslationLocaleInitiallySelected: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
778
780
|
/*
|
|
779
781
|
* Use this event to control drag&drop operations.
|
|
780
|
-
*
|
|
781
|
-
*
|
|
782
|
-
*
|
|
783
|
-
*
|
|
784
|
-
*
|
|
785
|
-
*
|
|
786
|
-
*
|
|
787
|
-
*
|
|
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.
|
|
788
790
|
*/
|
|
789
791
|
onDragDropAllow: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
790
792
|
/*
|
|
793
|
+
* Use this event to override/disable element adorners - wrapping component name.
|
|
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.
|
|
798
|
+
*/
|
|
799
|
+
onGetElementWrapperComponentName: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
800
|
+
/*
|
|
801
|
+
* Use this event to override/disable element adorners - wrapping component data.
|
|
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.
|
|
806
|
+
*/
|
|
807
|
+
onGetElementWrapperComponentData: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
808
|
+
/*
|
|
791
809
|
* This callback is used internally for providing survey JSON text.
|
|
792
810
|
*/
|
|
793
811
|
getSurveyJSONTextCallback: any;
|
|
@@ -914,14 +932,14 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
914
932
|
set isRTL(val: boolean);
|
|
915
933
|
/*
|
|
916
934
|
* The event is called when creator is going to change the active tab.
|
|
917
|
-
*
|
|
918
|
-
*
|
|
935
|
+
* sender the survey creator object that fires the event
|
|
936
|
+
* options.tabName the name of new active tab
|
|
919
937
|
*/
|
|
920
938
|
onActiveTabChanging: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
921
939
|
/*
|
|
922
940
|
* The event is called when creator active tab is changed.
|
|
923
|
-
*
|
|
924
|
-
*
|
|
941
|
+
* sender the survey creator object that fires the event
|
|
942
|
+
* options.tabName the name of new active tab
|
|
925
943
|
*/
|
|
926
944
|
onActiveTabChanged: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
927
945
|
/*
|
|
@@ -957,22 +975,22 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
957
975
|
leftContainerActiveItem(name: string): void;
|
|
958
976
|
/*
|
|
959
977
|
* The event is called before undo happens.
|
|
960
|
-
*
|
|
978
|
+
* options.canUndo a boolean value. It is true by default. Set it false to hide prevent undo operation.
|
|
961
979
|
*/
|
|
962
980
|
onBeforeUndo: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
963
981
|
/*
|
|
964
982
|
* The event is called before redo happens.
|
|
965
|
-
*
|
|
983
|
+
* options.canRedo a boolean value. It is true by default. Set it false to hide prevent redo operation.
|
|
966
984
|
*/
|
|
967
985
|
onBeforeRedo: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
968
986
|
/*
|
|
969
987
|
* The event is called after undo happens.
|
|
970
|
-
*
|
|
988
|
+
* options.state is an undo/redo item.
|
|
971
989
|
*/
|
|
972
990
|
onAfterUndo: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
973
991
|
/*
|
|
974
992
|
* The event is called after redo happens.
|
|
975
|
-
*
|
|
993
|
+
* options.state is an undo/redo item.
|
|
976
994
|
*/
|
|
977
995
|
onAfterRedo: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
978
996
|
get undoRedoManager(): UndoRedoManager;
|
|
@@ -1188,6 +1206,7 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
|
|
|
1188
1206
|
protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
|
|
1189
1207
|
initResponsivityManager(container: any): void;
|
|
1190
1208
|
resetResponsivityManager(): void;
|
|
1209
|
+
showHeaderInEmptySurvey: any;
|
|
1191
1210
|
showPageNavigator: any;
|
|
1192
1211
|
showTabs: any;
|
|
1193
1212
|
showToolbar: any;
|
|
@@ -1875,27 +1894,27 @@ export declare class SurveyLogic extends Base implements ISurveyLogicItemOwner {
|
|
|
1875
1894
|
onChangedCallback: (item: SurveyLogicItem, changeType: string) => void;
|
|
1876
1895
|
/*
|
|
1877
1896
|
* The event is called when logic item is saved.
|
|
1878
|
-
*
|
|
1897
|
+
* options.item is the saved logic item.
|
|
1879
1898
|
*/
|
|
1880
1899
|
onLogicItemSaved: Event<(sender: SurveyLogic, options: any) => any, any>;
|
|
1881
1900
|
/*
|
|
1882
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.
|
|
1883
1902
|
* You can use options.item.actions to access actions and optionally set errorText to a particular action.
|
|
1884
|
-
*
|
|
1885
|
-
*
|
|
1886
|
-
*
|
|
1887
|
-
*
|
|
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.
|
|
1888
1907
|
*/
|
|
1889
1908
|
onLogicItemValidation: Event<(sender: SurveyLogic, options: any) => any, any>;
|
|
1890
1909
|
/*
|
|
1891
1910
|
* The event is called before logic item is being removed.
|
|
1892
|
-
*
|
|
1893
|
-
*
|
|
1911
|
+
* options.allowRemove is the option you can set to false and prevent removing.
|
|
1912
|
+
* options.item is the logic item to remove.
|
|
1894
1913
|
*/
|
|
1895
1914
|
onLogicItemRemoving: Event<(sender: SurveyLogic, options: any) => any, any>;
|
|
1896
1915
|
/*
|
|
1897
1916
|
* The event is called when logic item is removed.
|
|
1898
|
-
*
|
|
1917
|
+
* options.item is the removed logic item.
|
|
1899
1918
|
*/
|
|
1900
1919
|
onLogicItemRemoved: Event<(sender: SurveyLogic, options: any) => any, any>;
|
|
1901
1920
|
koAfterRender: any;
|
|
@@ -2310,22 +2329,22 @@ export declare class UndoRedoController extends Base {
|
|
|
2310
2329
|
createActions(): any;
|
|
2311
2330
|
/*
|
|
2312
2331
|
* The event is called before undo happens.
|
|
2313
|
-
*
|
|
2332
|
+
* options.canUndo a boolean value. It is true by default. Set it false to hide prevent undo operation.
|
|
2314
2333
|
*/
|
|
2315
2334
|
onBeforeUndo: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
2316
2335
|
/*
|
|
2317
2336
|
* The event is called before redo happens.
|
|
2318
|
-
*
|
|
2337
|
+
* options.canRedo a boolean value. It is true by default. Set it false to hide prevent redo operation.
|
|
2319
2338
|
*/
|
|
2320
2339
|
onBeforeRedo: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
2321
2340
|
/*
|
|
2322
2341
|
* The event is called after undo happens.
|
|
2323
|
-
*
|
|
2342
|
+
* options.state is an undo/redo item.
|
|
2324
2343
|
*/
|
|
2325
2344
|
onAfterUndo: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
2326
2345
|
/*
|
|
2327
2346
|
* The event is called after redo happens.
|
|
2328
|
-
*
|
|
2347
|
+
* options.state is an undo/redo item.
|
|
2329
2348
|
*/
|
|
2330
2349
|
onAfterRedo: Event<(sender: CreatorBase, options: any) => any, any>;
|
|
2331
2350
|
}
|
|
@@ -2869,8 +2888,6 @@ export declare class PropertyGridEditorMatrix extends PropertyGridEditor {
|
|
|
2869
2888
|
onMatrixCellCreated(obj: Base, options: any): void;
|
|
2870
2889
|
onGetMatrixRowAction(obj: Base, options: any, setObjFunc: (obj: Base) => void): void;
|
|
2871
2890
|
onGetQuestionTitleActions(obj: Base, options: any): void;
|
|
2872
|
-
onValueChanged(obj: Base, prop: JsonObjectProperty, question: Question): void;
|
|
2873
|
-
protected updateTitleActions(question: Question): void;
|
|
2874
2891
|
protected createNewItem(matrix: QuestionMatrixDynamicModel, prop: JsonObjectProperty): Base;
|
|
2875
2892
|
protected getDefaultClassName(prop: JsonObjectProperty): string;
|
|
2876
2893
|
protected getBaseValue(prop: JsonObjectProperty): string;
|
|
@@ -3177,6 +3194,8 @@ export declare function getItemValueWrapperComponentName(item: ItemValue, questi
|
|
|
3177
3194
|
export declare function getItemValueWrapperComponentData(item: ItemValue, question: QuestionSelectBase, creator: CreatorBase): any;
|
|
3178
3195
|
export declare function isStringEditable(element: any, name: string): boolean;
|
|
3179
3196
|
export declare function isTextInput(target: any): boolean;
|
|
3197
|
+
export declare function registerAdorner(name: any, adorner: any): void;
|
|
3198
|
+
export declare function removeAdorners(names?: any): void;
|
|
3180
3199
|
export declare var settings: {
|
|
3181
3200
|
translation: {
|
|
3182
3201
|
sortByName: boolean,
|
|
@@ -3433,11 +3452,11 @@ export declare var propertyGridCss: {
|
|
|
3433
3452
|
mainRoot: string,
|
|
3434
3453
|
root: string,
|
|
3435
3454
|
item: string,
|
|
3436
|
-
control: string,
|
|
3437
3455
|
itemChecked: string,
|
|
3438
3456
|
itemIndeterminate: string,
|
|
3439
3457
|
itemDisabled: string,
|
|
3440
3458
|
svgIconId: string,
|
|
3459
|
+
controlCheckbox: string,
|
|
3441
3460
|
label: string,
|
|
3442
3461
|
disabledLabel: string,
|
|
3443
3462
|
itemDecorator: string,
|
|
@@ -4280,6 +4299,7 @@ export declare var logicCss: {
|
|
|
4280
4299
|
controlDisabled: string,
|
|
4281
4300
|
controlLabel: string,
|
|
4282
4301
|
materialDecorator: string,
|
|
4302
|
+
controlValue: string,
|
|
4283
4303
|
},
|
|
4284
4304
|
imagepicker: {
|
|
4285
4305
|
root: string,
|