survey-react 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/defaultV2.css +63 -39
- package/defaultV2.min.css +2 -2
- package/modern.css +7 -6
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/survey.css +1 -1
- package/survey.min.css +1 -1
- package/survey.react.d.ts +333 -319
- package/survey.react.js +496 -344
- package/survey.react.min.js +3 -3
package/survey.react.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* Type definition for Survey JavaScript library for React v1.9.
|
2
|
+
* Type definition for Survey JavaScript library for React v1.9.35
|
3
3
|
* Copyright (c) 2015-2022 Devsoft Baltic OÜ - https://surveyjs.io/
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
5
5
|
*/
|
@@ -988,6 +988,8 @@ export declare class Helpers {
|
|
988
988
|
static isCharDigit(ch: string): boolean;
|
989
989
|
static correctAfterPlusMinis(a: number, b: number, res: number): number;
|
990
990
|
static correctAfterMultiple(a: number, b: number, res: number): number;
|
991
|
+
static convertArrayValueToObject(src: any, propName: string, dest?: any): Array<any>;
|
992
|
+
static convertArrayObjectToValue(src: any, propName: string): Array<any>;
|
991
993
|
}
|
992
994
|
export declare class JsonError {
|
993
995
|
constructor(type: string, message: string);
|
@@ -1600,7 +1602,7 @@ export declare class CalculatedValue extends Base {
|
|
1600
1602
|
set includeIntoResult(val: boolean);
|
1601
1603
|
/*
|
1602
1604
|
* The Expression that used to calculate the value. You may use standard operators like +, -, * and /, squares (). Here is the example of accessing the question value {questionname}.
|
1603
|
-
*
|
1605
|
+
* Example: "({quantity} * {price}) * (100 - {discount}) / 100"
|
1604
1606
|
*/
|
1605
1607
|
get expression(): string;
|
1606
1608
|
set expression(val: string);
|
@@ -3571,39 +3573,39 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
|
|
3571
3573
|
navigationBarValue: any;
|
3572
3574
|
/*
|
3573
3575
|
* The event is fired after a trigger has been executed
|
3574
|
-
*
|
3575
|
-
*
|
3576
|
+
* `sender` - the survey object that fires the event.
|
3577
|
+
* `options.trigger` - An instance of a trigger that has been just perform it's action.
|
3576
3578
|
*/
|
3577
3579
|
onTriggerExecuted: EventBase<SurveyModel>;
|
3578
3580
|
/*
|
3579
3581
|
* The event is fired before the survey is completed and the `onComplete` event is fired. You can prevent the survey from completing by setting `options.allowComplete` to `false`
|
3580
|
-
*
|
3581
|
-
*
|
3582
|
-
*
|
3582
|
+
* `sender` - the survey object that fires the event.
|
3583
|
+
* `options.allowComplete` - Specifies whether a user can complete a survey. Set this property to `false` to prevent the survey from completing. The default value is `true`.
|
3584
|
+
* `options.isCompleteOnTrigger` - returns true if the survey is completing on "complete" trigger.
|
3583
3585
|
*/
|
3584
3586
|
onCompleting: EventBase<SurveyModel>;
|
3585
3587
|
/*
|
3586
3588
|
* The event is fired after a user clicks the 'Complete' button and finishes a survey. Use this event to send the survey data to your web server.
|
3587
|
-
*
|
3588
|
-
*
|
3589
|
-
*
|
3590
|
-
*
|
3591
|
-
*
|
3592
|
-
*
|
3589
|
+
* `sender` - the survey object that fires the event.
|
3590
|
+
* `options.showDataSaving(text)` - call this method to show that the survey is saving survey data on your server. The `text` is an optional parameter to show a custom message instead of default.
|
3591
|
+
* `options.showDataSavingError(text)` - call this method to show that an error occurred while saving the data on your server. If you want to show a custom error, use an optional `text` parameter.
|
3592
|
+
* `options.showDataSavingSuccess(text)` - call this method to show that the data was successfully saved on the server.
|
3593
|
+
* `options.showDataSavingClear` - call this method to hide the text about the saving progress.
|
3594
|
+
* `options.isCompleteOnTrigger` - returns true if the survey is completed on "complete" trigger.
|
3593
3595
|
*/
|
3594
3596
|
onComplete: EventBase<SurveyModel>;
|
3595
3597
|
/*
|
3596
3598
|
* The event is fired before the survey is going to preview mode, state equals to `preview`. It happens when a user click on "Preview" button. It shows when "showPreviewBeforeComplete" proeprty equals to "showAllQuestions" or "showAnsweredQuestions".
|
3597
3599
|
* You can prevent showing it by setting allowShowPreview to `false`.
|
3598
|
-
*
|
3599
|
-
*
|
3600
|
+
* `sender` - the survey object that fires the event.
|
3601
|
+
* `options.allowShowPreview` - Specifies whether a user can see a preview. Set this property to `false` to prevent from showing the preview. The default value is `true`.
|
3600
3602
|
*/
|
3601
3603
|
onShowingPreview: EventBase<SurveyModel>;
|
3602
3604
|
/*
|
3603
3605
|
* The event is fired after a user clicks the 'Complete' button. The event allows you to specify the URL opened after completing a survey.
|
3604
3606
|
* Specify the `navigateToUrl` property to make survey navigate to another url.
|
3605
|
-
*
|
3606
|
-
*
|
3607
|
+
* `sender` - the survey object that fires the event.
|
3608
|
+
* `options.url` - Specifies a URL opened after completing a survey. Set this property to an empty string to cancel the navigation and show the completed survey page.
|
3607
3609
|
*/
|
3608
3610
|
onNavigateToUrl: EventBase<SurveyModel>;
|
3609
3611
|
/*
|
@@ -3613,73 +3615,73 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
|
|
3613
3615
|
onStarted: EventBase<SurveyModel>;
|
3614
3616
|
/*
|
3615
3617
|
* The event is fired on clicking the 'Next' button if the `sendResultOnPageNext` is set to `true`. You can use it to save the intermediate results, for example, if your survey is large enough.
|
3616
|
-
*
|
3618
|
+
* `sender` - the survey object that fires the event.
|
3617
3619
|
*/
|
3618
3620
|
onPartialSend: EventBase<SurveyModel>;
|
3619
3621
|
/*
|
3620
3622
|
* The event is fired before the current page changes to another page. Typically it happens when a user click the 'Next' or 'Prev' buttons.
|
3621
|
-
*
|
3622
|
-
*
|
3623
|
-
*
|
3624
|
-
*
|
3625
|
-
*
|
3626
|
-
*
|
3623
|
+
* `sender` - the survey object that fires the event.
|
3624
|
+
* `option.oldCurrentPage` - the previous current/active page.
|
3625
|
+
* `option.newCurrentPage` - a new current/active page.
|
3626
|
+
* `option.allowChanging` - set it to `false` to disable the current page changing. It is `true` by default.
|
3627
|
+
* `option.isNextPage` - commonly means, that end-user press the next page button. In general, it means that options.newCurrentPage is the next page after options.oldCurrentPage
|
3628
|
+
* `option.isPrevPage` - commonly means, that end-user press the previous page button. In general, it means that options.newCurrentPage is the previous page before options.oldCurrentPage
|
3627
3629
|
*/
|
3628
3630
|
onCurrentPageChanging: EventBase<SurveyModel>;
|
3629
3631
|
/*
|
3630
3632
|
* The event is fired when the current page has been changed to another page. Typically it happens when a user click on 'Next' or 'Prev' buttons.
|
3631
|
-
*
|
3632
|
-
*
|
3633
|
-
*
|
3634
|
-
*
|
3635
|
-
*
|
3633
|
+
* `sender` - the survey object that fires the event.
|
3634
|
+
* `option.oldCurrentPage` - a previous current/active page.
|
3635
|
+
* `option.newCurrentPage` - a new current/active page.
|
3636
|
+
* `option.isNextPage` - commonly means, that end-user press the next page button. In general, it means that options.newCurrentPage is the next page after options.oldCurrentPage
|
3637
|
+
* `option.isPrevPage` - commonly means, that end-user press the previous page button. In general, it means that options.newCurrentPage is the previous page before options.oldCurrentPage
|
3636
3638
|
*/
|
3637
3639
|
onCurrentPageChanged: EventBase<SurveyModel>;
|
3638
3640
|
/*
|
3639
3641
|
* The event is fired before the question value (answer) is changed. It can be done via UI by a user or programmatically on calling the `setValue` method.
|
3640
|
-
*
|
3641
|
-
*
|
3642
|
-
*
|
3643
|
-
*
|
3644
|
-
*
|
3642
|
+
* `sender` - the survey object that fires the event.
|
3643
|
+
* `options.name` - the value name that has being changed.
|
3644
|
+
* `options.question` - a question which `question.name` equals to the value name. If there are several questions with the same name, the first question is used. If there is no such questions, the `options.question` is null.
|
3645
|
+
* `options.oldValue` - an old, previous value.
|
3646
|
+
* `options.value` - a new value. You can change it.
|
3645
3647
|
*/
|
3646
3648
|
onValueChanging: EventBase<SurveyModel>;
|
3647
3649
|
/*
|
3648
3650
|
* The event is fired when the question value (i.e., answer) has been changed. The question value can be changed in UI (by a user) or programmatically (on calling `setValue` method).
|
3649
3651
|
* Use the `onDynamicPanelItemValueChanged` and `onMatrixCellValueChanged` events to handle changes in a question in the Panel Dynamic and a cell question in matrices.
|
3650
|
-
*
|
3651
|
-
*
|
3652
|
-
*
|
3653
|
-
*
|
3652
|
+
* `sender` - the survey object that fires the event.
|
3653
|
+
* `options.name` - the value name that has been changed.
|
3654
|
+
* `options.question` - a question which `question.name` equals to the value name. If there are several questions with the same name, the first question is used. If there is no such questions, the `options.question` is `null`.
|
3655
|
+
* `options.value` - a new value.
|
3654
3656
|
*/
|
3655
3657
|
onValueChanged: EventBase<SurveyModel>;
|
3656
3658
|
/*
|
3657
3659
|
* The event is fired when setVariable function is called. It can be called on changing a calculated value.
|
3658
|
-
*
|
3659
|
-
*
|
3660
|
-
*
|
3660
|
+
* `sender` - the survey object that fires the event.
|
3661
|
+
* `options.name` - the variable name that has been changed.
|
3662
|
+
* `options.value` - a new value.
|
3661
3663
|
*/
|
3662
3664
|
onVariableChanged: EventBase<SurveyModel>;
|
3663
3665
|
/*
|
3664
3666
|
* The event is fired when a question visibility has been changed.
|
3665
|
-
*
|
3666
|
-
*
|
3667
|
-
*
|
3668
|
-
*
|
3667
|
+
* `sender` - the survey object that fires the event.
|
3668
|
+
* `options.question` - a question which visibility has been changed.
|
3669
|
+
* `options.name` - a question name.
|
3670
|
+
* `options.visible` - a question `visible` boolean value.
|
3669
3671
|
*/
|
3670
3672
|
onVisibleChanged: EventBase<SurveyModel>;
|
3671
3673
|
/*
|
3672
3674
|
* The event is fired on changing a page visibility.
|
3673
|
-
*
|
3674
|
-
*
|
3675
|
-
*
|
3675
|
+
* `sender` - the survey object that fires the event.
|
3676
|
+
* `options.page` - a page which visibility has been changed.
|
3677
|
+
* `options.visible` - a page `visible` boolean value.
|
3676
3678
|
*/
|
3677
3679
|
onPageVisibleChanged: EventBase<SurveyModel>;
|
3678
3680
|
/*
|
3679
3681
|
* The event is fired on changing a panel visibility.
|
3680
|
-
*
|
3681
|
-
*
|
3682
|
-
*
|
3682
|
+
* `sender` - the survey object that fires the event.
|
3683
|
+
* `options.panel` - a panel which visibility has been changed.
|
3684
|
+
* `options.visible` - a panel `visible` boolean value.
|
3683
3685
|
*/
|
3684
3686
|
onPanelVisibleChanged: EventBase<SurveyModel>;
|
3685
3687
|
/*
|
@@ -3688,88 +3690,88 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
|
|
3688
3690
|
* or inside a matrix cell or it can be a text question in multiple text items or inside a panel of a panel dynamic.
|
3689
3691
|
* You can use this event to set up properties to a question based on it's type for all questions, regardless where they are located, on the page or inside a matrix cell.
|
3690
3692
|
* Please note: If you want to use this event for questions loaded from JSON then you have to create survey with empty/null JSON parameter, assign the event and call survey.fromJSON(yourJSON) function.
|
3691
|
-
*
|
3692
|
-
*
|
3693
|
+
* `sender` - the survey object that fires the event.
|
3694
|
+
* `options.question` - a newly created question object.
|
3693
3695
|
*/
|
3694
3696
|
onQuestionCreated: EventBase<SurveyModel>;
|
3695
3697
|
/*
|
3696
3698
|
* The event is fired on adding a new question into survey.
|
3697
|
-
*
|
3698
|
-
*
|
3699
|
-
*
|
3700
|
-
*
|
3701
|
-
*
|
3702
|
-
*
|
3699
|
+
* `sender` - the survey object that fires the event.
|
3700
|
+
* `options.question` - a newly added question object.
|
3701
|
+
* `options.name` - a question name.
|
3702
|
+
* `options.index` - an index of the question in the container (page or panel).
|
3703
|
+
* `options.parentPanel` - a container where a new question is located. It can be a page or panel.
|
3704
|
+
* `options.rootPanel` - typically, it is a page.
|
3703
3705
|
*/
|
3704
3706
|
onQuestionAdded: EventBase<SurveyModel>;
|
3705
3707
|
/*
|
3706
3708
|
* The event is fired on removing a question from survey.
|
3707
|
-
*
|
3708
|
-
*
|
3709
|
-
*
|
3709
|
+
* `sender` - the survey object that fires the event.
|
3710
|
+
* `options.question` - a removed question object.
|
3711
|
+
* `options.name` - a question name.
|
3710
3712
|
*/
|
3711
3713
|
onQuestionRemoved: EventBase<SurveyModel>;
|
3712
3714
|
/*
|
3713
3715
|
* The event is fired on adding a panel into survey.
|
3714
|
-
*
|
3715
|
-
*
|
3716
|
-
*
|
3717
|
-
*
|
3718
|
-
*
|
3719
|
-
*
|
3716
|
+
* `sender` - the survey object that fires the event.
|
3717
|
+
* `options.panel` - a newly added panel object.
|
3718
|
+
* `options.name` - a panel name.
|
3719
|
+
* `options.index` - an index of the panel in the container (a page or panel).
|
3720
|
+
* `options.parentPanel` - a container (a page or panel) where a new panel is located.
|
3721
|
+
* `options.rootPanel` - a root container, typically it is a page.
|
3720
3722
|
*/
|
3721
3723
|
onPanelAdded: EventBase<SurveyModel>;
|
3722
3724
|
/*
|
3723
3725
|
* The event is fired on removing a panel from survey.
|
3724
|
-
*
|
3725
|
-
*
|
3726
|
-
*
|
3726
|
+
* `sender` - the survey object that fires the event.
|
3727
|
+
* `options.panel` - a removed panel object.
|
3728
|
+
* `options.name` - a panel name.
|
3727
3729
|
*/
|
3728
3730
|
onPanelRemoved: EventBase<SurveyModel>;
|
3729
3731
|
/*
|
3730
3732
|
* The event is fired on adding a page into survey.
|
3731
|
-
*
|
3732
|
-
*
|
3733
|
+
* `sender` - the survey object that fires the event.
|
3734
|
+
* `options.page` - a newly added `panel` object.
|
3733
3735
|
*/
|
3734
3736
|
onPageAdded: EventBase<SurveyModel>;
|
3735
3737
|
/*
|
3736
3738
|
* The event is fired on validating value in a question. You can specify a custom error message using `options.error`. The survey blocks completing the survey or going to the next page when the error messages are displayed.
|
3737
|
-
*
|
3738
|
-
*
|
3739
|
-
*
|
3740
|
-
*
|
3741
|
-
*
|
3739
|
+
* `sender` - the survey object that fires the event.
|
3740
|
+
* `options.question` - a validated question.
|
3741
|
+
* `options.name` - a question name.
|
3742
|
+
* `options.value` - the current question value (answer).
|
3743
|
+
* `options.error` - an error string. It is empty by default.
|
3742
3744
|
*/
|
3743
3745
|
onValidateQuestion: EventBase<SurveyModel>;
|
3744
3746
|
/*
|
3745
3747
|
* The event is fired before errors are assigned to a question. You may add/remove/modify errors for a question.
|
3746
|
-
*
|
3747
|
-
*
|
3748
|
-
*
|
3748
|
+
* `sender` - the survey object that fires the event.
|
3749
|
+
* `options.question` - a validated question.
|
3750
|
+
* `options.errors` - the list of errors. The list is empty by default and remains empty if a validated question has no errors.
|
3749
3751
|
*/
|
3750
3752
|
onSettingQuestionErrors: EventBase<SurveyModel>;
|
3751
3753
|
/*
|
3752
3754
|
* Use this event to validate data on your server.
|
3753
|
-
*
|
3754
|
-
*
|
3755
|
-
*
|
3756
|
-
*
|
3755
|
+
* `sender` - the survey object that fires the event.
|
3756
|
+
* `options.data` - the values of all non-empty questions on the current page. You can get a question value as `options.data["myQuestionName"]`.
|
3757
|
+
* `options.errors` - set your errors to this object as: `options.errors["myQuestionName"] = "Error text";`. It will be shown as a question error.
|
3758
|
+
* `options.complete()` - call this function to tell survey that your server callback has been processed.
|
3757
3759
|
*/
|
3758
3760
|
onServerValidateQuestions: any;
|
3759
3761
|
/*
|
3760
3762
|
* The event is fired on validating a panel. Set your error to `options.error` and survey will show the error for the panel and block completing the survey or going to the next page.
|
3761
|
-
*
|
3762
|
-
*
|
3763
|
-
*
|
3763
|
+
* `sender` - the survey object that fires the event.
|
3764
|
+
* `options.name` - a panel name.
|
3765
|
+
* `options.error` - an error string. It is empty by default.
|
3764
3766
|
*/
|
3765
3767
|
onValidatePanel: EventBase<SurveyModel>;
|
3766
3768
|
/*
|
3767
3769
|
* Use the event to change the default error text.
|
3768
|
-
*
|
3769
|
-
*
|
3770
|
-
*
|
3771
|
-
*
|
3772
|
-
*
|
3770
|
+
* `sender` - the survey object that fires the event.
|
3771
|
+
* `options.text` - an error text.
|
3772
|
+
* `options.error` - an instance of the `SurveyError` object.
|
3773
|
+
* `options.obj` - an instance of Question, Panel or Survey object to where error is located.
|
3774
|
+
* `options.name` - the error name. The following error names are available:
|
3773
3775
|
* required, requireoneanswer, requirenumeric, exceedsize, webrequest, webrequestempty, otherempty,
|
3774
3776
|
* uploadingfile, requiredinallrowserror, minrowcounterror, keyduplicationerror, custom
|
3775
3777
|
*/
|
@@ -3788,201 +3790,201 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
|
|
3788
3790
|
onProcessHtml: EventBase<SurveyModel>;
|
3789
3791
|
/*
|
3790
3792
|
* Use this event to change the question title in code. If you want to remove question numbering then set showQuestionNumbers to "off".
|
3791
|
-
*
|
3792
|
-
*
|
3793
|
-
*
|
3793
|
+
* `sender` - the survey object that fires the event.
|
3794
|
+
* `options.title` - a calculated question title, based on question `title`, `name`.
|
3795
|
+
* `options.question` - a question object.
|
3794
3796
|
*/
|
3795
3797
|
onGetQuestionTitle: EventBase<SurveyModel>;
|
3796
3798
|
/*
|
3797
3799
|
* Use this event to change the element title tag name that renders by default.
|
3798
|
-
*
|
3799
|
-
*
|
3800
|
-
*
|
3800
|
+
* `sender` - the survey object that fires the event.
|
3801
|
+
* `options.element` - an element (question, panel, page and survey) that SurveyJS is going to render.
|
3802
|
+
* `options.tagName` - an element title tagName that are used to render a title. You can change it from the default value.
|
3801
3803
|
*/
|
3802
3804
|
onGetTitleTagName: EventBase<SurveyModel>;
|
3803
3805
|
/*
|
3804
3806
|
* Use this event to change the question no in code. If you want to remove question numbering then set showQuestionNumbers to "off".
|
3805
|
-
*
|
3806
|
-
*
|
3807
|
-
*
|
3807
|
+
* `sender` - the survey object that fires the event.
|
3808
|
+
* `options.no` - a calculated question no, based on question `visibleIndex`, survey `.questionStartIndex` properties. You can change it.
|
3809
|
+
* `options.question` - a question object.
|
3808
3810
|
*/
|
3809
3811
|
onGetQuestionNo: EventBase<SurveyModel>;
|
3810
3812
|
/*
|
3811
3813
|
* Use this event to change the progress text in code.
|
3812
|
-
*
|
3813
|
-
*
|
3814
|
-
*
|
3815
|
-
*
|
3816
|
-
*
|
3817
|
-
*
|
3814
|
+
* `sender` - the survey object that fires the event.
|
3815
|
+
* `options.text` - a progress text, that SurveyJS will render in progress bar.
|
3816
|
+
* `options.questionCount` - a number of questions that have input(s). We do not count html or expression questions
|
3817
|
+
* `options.answeredQuestionCount` - a number of questions that have input(s) and an user has answered.
|
3818
|
+
* `options.requiredQuestionCount` - a number of required questions that have input(s). We do not count html or expression questions
|
3819
|
+
* `options.requiredAnsweredQuestionCount` - a number of required questions that have input(s) and an user has answered.
|
3818
3820
|
*/
|
3819
3821
|
onProgressText: EventBase<SurveyModel>;
|
3820
3822
|
/*
|
3821
3823
|
* Use this event to process the markdown text.
|
3822
|
-
*
|
3823
|
-
*
|
3824
|
-
*
|
3825
|
-
*
|
3826
|
-
*
|
3824
|
+
* `sender` - the survey object that fires the event.
|
3825
|
+
* `options.element` - SurveyJS element (a question, panel, page, or survey) where the string is going to be rendered.
|
3826
|
+
* `options.name` - a property name is going to be rendered.
|
3827
|
+
* `options.text` - a text that is going to be rendered.
|
3828
|
+
* `options.html` - an HTML content. It is `null` by default. Use this property to specify the HTML content rendered instead of `options.text`.
|
3827
3829
|
*/
|
3828
3830
|
onTextMarkdown: EventBase<SurveyModel>;
|
3829
3831
|
/*
|
3830
3832
|
* Use this event to specity render component name used for text rendering.
|
3831
|
-
*
|
3832
|
-
*
|
3833
|
-
*
|
3834
|
-
*
|
3833
|
+
* `sender` - the survey object that fires the event.
|
3834
|
+
* `options.element` - SurveyJS element (a question, panel, page, or survey) where the string is going to be rendered.
|
3835
|
+
* `options.name` - a property name is going to be rendered.
|
3836
|
+
* `options.renderAs` - a component name used for text rendering.
|
3835
3837
|
*/
|
3836
3838
|
onTextRenderAs: EventBase<SurveyModel>;
|
3837
3839
|
/*
|
3838
3840
|
* The event fires when it gets response from the [api.surveyjs.io](https://api.surveyjs.io) service on saving survey results. Use it to find out if the results have been saved successfully.
|
3839
|
-
*
|
3840
|
-
*
|
3841
|
-
*
|
3841
|
+
* `sender` - the survey object that fires the event.
|
3842
|
+
* `options.success` - it is `true` if the results has been sent to the service successfully.
|
3843
|
+
* `options.response` - a response from the service.
|
3842
3844
|
*/
|
3843
3845
|
onSendResult: EventBase<SurveyModel>;
|
3844
3846
|
/*
|
3845
3847
|
* Use it to get results after calling the `getResult` method. It returns a simple analytics from [api.surveyjs.io](https://api.surveyjs.io) service.
|
3846
|
-
*
|
3847
|
-
*
|
3848
|
-
*
|
3849
|
-
*
|
3850
|
-
*
|
3848
|
+
* `sender` - the survey object that fires the event.
|
3849
|
+
* `options.success` - it is `true` if the results were got from the service successfully.
|
3850
|
+
* `options.data` - the object `{AnswersCount, QuestionResult : {} }`. `AnswersCount` is the number of posted survey results. `QuestionResult` is an object with all possible unique answers to the question and number of these answers.
|
3851
|
+
* `options.dataList` - an array of objects `{name, value}`, where `name` is a unique value/answer to the question and `value` is a number/count of such answers.
|
3852
|
+
* `options.response` - the server response.
|
3851
3853
|
*/
|
3852
3854
|
onGetResult: EventBase<SurveyModel>;
|
3853
3855
|
/*
|
3854
3856
|
* The event is fired on uploading the file in QuestionFile when `storeDataAsText` is set to `false`. Use this event to change the uploaded file name or to prevent a particular file from being uploaded.
|
3855
|
-
*
|
3856
|
-
*
|
3857
|
-
*
|
3858
|
-
*
|
3859
|
-
*
|
3857
|
+
* `sender` - the survey object that fires the event.
|
3858
|
+
* `options.question` - the file question instance.
|
3859
|
+
* `options.name` - the question name.
|
3860
|
+
* `options.files` - the Javascript File objects array to upload.
|
3861
|
+
* `options.callback` - a callback function to get the file upload status and the updloaded file content.
|
3860
3862
|
*/
|
3861
3863
|
onUploadFiles: EventBase<SurveyModel>;
|
3862
3864
|
/*
|
3863
3865
|
* The event is fired on downloading a file in QuestionFile. Use this event to pass the file to a preview.
|
3864
|
-
*
|
3865
|
-
*
|
3866
|
-
*
|
3867
|
-
*
|
3868
|
-
*
|
3866
|
+
* `sender` - the survey object that fires the event.
|
3867
|
+
* `options.name` - the question name.
|
3868
|
+
* `options.content` - the file content.
|
3869
|
+
* `options.fileValue` - single file question value.
|
3870
|
+
* `options.callback` - a callback function to get the file downloading status and the downloaded file content.
|
3869
3871
|
*/
|
3870
3872
|
onDownloadFile: EventBase<SurveyModel>;
|
3871
3873
|
/*
|
3872
3874
|
* This event is fired on clearing the value in a QuestionFile. Use this event to remove files stored on your server.
|
3873
|
-
*
|
3874
|
-
*
|
3875
|
-
*
|
3876
|
-
*
|
3877
|
-
*
|
3878
|
-
*
|
3875
|
+
* `sender` - the survey object that fires the event.
|
3876
|
+
* `question` - the question instance.
|
3877
|
+
* `options.name` - the question name.
|
3878
|
+
* `options.value` - the question value.
|
3879
|
+
* `options.fileName` - a removed file's name, set it to `null` to clear all files.
|
3880
|
+
* `options.callback` - a callback function to get the operation status.
|
3879
3881
|
*/
|
3880
3882
|
onClearFiles: EventBase<SurveyModel>;
|
3881
3883
|
/*
|
3882
3884
|
* The event is fired after choices for radiogroup, checkbox, and dropdown has been loaded from a RESTful service and before they are assigned to a question.
|
3883
3885
|
* You may change the choices, before they are assigned or disable/enabled make visible/invisible question, based on loaded results.
|
3884
|
-
*
|
3885
|
-
*
|
3886
|
-
*
|
3887
|
-
*
|
3886
|
+
* `sender` - the survey object that fires the event.
|
3887
|
+
* `question` - the question where loaded choices are going to be assigned.
|
3888
|
+
* `choices` - the loaded choices. You can change the loaded choices to before they are assigned to question.
|
3889
|
+
* `serverResult` - a result that comes from the server as it is.
|
3888
3890
|
*/
|
3889
3891
|
onLoadChoicesFromServer: EventBase<SurveyModel>;
|
3890
3892
|
/*
|
3891
3893
|
* The event is fired after survey is loaded from api.surveyjs.io service.
|
3892
3894
|
* You can use this event to perform manipulation with the survey model after it was loaded from the web service.
|
3893
|
-
*
|
3895
|
+
* `sender` - the survey object that fires the event.
|
3894
3896
|
*/
|
3895
3897
|
onLoadedSurveyFromService: EventBase<SurveyModel>;
|
3896
3898
|
/*
|
3897
3899
|
* The event is fired on processing the text when it finds a text in brackets: `{somevalue}`. By default, it uses the value of survey question values and variables.
|
3898
3900
|
* For example, you may use the text processing in loading choices from the web. If your `choicesByUrl.url` equals to "UrlToServiceToGetAllCities/{country}/{state}",
|
3899
3901
|
* you may set on this event `options.value` to "all" or empty string when the "state" value/question is non selected by a user.
|
3900
|
-
*
|
3901
|
-
*
|
3902
|
-
*
|
3903
|
-
*
|
3902
|
+
* `sender` - the survey object that fires the event.
|
3903
|
+
* `options.name` - the name of the processing value, for example, "state" in our example.
|
3904
|
+
* `options.value` - the value of the processing text.
|
3905
|
+
* `options.isExists` - a boolean value. Set it to `true` if you want to use the value and set it to `false` if you don't.
|
3904
3906
|
*/
|
3905
3907
|
onProcessTextValue: EventBase<SurveyModel>;
|
3906
3908
|
/*
|
3907
3909
|
* The event is fired before rendering a question. Use it to override the default question CSS classes.
|
3908
|
-
*
|
3909
|
-
*
|
3910
|
-
*
|
3910
|
+
* `sender` - the survey object that fires the event.
|
3911
|
+
* `options.question` - a question for which you can change the CSS classes.
|
3912
|
+
* `options.cssClasses` - an object with CSS classes. For example `{root: "table", button: "button"}`. You can change them to your own CSS classes.
|
3911
3913
|
*/
|
3912
3914
|
onUpdateQuestionCssClasses: EventBase<SurveyModel>;
|
3913
3915
|
/*
|
3914
3916
|
* The event is fired before rendering a panel. Use it to override the default panel CSS classes.
|
3915
|
-
*
|
3916
|
-
*
|
3917
|
-
*
|
3917
|
+
* `sender` - the survey object that fires the event.
|
3918
|
+
* `options.panel` - a panel for which you can change the CSS classes.
|
3919
|
+
* `options.cssClasses` - an object with CSS classes. For example `{title: "sv_p_title", description: "small"}`. You can change them to your own CSS classes.
|
3918
3920
|
*/
|
3919
3921
|
onUpdatePanelCssClasses: EventBase<SurveyModel>;
|
3920
3922
|
/*
|
3921
3923
|
* The event is fired before rendering a page. Use it to override the default page CSS classes.
|
3922
|
-
*
|
3923
|
-
*
|
3924
|
-
*
|
3924
|
+
* `sender` - the survey object that fires the event.
|
3925
|
+
* `options.page` - a page for which you can change the CSS classes.
|
3926
|
+
* `options.cssClasses` - an object with CSS classes. For example `{title: "sv_p_title", description: "small"}`. You can change them to your own CSS classes.
|
3925
3927
|
*/
|
3926
3928
|
onUpdatePageCssClasses: EventBase<SurveyModel>;
|
3927
3929
|
/*
|
3928
3930
|
* The event is fired before rendering a choice item in radiogroup, checkbox or dropdown questions. Use it to override the default choice item css.
|
3929
|
-
*
|
3930
|
-
*
|
3931
|
-
*
|
3932
|
-
*
|
3931
|
+
* `sender` - the survey object that fires the event.
|
3932
|
+
* `options.question` - a question where choice item is rendered.
|
3933
|
+
* `options.item` - a choice item of ItemValue type. You can get value or text choice properties as options.item.value or options.choice.text
|
3934
|
+
* `options.css` - a string with css classes divided by space. You can change it.
|
3933
3935
|
*/
|
3934
3936
|
onUpdateChoiceItemCss: EventBase<SurveyModel>;
|
3935
3937
|
/*
|
3936
3938
|
* The event is fired right after survey is rendered in DOM.
|
3937
|
-
*
|
3938
|
-
*
|
3939
|
+
* `sender` - the survey object that fires the event.
|
3940
|
+
* `options.htmlElement` - a root HTML element bound to the survey object.
|
3939
3941
|
*/
|
3940
3942
|
onAfterRenderSurvey: EventBase<SurveyModel>;
|
3941
3943
|
/*
|
3942
3944
|
* The event is fired right after a page is rendered in DOM. Use it to modify HTML elements.
|
3943
|
-
*
|
3944
|
-
*
|
3945
|
+
* `sender` - the survey object that fires the event.
|
3946
|
+
* `options.htmlElement` - an HTML element bound to the survey header object.
|
3945
3947
|
*/
|
3946
3948
|
onAfterRenderHeader: EventBase<SurveyModel>;
|
3947
3949
|
/*
|
3948
3950
|
* The event is fired right after a page is rendered in DOM. Use it to modify HTML elements.
|
3949
|
-
*
|
3950
|
-
*
|
3951
|
-
*
|
3951
|
+
* `sender` - the survey object that fires the event.
|
3952
|
+
* `options.page` - a page object for which the event is fired. Typically the current/active page.
|
3953
|
+
* `options.htmlElement` - an HTML element bound to the page object.
|
3952
3954
|
*/
|
3953
3955
|
onAfterRenderPage: EventBase<SurveyModel>;
|
3954
3956
|
/*
|
3955
3957
|
* The event is fired right after a question is rendered in DOM. Use it to modify HTML elements.
|
3956
|
-
*
|
3957
|
-
*
|
3958
|
-
*
|
3958
|
+
* `sender` - the survey object that fires the event.
|
3959
|
+
* `options.question` - a question object for which the event is fired.
|
3960
|
+
* `options.htmlElement` - an HTML element bound to the question object.
|
3959
3961
|
*/
|
3960
3962
|
onAfterRenderQuestion: EventBase<SurveyModel>;
|
3961
3963
|
/*
|
3962
3964
|
* The event is fired right after a non-composite question (text, comment, dropdown, radiogroup, checkbox) is rendered in DOM. Use it to modify HTML elements.
|
3963
3965
|
* This event is not fired for matrices, panels, multiple text and image picker.
|
3964
|
-
*
|
3965
|
-
*
|
3966
|
-
*
|
3966
|
+
* `sender` - the survey object that fires the event.
|
3967
|
+
* `options.question` - a question object for which the event is fired.
|
3968
|
+
* `options.htmlElement` - an HTML element bound to the question object.
|
3967
3969
|
*/
|
3968
3970
|
onAfterRenderQuestionInput: EventBase<SurveyModel>;
|
3969
3971
|
/*
|
3970
3972
|
* The event is fired right after a panel is rendered in DOM. Use it to modify HTML elements.
|
3971
|
-
*
|
3972
|
-
*
|
3973
|
-
*
|
3973
|
+
* `sender` - the survey object that fires the event
|
3974
|
+
* `options.panel` - a panel object for which the event is fired
|
3975
|
+
* `options.htmlElement` - an HTML element bound to the panel object
|
3974
3976
|
*/
|
3975
3977
|
onAfterRenderPanel: EventBase<SurveyModel>;
|
3976
3978
|
/*
|
3977
3979
|
* The event occurs when an element within a question gets focus.
|
3978
|
-
*
|
3979
|
-
*
|
3980
|
+
* `sender` - A [survey](https://surveyjs.io/Documentation/Library?id=surveymodel) object that fires the event.
|
3981
|
+
* `options.question` - A [question](https://surveyjs.io/Documentation/Library?id=Question) whose child element gets focus.
|
3980
3982
|
*/
|
3981
3983
|
onFocusInQuestion: EventBase<SurveyModel>;
|
3982
3984
|
/*
|
3983
3985
|
* The event occurs when an element within a panel gets focus.
|
3984
|
-
*
|
3985
|
-
*
|
3986
|
+
* `sender` - A [survey](https://surveyjs.io/Documentation/Library?id=surveymodel) object that fires the event.
|
3987
|
+
* `options.panel` - A [panel](https://surveyjs.io/Documentation/Library?id=PanelModelBase) whose child element gets focus.
|
3986
3988
|
*/
|
3987
3989
|
onFocusInPanel: EventBase<SurveyModel>;
|
3988
3990
|
/*
|
@@ -3998,123 +4000,123 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
|
|
3998
4000
|
onShowingChoiceItem: EventBase<SurveyModel>;
|
3999
4001
|
/*
|
4000
4002
|
* The event is fired on adding a new row in Matrix Dynamic question.
|
4001
|
-
*
|
4002
|
-
*
|
4003
|
-
*
|
4003
|
+
* `sender` - the survey object that fires the event
|
4004
|
+
* `options.question` - a matrix question.
|
4005
|
+
* `options.row` - a new added row.
|
4004
4006
|
*/
|
4005
4007
|
onMatrixRowAdded: EventBase<SurveyModel>;
|
4006
4008
|
/*
|
4007
4009
|
* The event is fired before adding a new row in Matrix Dynamic question.
|
4008
|
-
*
|
4009
|
-
*
|
4010
|
-
*
|
4010
|
+
* `sender` - the survey object that fires the event
|
4011
|
+
* `options.question` - a matrix question.
|
4012
|
+
* `options.canAddRow` - specifies whether a new row can be added
|
4011
4013
|
*/
|
4012
4014
|
onMatrixBeforeRowAdded: EventBase<SurveyModel>;
|
4013
4015
|
/*
|
4014
4016
|
* The event is fired before removing a row from Matrix Dynamic question. You can disable removing and clear the data instead.
|
4015
|
-
*
|
4016
|
-
*
|
4017
|
-
*
|
4018
|
-
*
|
4019
|
-
*
|
4017
|
+
* `sender` - the survey object that fires the event
|
4018
|
+
* `options.question` - a matrix question.
|
4019
|
+
* `options.rowIndex` - a row index.
|
4020
|
+
* `options.row` - a row object.
|
4021
|
+
* `options.allow` - a boolean property. Set it to `false` to disable the row removing.
|
4020
4022
|
*/
|
4021
4023
|
onMatrixRowRemoving: EventBase<SurveyModel>;
|
4022
4024
|
/*
|
4023
4025
|
* The event is fired on removing a row from Matrix Dynamic question.
|
4024
|
-
*
|
4025
|
-
*
|
4026
|
-
*
|
4027
|
-
*
|
4026
|
+
* `sender` - the survey object that fires the event
|
4027
|
+
* `options.question` - a matrix question
|
4028
|
+
* `options.rowIndex` - a removed row index
|
4029
|
+
* `options.row` - a removed row object
|
4028
4030
|
*/
|
4029
4031
|
onMatrixRowRemoved: EventBase<SurveyModel>;
|
4030
4032
|
/*
|
4031
4033
|
* The event is fired before rendering "Remove" button for removing a row from Matrix Dynamic question.
|
4032
|
-
*
|
4033
|
-
*
|
4034
|
-
*
|
4035
|
-
*
|
4036
|
-
*
|
4034
|
+
* `sender` - the survey object that fires the event
|
4035
|
+
* `options.question` - a matrix question.
|
4036
|
+
* `options.rowIndex` - a row index.
|
4037
|
+
* `options.row` - a row object.
|
4038
|
+
* `options.allow` - a boolean property. Set it to `false` to disable the row removing.
|
4037
4039
|
*/
|
4038
4040
|
onMatrixAllowRemoveRow: EventBase<SurveyModel>;
|
4039
4041
|
/*
|
4040
4042
|
* The event is fired before creating cell question in the matrix. You can change the cell question type by setting different options.cellType.
|
4041
|
-
*
|
4042
|
-
*
|
4043
|
-
*
|
4044
|
-
*
|
4045
|
-
*
|
4046
|
-
*
|
4047
|
-
*
|
4043
|
+
* `sender` - the survey object that fires the event.
|
4044
|
+
* `options.question` - the matrix question.
|
4045
|
+
* `options.cellType` - the cell question type. You can change it.
|
4046
|
+
* `options.rowValue` - the value of the current row. To access a particular column's value within the current row, use: `options.rowValue["columnValue"]`.
|
4047
|
+
* `options.column` - the matrix column object.
|
4048
|
+
* `options.columnName` - the matrix column name.
|
4049
|
+
* `options.row` - the matrix row object.
|
4048
4050
|
*/
|
4049
4051
|
onMatrixCellCreating: EventBase<SurveyModel>;
|
4050
4052
|
/*
|
4051
4053
|
* The event is fired for every cell created in Matrix Dynamic and Matrix Dropdown questions.
|
4052
|
-
*
|
4053
|
-
*
|
4054
|
-
*
|
4055
|
-
*
|
4056
|
-
*
|
4057
|
-
*
|
4058
|
-
*
|
4059
|
-
*
|
4054
|
+
* `sender` - the survey object that fires the event.
|
4055
|
+
* `options.question` - the matrix question.
|
4056
|
+
* `options.cell` - the matrix cell.
|
4057
|
+
* `options.cellQuestion` - the question/editor in the cell. You may customize it, change it's properties, like choices or visible.
|
4058
|
+
* `options.rowValue` - the value of the current row. To access a particular column's value within the current row, use: `options.rowValue["columnValue"]`.
|
4059
|
+
* `options.column` - the matrix column object.
|
4060
|
+
* `options.columnName` - the matrix column name.
|
4061
|
+
* `options.row` - the matrix row object.
|
4060
4062
|
*/
|
4061
4063
|
onMatrixCellCreated: EventBase<SurveyModel>;
|
4062
4064
|
/*
|
4063
4065
|
* The event is fired for every cell after is has been rendered in DOM.
|
4064
|
-
*
|
4065
|
-
*
|
4066
|
-
*
|
4067
|
-
*
|
4068
|
-
*
|
4069
|
-
*
|
4070
|
-
*
|
4066
|
+
* `sender` - the survey object that fires the event.
|
4067
|
+
* `options.question` - the matrix question.
|
4068
|
+
* `options.cell` - the matrix cell.
|
4069
|
+
* `options.cellQuestion` - the question/editor in the cell.
|
4070
|
+
* `options.htmlElement` - an HTML element bound to the `cellQuestion` object.
|
4071
|
+
* `options.column` - the matrix column object.
|
4072
|
+
* `options.row` - the matrix row object.
|
4071
4073
|
*/
|
4072
4074
|
onMatrixAfterCellRender: EventBase<SurveyModel>;
|
4073
4075
|
/*
|
4074
4076
|
* The event is fired when cell value is changed in Matrix Dynamic and Matrix Dropdown questions.
|
4075
|
-
*
|
4076
|
-
*
|
4077
|
-
*
|
4078
|
-
*
|
4079
|
-
*
|
4080
|
-
*
|
4077
|
+
* `sender` - the survey object that fires the event.
|
4078
|
+
* `options.question` - the matrix question.
|
4079
|
+
* `options.columnName` - the matrix column name.
|
4080
|
+
* `options.value` - a new value.
|
4081
|
+
* `options.row` - the matrix row object.
|
4082
|
+
* `options.getCellQuestion(columnName)` - the function that returns the cell question by column name.
|
4081
4083
|
*/
|
4082
4084
|
onMatrixCellValueChanged: EventBase<SurveyModel>;
|
4083
4085
|
/*
|
4084
4086
|
* The event is fired on changing cell value in Matrix Dynamic and Matrix Dropdown questions. You may change the `options.value` property to change a cell value.
|
4085
|
-
*
|
4086
|
-
*
|
4087
|
-
*
|
4088
|
-
*
|
4089
|
-
*
|
4090
|
-
*
|
4091
|
-
*
|
4087
|
+
* `sender` - the survey object that fires the event.
|
4088
|
+
* `options.question` - the matrix question.
|
4089
|
+
* `options.columnName` - the matrix column name.
|
4090
|
+
* `options.value` - a new value.
|
4091
|
+
* `options.oldValue` - the old value.
|
4092
|
+
* `options.row` - the matrix row object.
|
4093
|
+
* `options.getCellQuestion(columnName)` - the function that returns a cell question by column name.
|
4092
4094
|
*/
|
4093
4095
|
onMatrixCellValueChanging: EventBase<SurveyModel>;
|
4094
4096
|
/*
|
4095
4097
|
* The event is fired when Matrix Dynamic and Matrix Dropdown questions validate the cell value.
|
4096
|
-
*
|
4097
|
-
*
|
4098
|
-
*
|
4099
|
-
*
|
4100
|
-
*
|
4101
|
-
*
|
4102
|
-
*
|
4098
|
+
* `sender` - the survey object that fires the event.
|
4099
|
+
* `options.error` - an error string. It is empty by default.
|
4100
|
+
* `options.question` - the matrix question.
|
4101
|
+
* `options.columnName` - the matrix column name.
|
4102
|
+
* `options.value` - a cell value.
|
4103
|
+
* `options.row` - the matrix row object.
|
4104
|
+
* `options.getCellQuestion(columnName)` - the function that returns the cell question by column name.
|
4103
4105
|
*/
|
4104
4106
|
onMatrixCellValidate: EventBase<SurveyModel>;
|
4105
4107
|
/*
|
4106
4108
|
* The event is fired on adding a new panel in Panel Dynamic question.
|
4107
|
-
*
|
4108
|
-
*
|
4109
|
-
*
|
4109
|
+
* `sender` - the survey object that fires the event.
|
4110
|
+
* `options.question` - a panel question.
|
4111
|
+
* `options.panel` - an added panel.
|
4110
4112
|
*/
|
4111
4113
|
onDynamicPanelAdded: EventBase<SurveyModel>;
|
4112
4114
|
/*
|
4113
4115
|
* The event is fired on removing a panel from Panel Dynamic question.
|
4114
|
-
*
|
4115
|
-
*
|
4116
|
-
*
|
4117
|
-
*
|
4116
|
+
* `sender` - the survey object that fires the event.
|
4117
|
+
* `options.question` - a panel question.
|
4118
|
+
* `options.panelIndex` - a removed panel index.
|
4119
|
+
* `options.panel` - a removed panel.
|
4118
4120
|
*/
|
4119
4121
|
onDynamicPanelRemoved: EventBase<SurveyModel>;
|
4120
4122
|
/*
|
@@ -4123,92 +4125,92 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
|
|
4123
4125
|
onTimer: EventBase<SurveyModel>;
|
4124
4126
|
/*
|
4125
4127
|
* The event is fired before displaying a new information in the Timer Panel. Use it to change the default text.
|
4126
|
-
*
|
4127
|
-
*
|
4128
|
+
* `sender` - the survey object that fires the event.
|
4129
|
+
* `options.text` - the timer panel info text.
|
4128
4130
|
*/
|
4129
4131
|
onTimerPanelInfoText: EventBase<SurveyModel>;
|
4130
4132
|
/*
|
4131
4133
|
* The event is fired when item value is changed in Panel Dynamic question.
|
4132
|
-
*
|
4133
|
-
*
|
4134
|
-
*
|
4135
|
-
*
|
4136
|
-
*
|
4137
|
-
*
|
4138
|
-
*
|
4134
|
+
* `sender` - the survey object that fires the event.
|
4135
|
+
* `options.question` - the panel question.
|
4136
|
+
* `options.panel` - the dynamic panel item.
|
4137
|
+
* `options.name` - the item name.
|
4138
|
+
* `options.value` - a new value.
|
4139
|
+
* `options.itemIndex` - the panel item index.
|
4140
|
+
* `options.itemValue` - the panel item object.
|
4139
4141
|
*/
|
4140
4142
|
onDynamicPanelItemValueChanged: EventBase<SurveyModel>;
|
4141
4143
|
/*
|
4142
4144
|
* Use this event to define, whether an answer to a question is correct or not.
|
4143
|
-
*
|
4144
|
-
*
|
4145
|
-
*
|
4146
|
-
*
|
4145
|
+
* `sender` - the survey object that fires the event.
|
4146
|
+
* `options.question` - a question on which you have to decide if the answer is correct or not.
|
4147
|
+
* `options.result` - returns `true`, if an answer is correct, or `false`, if the answer is not correct. Use questions' `value` and `correctAnswer` properties to return the correct value.
|
4148
|
+
* `options.correctAnswers` - you may change the default number of correct or incorrect answers in the question, for example for matrix, where each row is a quiz question.
|
4147
4149
|
*/
|
4148
4150
|
onIsAnswerCorrect: EventBase<SurveyModel>;
|
4149
4151
|
/*
|
4150
4152
|
* Use this event to control drag&drop operations during design mode.
|
4151
|
-
*
|
4152
|
-
*
|
4153
|
-
*
|
4154
|
-
*
|
4155
|
-
*
|
4156
|
-
*
|
4157
|
-
*
|
4153
|
+
* `sender` - the survey object that fires the event.
|
4154
|
+
* `options.allow` - set it to `false` to disable dragging.
|
4155
|
+
* `options.target` - a target element that is dragged.
|
4156
|
+
* `options.source` - a source element. It can be `null`, if it is a new element, dragging from toolbox.
|
4157
|
+
* `options.parent` - a page or panel where target element is dragging.
|
4158
|
+
* `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 after the last element in a container.
|
4159
|
+
* `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 first position within the parent container.
|
4158
4160
|
*/
|
4159
4161
|
onDragDropAllow: EventBase<SurveyModel>;
|
4160
4162
|
/*
|
4161
4163
|
* Use this event to control scrolling element to top. You can cancel the default behavior by setting options.cancel property to true.
|
4162
|
-
*
|
4163
|
-
*
|
4164
|
-
*
|
4165
|
-
*
|
4166
|
-
*
|
4167
|
-
*
|
4164
|
+
* `sender` - the survey object that fires the event.
|
4165
|
+
* `options.element` - an element that is going to be scrolled on top.
|
4166
|
+
* `options.question` - a question that is going to be scrolled on top. It can be null if options.page is not null.
|
4167
|
+
* `options.page` - a page that is going to be scrolled on top. It can be null if options.question is not null.
|
4168
|
+
* `options.elementId` - the unique element DOM Id.
|
4169
|
+
* `options.cancel` - set this property to true to cancel the default scrolling.
|
4168
4170
|
*/
|
4169
4171
|
onScrollingElementToTop: EventBase<SurveyModel>;
|
4170
4172
|
onLocaleChangedEvent: EventBase<SurveyModel>;
|
4171
4173
|
/*
|
4172
4174
|
* Use this event to create/customize actions to be displayed in a question's title.
|
4173
|
-
*
|
4174
|
-
*
|
4175
|
-
*
|
4175
|
+
* `sender` - A [Survey](https://surveyjs.io/Documentation/Library?id=SurveyModel) object that fires the event.
|
4176
|
+
* `options.question` - A [Question](https://surveyjs.io/Documentation/Library?id=Question) object for which the event is fired.
|
4177
|
+
* `options.titleActions` - A list of actions ([IAction](https://surveyjs.io/Documentation/Library?id=IAction) objects) associated with the processed question.
|
4176
4178
|
*/
|
4177
4179
|
onGetQuestionTitleActions: EventBase<SurveyModel>;
|
4178
4180
|
/*
|
4179
4181
|
* Use this event to create/customize actions to be displayed in a panel's title.
|
4180
|
-
*
|
4181
|
-
*
|
4182
|
-
*
|
4182
|
+
* `sender` - A survey object that fires the event.
|
4183
|
+
* `options.panel` - A panel ([PanelModel](https://surveyjs.io/Documentation/Library?id=panelmodel) object) for which the event is fired.
|
4184
|
+
* `options.titleActions` - A list of actions ([IAction](https://surveyjs.io/Documentation/Library?id=IAction) objects) associated with the processed panel.
|
4183
4185
|
*/
|
4184
4186
|
onGetPanelTitleActions: EventBase<SurveyModel>;
|
4185
4187
|
/*
|
4186
4188
|
* Use this event to create/customize actions to be displayed in a page's title.
|
4187
|
-
*
|
4188
|
-
*
|
4189
|
-
*
|
4189
|
+
* `sender` - A survey object that fires the event.
|
4190
|
+
* `options.page` - A page ([PageModel](https://surveyjs.io/Documentation/Library?id=pagemodel) object) for which the event is fired.
|
4191
|
+
* `options.titleActions` - A list of actions ([IAction](https://surveyjs.io/Documentation/Library?id=IAction) objects) associated with the processed page.
|
4190
4192
|
*/
|
4191
4193
|
onGetPageTitleActions: EventBase<SurveyModel>;
|
4192
4194
|
/*
|
4193
4195
|
* Use this event to create/customize actions to be displayed in a matrix question's row.
|
4194
|
-
*
|
4195
|
-
*
|
4196
|
-
*
|
4197
|
-
*
|
4196
|
+
* `sender` - A survey object that fires the event.
|
4197
|
+
* `options.question` - A matrix question ([QuestionMatrixBaseModel](https://surveyjs.io/Documentation/Library?id=questionmatrixbasemodel) object) for which the event is fired.
|
4198
|
+
* `options.row` - A matrix row for which the event is fired.
|
4199
|
+
* `options.actions` - A list of actions ([IAction](https://surveyjs.io/Documentation/Library?id=IAction) objects) associated with the processed matrix question and row.
|
4198
4200
|
*/
|
4199
4201
|
onGetMatrixRowActions: EventBase<SurveyModel>;
|
4200
4202
|
/*
|
4201
4203
|
* The event is fired after the survey element content was collapsed or expanded.
|
4202
|
-
*
|
4203
|
-
*
|
4204
|
+
* `sender` - the survey object that fires the event.
|
4205
|
+
* `options.element` - Specifies which survey element content was collapsed or expanded.
|
4204
4206
|
*/
|
4205
4207
|
onElementContentVisibilityChanged: EventBase<SurveyModel>;
|
4206
4208
|
/*
|
4207
4209
|
* The event is fired before expression question convert it's value into display value for rendering.
|
4208
|
-
*
|
4209
|
-
*
|
4210
|
-
*
|
4211
|
-
*
|
4210
|
+
* `sender` - the survey object that fires the event.
|
4211
|
+
* `options.question` - The expression question.
|
4212
|
+
* `options.value` - The question value.
|
4213
|
+
* `options.displayValue` - the display value that you can change before rendering.
|
4212
4214
|
*/
|
4213
4215
|
onGetExpressionDisplayValue: EventBase<SurveyModel>;
|
4214
4216
|
/*
|
@@ -6113,9 +6115,9 @@ export declare class Question extends SurveyElement implements IQuestion, ICondi
|
|
6113
6115
|
commentElement: any;
|
6114
6116
|
/*
|
6115
6117
|
* The event is fired when isReady property of question is changed.
|
6116
|
-
*
|
6117
|
-
*
|
6118
|
-
*
|
6118
|
+
* options.question - the question
|
6119
|
+
* options.isReady - current value of isReady
|
6120
|
+
* options.oldIsReady - old value of isReady
|
6119
6121
|
*/
|
6120
6122
|
onReadyChanged: EventBase<Question>;
|
6121
6123
|
isReadOnlyRenderDiv(): boolean;
|
@@ -6843,6 +6845,7 @@ export declare class PageModel extends PanelModelBase implements IPage {
|
|
6843
6845
|
get isStarted(): boolean;
|
6844
6846
|
protected calcCssClasses(css: any): any;
|
6845
6847
|
get cssTitle(): string;
|
6848
|
+
get cssRoot(): string;
|
6846
6849
|
num: number;
|
6847
6850
|
/*
|
6848
6851
|
* Set this property to "hide" to make "Prev", "Next" and "Complete" buttons are invisible for this page. Set this property to "show" to make these buttons visible, even if survey showNavigationButtons property is false.
|
@@ -7117,7 +7120,7 @@ export declare class QuestionExpressionModel extends Question {
|
|
7117
7120
|
get locFormat(): LocalizableString;
|
7118
7121
|
/*
|
7119
7122
|
* The Expression that used to calculate the question value. You may use standard operators like +, -, * and /, squares (). Here is the example of accessing the question value {questionname}.
|
7120
|
-
*
|
7123
|
+
* Example: "({quantity} * {price}) * (100 - {discount}) / 100"
|
7121
7124
|
*/
|
7122
7125
|
get expression(): string;
|
7123
7126
|
set expression(val: string);
|
@@ -7170,8 +7173,8 @@ export declare class QuestionFileModel extends Question {
|
|
7170
7173
|
isDragging: boolean;
|
7171
7174
|
/*
|
7172
7175
|
* The event is fired after question state has been changed.
|
7173
|
-
*
|
7174
|
-
*
|
7176
|
+
* sender the question object that fires the event
|
7177
|
+
* options.state new question state value.
|
7175
7178
|
*/
|
7176
7179
|
onStateChanged: EventBase<QuestionFileModel>;
|
7177
7180
|
previewValue: any;
|
@@ -7614,10 +7617,10 @@ export declare class QuestionPanelDynamicModel extends Question implements IQues
|
|
7614
7617
|
set panelCount(val: number);
|
7615
7618
|
/*
|
7616
7619
|
* Use this property to allow the end-user to collapse/expand the panels. It works only if the renderMode property equals to "list" and templateTitle property is not empty. The following values are available:
|
7617
|
-
*
|
7618
|
-
*
|
7619
|
-
*
|
7620
|
-
*
|
7620
|
+
* default - the default value. User can't collapse/expand panels
|
7621
|
+
* expanded - User can collapse/expand panels and all panels are expanded by default
|
7622
|
+
* collapsed - User can collapse/expand panels and all panels are collapsed by default
|
7623
|
+
* firstExpanded - User can collapse/expand panels. The first panel is expanded and others are collapsed
|
7621
7624
|
*/
|
7622
7625
|
get panelsState(): string;
|
7623
7626
|
set panelsState(val: string);
|
@@ -7833,13 +7836,8 @@ export declare class QuestionRatingModel extends Question {
|
|
7833
7836
|
get hasMinLabel(): boolean;
|
7834
7837
|
get hasMaxLabel(): boolean;
|
7835
7838
|
/*
|
7836
|
-
* Specifies whether a Rating question displays the [minRateDescription](https://surveyjs.io/Documentation/Library?id=questionratingmodel#minRateDescription)
|
7837
|
-
* and [maxRateDescription](https://surveyjs.io/Documentation/Library?id=questionratingmodel#maxRateDescription)
|
7838
|
-
* the extreme (first and last) rate items. If any of these properties is empty, the corresponding rate item's value/text is used for display.<br/>
|
7839
|
-
* When the `displayRateDescriptionsAsExtremeItems` property is disabled, the texts defined through
|
7840
|
-
* the [minRateDescription](https://surveyjs.io/Documentation/Library?id=questionratingmodel#minRateDescription)
|
7841
|
-
* and [maxRateDescription](https://surveyjs.io/Documentation/Library?id=questionratingmodel#maxRateDescription) properties
|
7842
|
-
* are displayed as plain non-clickable texts.
|
7839
|
+
* Specifies whether a Rating question displays the [minRateDescription](https://surveyjs.io/Documentation/Library?id=questionratingmodel#minRateDescription) and [maxRateDescription](https://surveyjs.io/Documentation/Library?id=questionratingmodel#maxRateDescription) property texts as buttons that correspond to the extreme (first and last) rate items. If any of these properties is empty, the corresponding rate item's value/text is used for display.
|
7840
|
+
* When the `displayRateDescriptionsAsExtremeItems` property is disabled, the texts defined through the [minRateDescription](https://surveyjs.io/Documentation/Library?id=questionratingmodel#minRateDescription) and [maxRateDescription](https://surveyjs.io/Documentation/Library?id=questionratingmodel#maxRateDescription) properties are displayed as plain non-clickable texts.
|
7843
7841
|
*/
|
7844
7842
|
displayRateDescriptionsAsExtremeItems: boolean;
|
7845
7843
|
useDropdown: "auto" | "always" | "never";
|
@@ -8142,13 +8140,15 @@ export declare class QuestionSignaturePadModel extends Question {
|
|
8142
8140
|
/*
|
8143
8141
|
* Use it to set the specific width for the signature pad.
|
8144
8142
|
*/
|
8145
|
-
get
|
8146
|
-
set
|
8143
|
+
get signatureWidth(): number;
|
8144
|
+
set signatureWidth(val: number);
|
8147
8145
|
/*
|
8148
8146
|
* Use it to set the specific height for the signature pad.
|
8149
8147
|
*/
|
8150
|
-
get
|
8151
|
-
set
|
8148
|
+
get signatureHeight(): number;
|
8149
|
+
set signatureHeight(val: number);
|
8150
|
+
get height(): number;
|
8151
|
+
set height(val: number);
|
8152
8152
|
/*
|
8153
8153
|
* Use it to clear content of the signature pad.
|
8154
8154
|
*/
|
@@ -8171,6 +8171,7 @@ export declare class QuestionSignaturePadModel extends Question {
|
|
8171
8171
|
get clearButtonCaption(): string;
|
8172
8172
|
needShowPlaceholder(): boolean;
|
8173
8173
|
get placeHolderText(): string;
|
8174
|
+
endLoadingFromJson(): void;
|
8174
8175
|
}
|
8175
8176
|
/*
|
8176
8177
|
* A Base Model for a comment and text questions
|
@@ -8909,6 +8910,12 @@ export declare class QuestionCheckboxModel extends QuestionCheckboxBase {
|
|
8909
8910
|
protected onCreating(): void;
|
8910
8911
|
protected getFirstInputElementId(): string;
|
8911
8912
|
/*
|
8913
|
+
* Set this property if you want to store the checkbox value as array of objects instead of array of values
|
8914
|
+
* For example: if "valuePropertyName" equals car, then instead of having ["Ford", "Tesla"], you will have [{car: "Ford"}, {car: "Tesla"}]
|
8915
|
+
*/
|
8916
|
+
get valuePropertyName(): string;
|
8917
|
+
set valuePropertyName(val: string);
|
8918
|
+
/*
|
8912
8919
|
* Returns the select all item. By using this property, you may change programmatically it's value and text.
|
8913
8920
|
*/
|
8914
8921
|
get selectAllItem(): ItemValue;
|
@@ -8976,6 +8983,10 @@ export declare class QuestionCheckboxModel extends QuestionCheckboxBase {
|
|
8976
8983
|
protected setDefaultValueWithOthers(): void;
|
8977
8984
|
protected getHasOther(val: any): boolean;
|
8978
8985
|
protected valueFromData(val: any): any;
|
8986
|
+
protected rendredValueFromData(val: any): any;
|
8987
|
+
protected rendredValueToData(val: any): any;
|
8988
|
+
protected convertValueFromObject(val: any): any;
|
8989
|
+
protected convertValueToObject(val: any): any;
|
8979
8990
|
protected renderedValueFromDataCore(val: any): any;
|
8980
8991
|
protected rendredValueToDataCore(val: any): any;
|
8981
8992
|
get checkBoxSvgPath(): string;
|
@@ -9209,7 +9220,7 @@ export declare class QuestionMatrixDynamicModel extends QuestionMatrixDropdownMo
|
|
9209
9220
|
set addRowText(val: string);
|
9210
9221
|
get locAddRowText(): LocalizableString;
|
9211
9222
|
/*
|
9212
|
-
* By default the 'Add Row' button is shown on bottom if columnLayout is horizontal and on top if columnLayout is vertical.
|
9223
|
+
* By default the 'Add Row' button is shown on bottom if columnLayout is horizontal and on top if columnLayout is vertical.
|
9213
9224
|
* You may set it to "top", "bottom" or "topBottom" (to show on top and bottom).
|
9214
9225
|
*/
|
9215
9226
|
get addRowLocation(): string;
|
@@ -10586,6 +10597,7 @@ export declare var defaultV2Css: {
|
|
10586
10597
|
logo: string,
|
10587
10598
|
logoImage: string,
|
10588
10599
|
headerText: string,
|
10600
|
+
headerClose: string,
|
10589
10601
|
navigationButton: string,
|
10590
10602
|
bodyNavigationButton: string,
|
10591
10603
|
completedPage: string,
|
@@ -10662,6 +10674,7 @@ export declare var defaultV2Css: {
|
|
10662
10674
|
progressTextInBar: string,
|
10663
10675
|
page: {
|
10664
10676
|
root: string,
|
10677
|
+
emptyHeaderRoot: string,
|
10665
10678
|
title: string,
|
10666
10679
|
description: string,
|
10667
10680
|
},
|
@@ -10860,6 +10873,7 @@ export declare var defaultV2Css: {
|
|
10860
10873
|
rowError: string,
|
10861
10874
|
cell: string,
|
10862
10875
|
headerCell: string,
|
10876
|
+
rowTextCell: string,
|
10863
10877
|
label: string,
|
10864
10878
|
itemOnError: string,
|
10865
10879
|
itemValue: string,
|