survey-react 1.9.34 → 1.9.37
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 +164 -95
- package/defaultV2.min.css +2 -2
- package/modern.css +52 -38
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/survey.css +8 -2
- package/survey.min.css +2 -2
- package/survey.react.d.ts +364 -320
- package/survey.react.js +740 -447
- 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.37
|
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
|
*/
|
@@ -223,6 +223,7 @@ export interface IConditionObject {
|
|
223
223
|
}
|
224
224
|
export interface IMatrixColumnOwner extends ILocalizableOwner {
|
225
225
|
getRequiredText(): string;
|
226
|
+
hasChoices(): boolean;
|
226
227
|
onColumnPropertyChanged(column: MatrixDropdownColumn, name: string, newValue: any): void;
|
227
228
|
onColumnItemValuePropertyChanged(column: MatrixDropdownColumn, propertyName: string, obj: ItemValue, name: string, newValue: any, oldValue: any): void;
|
228
229
|
onShowInMultipleColumnsChanged(column: MatrixDropdownColumn): void;
|
@@ -725,6 +726,7 @@ export declare class Base {
|
|
725
726
|
itemValuePropertyChanged(item: ItemValue, name: string, oldValue: any, newValue: any): void;
|
726
727
|
protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
|
727
728
|
protected propertyValueChanged(name: string, oldValue: any, newValue: any, arrayChanges?: ArrayChanges, target?: Base): void;
|
729
|
+
onBindingChanged(oldValue: any, newValue: any): void;
|
728
730
|
protected get isInternal(): boolean;
|
729
731
|
addExpressionProperty(name: string, onExecute: (obj: Base, res: any) => void, canRun?: (obj: Base) => boolean): void;
|
730
732
|
getDataFilteredValues(): any;
|
@@ -935,6 +937,8 @@ export declare class ElementFactory {
|
|
935
937
|
getAllTypes(): Array<any>;
|
936
938
|
createElement(elementType: string, name: string): IElement;
|
937
939
|
}
|
940
|
+
export declare class ElementHelper {
|
941
|
+
}
|
938
942
|
export declare class Event<T, Options> {
|
939
943
|
onCallbacksChanged: any;
|
940
944
|
protected callbacks: any;
|
@@ -988,6 +992,8 @@ export declare class Helpers {
|
|
988
992
|
static isCharDigit(ch: string): boolean;
|
989
993
|
static correctAfterPlusMinis(a: number, b: number, res: number): number;
|
990
994
|
static correctAfterMultiple(a: number, b: number, res: number): number;
|
995
|
+
static convertArrayValueToObject(src: any, propName: string, dest?: any): Array<any>;
|
996
|
+
static convertArrayObjectToValue(src: any, propName: string): Array<any>;
|
991
997
|
}
|
992
998
|
export declare class JsonError {
|
993
999
|
constructor(type: string, message: string);
|
@@ -1520,6 +1526,7 @@ export declare class ActionContainer<T extends Action = Action> extends Base {
|
|
1520
1526
|
protected getRenderedActions(): Array<T>;
|
1521
1527
|
updateCallback: (isResetInitialized: boolean) => void;
|
1522
1528
|
containerCss: string;
|
1529
|
+
sizeMode: "default" | "small";
|
1523
1530
|
protected raiseUpdate(isResetInitialized: boolean): void;
|
1524
1531
|
protected onSet(): void;
|
1525
1532
|
protected onPush(item: T): void;
|
@@ -1600,7 +1607,7 @@ export declare class CalculatedValue extends Base {
|
|
1600
1607
|
set includeIntoResult(val: boolean);
|
1601
1608
|
/*
|
1602
1609
|
* 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
|
-
*
|
1610
|
+
* Example: "({quantity} * {price}) * (100 - {discount}) / 100"
|
1604
1611
|
*/
|
1605
1612
|
get expression(): string;
|
1606
1613
|
set expression(val: string);
|
@@ -3228,6 +3235,7 @@ export declare class ListModel extends ActionContainer {
|
|
3228
3235
|
getItemClass: (itemValue: Action) => string;
|
3229
3236
|
getItemIndent: (itemValue: any) => string;
|
3230
3237
|
get filteredTextPlaceholder(): string;
|
3238
|
+
goToItems(event: any): void;
|
3231
3239
|
onKeyDown(event: any): void;
|
3232
3240
|
onPointerDown(event: any, item: any): void;
|
3233
3241
|
refresh(): void;
|
@@ -3489,7 +3497,6 @@ export declare class SurveyElement extends SurveyElementCore implements ISurveyE
|
|
3489
3497
|
protected setPage(parent: IPanel, newPage: IPage): void;
|
3490
3498
|
protected getSearchableLocKeys(keys: any): void;
|
3491
3499
|
protected get isDefaultV2Theme(): boolean;
|
3492
|
-
get showErrorsAboveQuestion(): boolean;
|
3493
3500
|
get isErrorsModeTooltip(): boolean;
|
3494
3501
|
protected getIsErrorsModeTooltip(): boolean;
|
3495
3502
|
get hasParent(): boolean;
|
@@ -3571,39 +3578,39 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
|
|
3571
3578
|
navigationBarValue: any;
|
3572
3579
|
/*
|
3573
3580
|
* The event is fired after a trigger has been executed
|
3574
|
-
*
|
3575
|
-
*
|
3581
|
+
* `sender` - the survey object that fires the event.
|
3582
|
+
* `options.trigger` - An instance of a trigger that has been just perform it's action.
|
3576
3583
|
*/
|
3577
3584
|
onTriggerExecuted: EventBase<SurveyModel>;
|
3578
3585
|
/*
|
3579
3586
|
* 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
|
-
*
|
3587
|
+
* `sender` - the survey object that fires the event.
|
3588
|
+
* `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`.
|
3589
|
+
* `options.isCompleteOnTrigger` - returns true if the survey is completing on "complete" trigger.
|
3583
3590
|
*/
|
3584
3591
|
onCompleting: EventBase<SurveyModel>;
|
3585
3592
|
/*
|
3586
3593
|
* 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
|
-
*
|
3594
|
+
* `sender` - the survey object that fires the event.
|
3595
|
+
* `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.
|
3596
|
+
* `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.
|
3597
|
+
* `options.showDataSavingSuccess(text)` - call this method to show that the data was successfully saved on the server.
|
3598
|
+
* `options.showDataSavingClear` - call this method to hide the text about the saving progress.
|
3599
|
+
* `options.isCompleteOnTrigger` - returns true if the survey is completed on "complete" trigger.
|
3593
3600
|
*/
|
3594
3601
|
onComplete: EventBase<SurveyModel>;
|
3595
3602
|
/*
|
3596
3603
|
* 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
3604
|
* You can prevent showing it by setting allowShowPreview to `false`.
|
3598
|
-
*
|
3599
|
-
*
|
3605
|
+
* `sender` - the survey object that fires the event.
|
3606
|
+
* `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
3607
|
*/
|
3601
3608
|
onShowingPreview: EventBase<SurveyModel>;
|
3602
3609
|
/*
|
3603
3610
|
* 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
3611
|
* Specify the `navigateToUrl` property to make survey navigate to another url.
|
3605
|
-
*
|
3606
|
-
*
|
3612
|
+
* `sender` - the survey object that fires the event.
|
3613
|
+
* `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
3614
|
*/
|
3608
3615
|
onNavigateToUrl: EventBase<SurveyModel>;
|
3609
3616
|
/*
|
@@ -3613,73 +3620,73 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
|
|
3613
3620
|
onStarted: EventBase<SurveyModel>;
|
3614
3621
|
/*
|
3615
3622
|
* 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
|
-
*
|
3623
|
+
* `sender` - the survey object that fires the event.
|
3617
3624
|
*/
|
3618
3625
|
onPartialSend: EventBase<SurveyModel>;
|
3619
3626
|
/*
|
3620
3627
|
* 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
|
-
*
|
3628
|
+
* `sender` - the survey object that fires the event.
|
3629
|
+
* `option.oldCurrentPage` - the previous current/active page.
|
3630
|
+
* `option.newCurrentPage` - a new current/active page.
|
3631
|
+
* `option.allowChanging` - set it to `false` to disable the current page changing. It is `true` by default.
|
3632
|
+
* `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
|
3633
|
+
* `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
3634
|
*/
|
3628
3635
|
onCurrentPageChanging: EventBase<SurveyModel>;
|
3629
3636
|
/*
|
3630
3637
|
* 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
|
-
*
|
3638
|
+
* `sender` - the survey object that fires the event.
|
3639
|
+
* `option.oldCurrentPage` - a previous current/active page.
|
3640
|
+
* `option.newCurrentPage` - a new current/active page.
|
3641
|
+
* `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
|
3642
|
+
* `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
3643
|
*/
|
3637
3644
|
onCurrentPageChanged: EventBase<SurveyModel>;
|
3638
3645
|
/*
|
3639
3646
|
* 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
|
-
*
|
3647
|
+
* `sender` - the survey object that fires the event.
|
3648
|
+
* `options.name` - the value name that has being changed.
|
3649
|
+
* `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.
|
3650
|
+
* `options.oldValue` - an old, previous value.
|
3651
|
+
* `options.value` - a new value. You can change it.
|
3645
3652
|
*/
|
3646
3653
|
onValueChanging: EventBase<SurveyModel>;
|
3647
3654
|
/*
|
3648
3655
|
* 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
3656
|
* 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
|
-
*
|
3657
|
+
* `sender` - the survey object that fires the event.
|
3658
|
+
* `options.name` - the value name that has been changed.
|
3659
|
+
* `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`.
|
3660
|
+
* `options.value` - a new value.
|
3654
3661
|
*/
|
3655
3662
|
onValueChanged: EventBase<SurveyModel>;
|
3656
3663
|
/*
|
3657
3664
|
* The event is fired when setVariable function is called. It can be called on changing a calculated value.
|
3658
|
-
*
|
3659
|
-
*
|
3660
|
-
*
|
3665
|
+
* `sender` - the survey object that fires the event.
|
3666
|
+
* `options.name` - the variable name that has been changed.
|
3667
|
+
* `options.value` - a new value.
|
3661
3668
|
*/
|
3662
3669
|
onVariableChanged: EventBase<SurveyModel>;
|
3663
3670
|
/*
|
3664
3671
|
* The event is fired when a question visibility has been changed.
|
3665
|
-
*
|
3666
|
-
*
|
3667
|
-
*
|
3668
|
-
*
|
3672
|
+
* `sender` - the survey object that fires the event.
|
3673
|
+
* `options.question` - a question which visibility has been changed.
|
3674
|
+
* `options.name` - a question name.
|
3675
|
+
* `options.visible` - a question `visible` boolean value.
|
3669
3676
|
*/
|
3670
3677
|
onVisibleChanged: EventBase<SurveyModel>;
|
3671
3678
|
/*
|
3672
3679
|
* The event is fired on changing a page visibility.
|
3673
|
-
*
|
3674
|
-
*
|
3675
|
-
*
|
3680
|
+
* `sender` - the survey object that fires the event.
|
3681
|
+
* `options.page` - a page which visibility has been changed.
|
3682
|
+
* `options.visible` - a page `visible` boolean value.
|
3676
3683
|
*/
|
3677
3684
|
onPageVisibleChanged: EventBase<SurveyModel>;
|
3678
3685
|
/*
|
3679
3686
|
* The event is fired on changing a panel visibility.
|
3680
|
-
*
|
3681
|
-
*
|
3682
|
-
*
|
3687
|
+
* `sender` - the survey object that fires the event.
|
3688
|
+
* `options.panel` - a panel which visibility has been changed.
|
3689
|
+
* `options.visible` - a panel `visible` boolean value.
|
3683
3690
|
*/
|
3684
3691
|
onPanelVisibleChanged: EventBase<SurveyModel>;
|
3685
3692
|
/*
|
@@ -3688,88 +3695,88 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
|
|
3688
3695
|
* 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
3696
|
* 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
3697
|
* 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
|
-
*
|
3698
|
+
* `sender` - the survey object that fires the event.
|
3699
|
+
* `options.question` - a newly created question object.
|
3693
3700
|
*/
|
3694
3701
|
onQuestionCreated: EventBase<SurveyModel>;
|
3695
3702
|
/*
|
3696
3703
|
* The event is fired on adding a new question into survey.
|
3697
|
-
*
|
3698
|
-
*
|
3699
|
-
*
|
3700
|
-
*
|
3701
|
-
*
|
3702
|
-
*
|
3704
|
+
* `sender` - the survey object that fires the event.
|
3705
|
+
* `options.question` - a newly added question object.
|
3706
|
+
* `options.name` - a question name.
|
3707
|
+
* `options.index` - an index of the question in the container (page or panel).
|
3708
|
+
* `options.parentPanel` - a container where a new question is located. It can be a page or panel.
|
3709
|
+
* `options.rootPanel` - typically, it is a page.
|
3703
3710
|
*/
|
3704
3711
|
onQuestionAdded: EventBase<SurveyModel>;
|
3705
3712
|
/*
|
3706
3713
|
* The event is fired on removing a question from survey.
|
3707
|
-
*
|
3708
|
-
*
|
3709
|
-
*
|
3714
|
+
* `sender` - the survey object that fires the event.
|
3715
|
+
* `options.question` - a removed question object.
|
3716
|
+
* `options.name` - a question name.
|
3710
3717
|
*/
|
3711
3718
|
onQuestionRemoved: EventBase<SurveyModel>;
|
3712
3719
|
/*
|
3713
3720
|
* The event is fired on adding a panel into survey.
|
3714
|
-
*
|
3715
|
-
*
|
3716
|
-
*
|
3717
|
-
*
|
3718
|
-
*
|
3719
|
-
*
|
3721
|
+
* `sender` - the survey object that fires the event.
|
3722
|
+
* `options.panel` - a newly added panel object.
|
3723
|
+
* `options.name` - a panel name.
|
3724
|
+
* `options.index` - an index of the panel in the container (a page or panel).
|
3725
|
+
* `options.parentPanel` - a container (a page or panel) where a new panel is located.
|
3726
|
+
* `options.rootPanel` - a root container, typically it is a page.
|
3720
3727
|
*/
|
3721
3728
|
onPanelAdded: EventBase<SurveyModel>;
|
3722
3729
|
/*
|
3723
3730
|
* The event is fired on removing a panel from survey.
|
3724
|
-
*
|
3725
|
-
*
|
3726
|
-
*
|
3731
|
+
* `sender` - the survey object that fires the event.
|
3732
|
+
* `options.panel` - a removed panel object.
|
3733
|
+
* `options.name` - a panel name.
|
3727
3734
|
*/
|
3728
3735
|
onPanelRemoved: EventBase<SurveyModel>;
|
3729
3736
|
/*
|
3730
3737
|
* The event is fired on adding a page into survey.
|
3731
|
-
*
|
3732
|
-
*
|
3738
|
+
* `sender` - the survey object that fires the event.
|
3739
|
+
* `options.page` - a newly added `panel` object.
|
3733
3740
|
*/
|
3734
3741
|
onPageAdded: EventBase<SurveyModel>;
|
3735
3742
|
/*
|
3736
3743
|
* 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
|
-
*
|
3744
|
+
* `sender` - the survey object that fires the event.
|
3745
|
+
* `options.question` - a validated question.
|
3746
|
+
* `options.name` - a question name.
|
3747
|
+
* `options.value` - the current question value (answer).
|
3748
|
+
* `options.error` - an error string. It is empty by default.
|
3742
3749
|
*/
|
3743
3750
|
onValidateQuestion: EventBase<SurveyModel>;
|
3744
3751
|
/*
|
3745
3752
|
* The event is fired before errors are assigned to a question. You may add/remove/modify errors for a question.
|
3746
|
-
*
|
3747
|
-
*
|
3748
|
-
*
|
3753
|
+
* `sender` - the survey object that fires the event.
|
3754
|
+
* `options.question` - a validated question.
|
3755
|
+
* `options.errors` - the list of errors. The list is empty by default and remains empty if a validated question has no errors.
|
3749
3756
|
*/
|
3750
3757
|
onSettingQuestionErrors: EventBase<SurveyModel>;
|
3751
3758
|
/*
|
3752
3759
|
* Use this event to validate data on your server.
|
3753
|
-
*
|
3754
|
-
*
|
3755
|
-
*
|
3756
|
-
*
|
3760
|
+
* `sender` - the survey object that fires the event.
|
3761
|
+
* `options.data` - the values of all non-empty questions on the current page. You can get a question value as `options.data["myQuestionName"]`.
|
3762
|
+
* `options.errors` - set your errors to this object as: `options.errors["myQuestionName"] = "Error text";`. It will be shown as a question error.
|
3763
|
+
* `options.complete()` - call this function to tell survey that your server callback has been processed.
|
3757
3764
|
*/
|
3758
3765
|
onServerValidateQuestions: any;
|
3759
3766
|
/*
|
3760
3767
|
* 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
|
-
*
|
3768
|
+
* `sender` - the survey object that fires the event.
|
3769
|
+
* `options.name` - a panel name.
|
3770
|
+
* `options.error` - an error string. It is empty by default.
|
3764
3771
|
*/
|
3765
3772
|
onValidatePanel: EventBase<SurveyModel>;
|
3766
3773
|
/*
|
3767
3774
|
* Use the event to change the default error text.
|
3768
|
-
*
|
3769
|
-
*
|
3770
|
-
*
|
3771
|
-
*
|
3772
|
-
*
|
3775
|
+
* `sender` - the survey object that fires the event.
|
3776
|
+
* `options.text` - an error text.
|
3777
|
+
* `options.error` - an instance of the `SurveyError` object.
|
3778
|
+
* `options.obj` - an instance of Question, Panel or Survey object to where error is located.
|
3779
|
+
* `options.name` - the error name. The following error names are available:
|
3773
3780
|
* required, requireoneanswer, requirenumeric, exceedsize, webrequest, webrequestempty, otherempty,
|
3774
3781
|
* uploadingfile, requiredinallrowserror, minrowcounterror, keyduplicationerror, custom
|
3775
3782
|
*/
|
@@ -3788,201 +3795,201 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
|
|
3788
3795
|
onProcessHtml: EventBase<SurveyModel>;
|
3789
3796
|
/*
|
3790
3797
|
* 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
|
-
*
|
3798
|
+
* `sender` - the survey object that fires the event.
|
3799
|
+
* `options.title` - a calculated question title, based on question `title`, `name`.
|
3800
|
+
* `options.question` - a question object.
|
3794
3801
|
*/
|
3795
3802
|
onGetQuestionTitle: EventBase<SurveyModel>;
|
3796
3803
|
/*
|
3797
3804
|
* Use this event to change the element title tag name that renders by default.
|
3798
|
-
*
|
3799
|
-
*
|
3800
|
-
*
|
3805
|
+
* `sender` - the survey object that fires the event.
|
3806
|
+
* `options.element` - an element (question, panel, page and survey) that SurveyJS is going to render.
|
3807
|
+
* `options.tagName` - an element title tagName that are used to render a title. You can change it from the default value.
|
3801
3808
|
*/
|
3802
3809
|
onGetTitleTagName: EventBase<SurveyModel>;
|
3803
3810
|
/*
|
3804
3811
|
* 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
|
-
*
|
3812
|
+
* `sender` - the survey object that fires the event.
|
3813
|
+
* `options.no` - a calculated question no, based on question `visibleIndex`, survey `.questionStartIndex` properties. You can change it.
|
3814
|
+
* `options.question` - a question object.
|
3808
3815
|
*/
|
3809
3816
|
onGetQuestionNo: EventBase<SurveyModel>;
|
3810
3817
|
/*
|
3811
3818
|
* Use this event to change the progress text in code.
|
3812
|
-
*
|
3813
|
-
*
|
3814
|
-
*
|
3815
|
-
*
|
3816
|
-
*
|
3817
|
-
*
|
3819
|
+
* `sender` - the survey object that fires the event.
|
3820
|
+
* `options.text` - a progress text, that SurveyJS will render in progress bar.
|
3821
|
+
* `options.questionCount` - a number of questions that have input(s). We do not count html or expression questions
|
3822
|
+
* `options.answeredQuestionCount` - a number of questions that have input(s) and an user has answered.
|
3823
|
+
* `options.requiredQuestionCount` - a number of required questions that have input(s). We do not count html or expression questions
|
3824
|
+
* `options.requiredAnsweredQuestionCount` - a number of required questions that have input(s) and an user has answered.
|
3818
3825
|
*/
|
3819
3826
|
onProgressText: EventBase<SurveyModel>;
|
3820
3827
|
/*
|
3821
3828
|
* Use this event to process the markdown text.
|
3822
|
-
*
|
3823
|
-
*
|
3824
|
-
*
|
3825
|
-
*
|
3826
|
-
*
|
3829
|
+
* `sender` - the survey object that fires the event.
|
3830
|
+
* `options.element` - SurveyJS element (a question, panel, page, or survey) where the string is going to be rendered.
|
3831
|
+
* `options.name` - a property name is going to be rendered.
|
3832
|
+
* `options.text` - a text that is going to be rendered.
|
3833
|
+
* `options.html` - an HTML content. It is `null` by default. Use this property to specify the HTML content rendered instead of `options.text`.
|
3827
3834
|
*/
|
3828
3835
|
onTextMarkdown: EventBase<SurveyModel>;
|
3829
3836
|
/*
|
3830
3837
|
* Use this event to specity render component name used for text rendering.
|
3831
|
-
*
|
3832
|
-
*
|
3833
|
-
*
|
3834
|
-
*
|
3838
|
+
* `sender` - the survey object that fires the event.
|
3839
|
+
* `options.element` - SurveyJS element (a question, panel, page, or survey) where the string is going to be rendered.
|
3840
|
+
* `options.name` - a property name is going to be rendered.
|
3841
|
+
* `options.renderAs` - a component name used for text rendering.
|
3835
3842
|
*/
|
3836
3843
|
onTextRenderAs: EventBase<SurveyModel>;
|
3837
3844
|
/*
|
3838
3845
|
* 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
|
-
*
|
3846
|
+
* `sender` - the survey object that fires the event.
|
3847
|
+
* `options.success` - it is `true` if the results has been sent to the service successfully.
|
3848
|
+
* `options.response` - a response from the service.
|
3842
3849
|
*/
|
3843
3850
|
onSendResult: EventBase<SurveyModel>;
|
3844
3851
|
/*
|
3845
3852
|
* 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
|
-
*
|
3853
|
+
* `sender` - the survey object that fires the event.
|
3854
|
+
* `options.success` - it is `true` if the results were got from the service successfully.
|
3855
|
+
* `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.
|
3856
|
+
* `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.
|
3857
|
+
* `options.response` - the server response.
|
3851
3858
|
*/
|
3852
3859
|
onGetResult: EventBase<SurveyModel>;
|
3853
3860
|
/*
|
3854
3861
|
* 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
|
-
*
|
3862
|
+
* `sender` - the survey object that fires the event.
|
3863
|
+
* `options.question` - the file question instance.
|
3864
|
+
* `options.name` - the question name.
|
3865
|
+
* `options.files` - the Javascript File objects array to upload.
|
3866
|
+
* `options.callback` - a callback function to get the file upload status and the updloaded file content.
|
3860
3867
|
*/
|
3861
3868
|
onUploadFiles: EventBase<SurveyModel>;
|
3862
3869
|
/*
|
3863
3870
|
* 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
|
-
*
|
3871
|
+
* `sender` - the survey object that fires the event.
|
3872
|
+
* `options.name` - the question name.
|
3873
|
+
* `options.content` - the file content.
|
3874
|
+
* `options.fileValue` - single file question value.
|
3875
|
+
* `options.callback` - a callback function to get the file downloading status and the downloaded file content.
|
3869
3876
|
*/
|
3870
3877
|
onDownloadFile: EventBase<SurveyModel>;
|
3871
3878
|
/*
|
3872
3879
|
* 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
|
-
*
|
3880
|
+
* `sender` - the survey object that fires the event.
|
3881
|
+
* `question` - the question instance.
|
3882
|
+
* `options.name` - the question name.
|
3883
|
+
* `options.value` - the question value.
|
3884
|
+
* `options.fileName` - a removed file's name, set it to `null` to clear all files.
|
3885
|
+
* `options.callback` - a callback function to get the operation status.
|
3879
3886
|
*/
|
3880
3887
|
onClearFiles: EventBase<SurveyModel>;
|
3881
3888
|
/*
|
3882
3889
|
* 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
3890
|
* You may change the choices, before they are assigned or disable/enabled make visible/invisible question, based on loaded results.
|
3884
|
-
*
|
3885
|
-
*
|
3886
|
-
*
|
3887
|
-
*
|
3891
|
+
* `sender` - the survey object that fires the event.
|
3892
|
+
* `question` - the question where loaded choices are going to be assigned.
|
3893
|
+
* `choices` - the loaded choices. You can change the loaded choices to before they are assigned to question.
|
3894
|
+
* `serverResult` - a result that comes from the server as it is.
|
3888
3895
|
*/
|
3889
3896
|
onLoadChoicesFromServer: EventBase<SurveyModel>;
|
3890
3897
|
/*
|
3891
3898
|
* The event is fired after survey is loaded from api.surveyjs.io service.
|
3892
3899
|
* You can use this event to perform manipulation with the survey model after it was loaded from the web service.
|
3893
|
-
*
|
3900
|
+
* `sender` - the survey object that fires the event.
|
3894
3901
|
*/
|
3895
3902
|
onLoadedSurveyFromService: EventBase<SurveyModel>;
|
3896
3903
|
/*
|
3897
3904
|
* 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
3905
|
* For example, you may use the text processing in loading choices from the web. If your `choicesByUrl.url` equals to "UrlToServiceToGetAllCities/{country}/{state}",
|
3899
3906
|
* 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
|
-
*
|
3907
|
+
* `sender` - the survey object that fires the event.
|
3908
|
+
* `options.name` - the name of the processing value, for example, "state" in our example.
|
3909
|
+
* `options.value` - the value of the processing text.
|
3910
|
+
* `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
3911
|
*/
|
3905
3912
|
onProcessTextValue: EventBase<SurveyModel>;
|
3906
3913
|
/*
|
3907
3914
|
* The event is fired before rendering a question. Use it to override the default question CSS classes.
|
3908
|
-
*
|
3909
|
-
*
|
3910
|
-
*
|
3915
|
+
* `sender` - the survey object that fires the event.
|
3916
|
+
* `options.question` - a question for which you can change the CSS classes.
|
3917
|
+
* `options.cssClasses` - an object with CSS classes. For example `{root: "table", button: "button"}`. You can change them to your own CSS classes.
|
3911
3918
|
*/
|
3912
3919
|
onUpdateQuestionCssClasses: EventBase<SurveyModel>;
|
3913
3920
|
/*
|
3914
3921
|
* The event is fired before rendering a panel. Use it to override the default panel CSS classes.
|
3915
|
-
*
|
3916
|
-
*
|
3917
|
-
*
|
3922
|
+
* `sender` - the survey object that fires the event.
|
3923
|
+
* `options.panel` - a panel for which you can change the CSS classes.
|
3924
|
+
* `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
3925
|
*/
|
3919
3926
|
onUpdatePanelCssClasses: EventBase<SurveyModel>;
|
3920
3927
|
/*
|
3921
3928
|
* The event is fired before rendering a page. Use it to override the default page CSS classes.
|
3922
|
-
*
|
3923
|
-
*
|
3924
|
-
*
|
3929
|
+
* `sender` - the survey object that fires the event.
|
3930
|
+
* `options.page` - a page for which you can change the CSS classes.
|
3931
|
+
* `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
3932
|
*/
|
3926
3933
|
onUpdatePageCssClasses: EventBase<SurveyModel>;
|
3927
3934
|
/*
|
3928
3935
|
* 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
|
-
*
|
3936
|
+
* `sender` - the survey object that fires the event.
|
3937
|
+
* `options.question` - a question where choice item is rendered.
|
3938
|
+
* `options.item` - a choice item of ItemValue type. You can get value or text choice properties as options.item.value or options.choice.text
|
3939
|
+
* `options.css` - a string with css classes divided by space. You can change it.
|
3933
3940
|
*/
|
3934
3941
|
onUpdateChoiceItemCss: EventBase<SurveyModel>;
|
3935
3942
|
/*
|
3936
3943
|
* The event is fired right after survey is rendered in DOM.
|
3937
|
-
*
|
3938
|
-
*
|
3944
|
+
* `sender` - the survey object that fires the event.
|
3945
|
+
* `options.htmlElement` - a root HTML element bound to the survey object.
|
3939
3946
|
*/
|
3940
3947
|
onAfterRenderSurvey: EventBase<SurveyModel>;
|
3941
3948
|
/*
|
3942
3949
|
* The event is fired right after a page is rendered in DOM. Use it to modify HTML elements.
|
3943
|
-
*
|
3944
|
-
*
|
3950
|
+
* `sender` - the survey object that fires the event.
|
3951
|
+
* `options.htmlElement` - an HTML element bound to the survey header object.
|
3945
3952
|
*/
|
3946
3953
|
onAfterRenderHeader: EventBase<SurveyModel>;
|
3947
3954
|
/*
|
3948
3955
|
* The event is fired right after a page is rendered in DOM. Use it to modify HTML elements.
|
3949
|
-
*
|
3950
|
-
*
|
3951
|
-
*
|
3956
|
+
* `sender` - the survey object that fires the event.
|
3957
|
+
* `options.page` - a page object for which the event is fired. Typically the current/active page.
|
3958
|
+
* `options.htmlElement` - an HTML element bound to the page object.
|
3952
3959
|
*/
|
3953
3960
|
onAfterRenderPage: EventBase<SurveyModel>;
|
3954
3961
|
/*
|
3955
3962
|
* The event is fired right after a question is rendered in DOM. Use it to modify HTML elements.
|
3956
|
-
*
|
3957
|
-
*
|
3958
|
-
*
|
3963
|
+
* `sender` - the survey object that fires the event.
|
3964
|
+
* `options.question` - a question object for which the event is fired.
|
3965
|
+
* `options.htmlElement` - an HTML element bound to the question object.
|
3959
3966
|
*/
|
3960
3967
|
onAfterRenderQuestion: EventBase<SurveyModel>;
|
3961
3968
|
/*
|
3962
3969
|
* 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
3970
|
* This event is not fired for matrices, panels, multiple text and image picker.
|
3964
|
-
*
|
3965
|
-
*
|
3966
|
-
*
|
3971
|
+
* `sender` - the survey object that fires the event.
|
3972
|
+
* `options.question` - a question object for which the event is fired.
|
3973
|
+
* `options.htmlElement` - an HTML element bound to the question object.
|
3967
3974
|
*/
|
3968
3975
|
onAfterRenderQuestionInput: EventBase<SurveyModel>;
|
3969
3976
|
/*
|
3970
3977
|
* The event is fired right after a panel is rendered in DOM. Use it to modify HTML elements.
|
3971
|
-
*
|
3972
|
-
*
|
3973
|
-
*
|
3978
|
+
* `sender` - the survey object that fires the event
|
3979
|
+
* `options.panel` - a panel object for which the event is fired
|
3980
|
+
* `options.htmlElement` - an HTML element bound to the panel object
|
3974
3981
|
*/
|
3975
3982
|
onAfterRenderPanel: EventBase<SurveyModel>;
|
3976
3983
|
/*
|
3977
3984
|
* The event occurs when an element within a question gets focus.
|
3978
|
-
*
|
3979
|
-
*
|
3985
|
+
* `sender` - A [survey](https://surveyjs.io/Documentation/Library?id=surveymodel) object that fires the event.
|
3986
|
+
* `options.question` - A [question](https://surveyjs.io/Documentation/Library?id=Question) whose child element gets focus.
|
3980
3987
|
*/
|
3981
3988
|
onFocusInQuestion: EventBase<SurveyModel>;
|
3982
3989
|
/*
|
3983
3990
|
* The event occurs when an element within a panel gets focus.
|
3984
|
-
*
|
3985
|
-
*
|
3991
|
+
* `sender` - A [survey](https://surveyjs.io/Documentation/Library?id=surveymodel) object that fires the event.
|
3992
|
+
* `options.panel` - A [panel](https://surveyjs.io/Documentation/Library?id=PanelModelBase) whose child element gets focus.
|
3986
3993
|
*/
|
3987
3994
|
onFocusInPanel: EventBase<SurveyModel>;
|
3988
3995
|
/*
|
@@ -3998,123 +4005,123 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
|
|
3998
4005
|
onShowingChoiceItem: EventBase<SurveyModel>;
|
3999
4006
|
/*
|
4000
4007
|
* The event is fired on adding a new row in Matrix Dynamic question.
|
4001
|
-
*
|
4002
|
-
*
|
4003
|
-
*
|
4008
|
+
* `sender` - the survey object that fires the event
|
4009
|
+
* `options.question` - a matrix question.
|
4010
|
+
* `options.row` - a new added row.
|
4004
4011
|
*/
|
4005
4012
|
onMatrixRowAdded: EventBase<SurveyModel>;
|
4006
4013
|
/*
|
4007
4014
|
* The event is fired before adding a new row in Matrix Dynamic question.
|
4008
|
-
*
|
4009
|
-
*
|
4010
|
-
*
|
4015
|
+
* `sender` - the survey object that fires the event
|
4016
|
+
* `options.question` - a matrix question.
|
4017
|
+
* `options.canAddRow` - specifies whether a new row can be added
|
4011
4018
|
*/
|
4012
4019
|
onMatrixBeforeRowAdded: EventBase<SurveyModel>;
|
4013
4020
|
/*
|
4014
4021
|
* 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
|
-
*
|
4022
|
+
* `sender` - the survey object that fires the event
|
4023
|
+
* `options.question` - a matrix question.
|
4024
|
+
* `options.rowIndex` - a row index.
|
4025
|
+
* `options.row` - a row object.
|
4026
|
+
* `options.allow` - a boolean property. Set it to `false` to disable the row removing.
|
4020
4027
|
*/
|
4021
4028
|
onMatrixRowRemoving: EventBase<SurveyModel>;
|
4022
4029
|
/*
|
4023
4030
|
* The event is fired on removing a row from Matrix Dynamic question.
|
4024
|
-
*
|
4025
|
-
*
|
4026
|
-
*
|
4027
|
-
*
|
4031
|
+
* `sender` - the survey object that fires the event
|
4032
|
+
* `options.question` - a matrix question
|
4033
|
+
* `options.rowIndex` - a removed row index
|
4034
|
+
* `options.row` - a removed row object
|
4028
4035
|
*/
|
4029
4036
|
onMatrixRowRemoved: EventBase<SurveyModel>;
|
4030
4037
|
/*
|
4031
4038
|
* The event is fired before rendering "Remove" button for removing a row from Matrix Dynamic question.
|
4032
|
-
*
|
4033
|
-
*
|
4034
|
-
*
|
4035
|
-
*
|
4036
|
-
*
|
4039
|
+
* `sender` - the survey object that fires the event
|
4040
|
+
* `options.question` - a matrix question.
|
4041
|
+
* `options.rowIndex` - a row index.
|
4042
|
+
* `options.row` - a row object.
|
4043
|
+
* `options.allow` - a boolean property. Set it to `false` to disable the row removing.
|
4037
4044
|
*/
|
4038
4045
|
onMatrixAllowRemoveRow: EventBase<SurveyModel>;
|
4039
4046
|
/*
|
4040
4047
|
* 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
|
-
*
|
4048
|
+
* `sender` - the survey object that fires the event.
|
4049
|
+
* `options.question` - the matrix question.
|
4050
|
+
* `options.cellType` - the cell question type. You can change it.
|
4051
|
+
* `options.rowValue` - the value of the current row. To access a particular column's value within the current row, use: `options.rowValue["columnValue"]`.
|
4052
|
+
* `options.column` - the matrix column object.
|
4053
|
+
* `options.columnName` - the matrix column name.
|
4054
|
+
* `options.row` - the matrix row object.
|
4048
4055
|
*/
|
4049
4056
|
onMatrixCellCreating: EventBase<SurveyModel>;
|
4050
4057
|
/*
|
4051
4058
|
* The event is fired for every cell created in Matrix Dynamic and Matrix Dropdown questions.
|
4052
|
-
*
|
4053
|
-
*
|
4054
|
-
*
|
4055
|
-
*
|
4056
|
-
*
|
4057
|
-
*
|
4058
|
-
*
|
4059
|
-
*
|
4059
|
+
* `sender` - the survey object that fires the event.
|
4060
|
+
* `options.question` - the matrix question.
|
4061
|
+
* `options.cell` - the matrix cell.
|
4062
|
+
* `options.cellQuestion` - the question/editor in the cell. You may customize it, change it's properties, like choices or visible.
|
4063
|
+
* `options.rowValue` - the value of the current row. To access a particular column's value within the current row, use: `options.rowValue["columnValue"]`.
|
4064
|
+
* `options.column` - the matrix column object.
|
4065
|
+
* `options.columnName` - the matrix column name.
|
4066
|
+
* `options.row` - the matrix row object.
|
4060
4067
|
*/
|
4061
4068
|
onMatrixCellCreated: EventBase<SurveyModel>;
|
4062
4069
|
/*
|
4063
4070
|
* The event is fired for every cell after is has been rendered in DOM.
|
4064
|
-
*
|
4065
|
-
*
|
4066
|
-
*
|
4067
|
-
*
|
4068
|
-
*
|
4069
|
-
*
|
4070
|
-
*
|
4071
|
+
* `sender` - the survey object that fires the event.
|
4072
|
+
* `options.question` - the matrix question.
|
4073
|
+
* `options.cell` - the matrix cell.
|
4074
|
+
* `options.cellQuestion` - the question/editor in the cell.
|
4075
|
+
* `options.htmlElement` - an HTML element bound to the `cellQuestion` object.
|
4076
|
+
* `options.column` - the matrix column object.
|
4077
|
+
* `options.row` - the matrix row object.
|
4071
4078
|
*/
|
4072
4079
|
onMatrixAfterCellRender: EventBase<SurveyModel>;
|
4073
4080
|
/*
|
4074
4081
|
* The event is fired when cell value is changed in Matrix Dynamic and Matrix Dropdown questions.
|
4075
|
-
*
|
4076
|
-
*
|
4077
|
-
*
|
4078
|
-
*
|
4079
|
-
*
|
4080
|
-
*
|
4082
|
+
* `sender` - the survey object that fires the event.
|
4083
|
+
* `options.question` - the matrix question.
|
4084
|
+
* `options.columnName` - the matrix column name.
|
4085
|
+
* `options.value` - a new value.
|
4086
|
+
* `options.row` - the matrix row object.
|
4087
|
+
* `options.getCellQuestion(columnName)` - the function that returns the cell question by column name.
|
4081
4088
|
*/
|
4082
4089
|
onMatrixCellValueChanged: EventBase<SurveyModel>;
|
4083
4090
|
/*
|
4084
4091
|
* 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
|
-
*
|
4092
|
+
* `sender` - the survey object that fires the event.
|
4093
|
+
* `options.question` - the matrix question.
|
4094
|
+
* `options.columnName` - the matrix column name.
|
4095
|
+
* `options.value` - a new value.
|
4096
|
+
* `options.oldValue` - the old value.
|
4097
|
+
* `options.row` - the matrix row object.
|
4098
|
+
* `options.getCellQuestion(columnName)` - the function that returns a cell question by column name.
|
4092
4099
|
*/
|
4093
4100
|
onMatrixCellValueChanging: EventBase<SurveyModel>;
|
4094
4101
|
/*
|
4095
4102
|
* The event is fired when Matrix Dynamic and Matrix Dropdown questions validate the cell value.
|
4096
|
-
*
|
4097
|
-
*
|
4098
|
-
*
|
4099
|
-
*
|
4100
|
-
*
|
4101
|
-
*
|
4102
|
-
*
|
4103
|
+
* `sender` - the survey object that fires the event.
|
4104
|
+
* `options.error` - an error string. It is empty by default.
|
4105
|
+
* `options.question` - the matrix question.
|
4106
|
+
* `options.columnName` - the matrix column name.
|
4107
|
+
* `options.value` - a cell value.
|
4108
|
+
* `options.row` - the matrix row object.
|
4109
|
+
* `options.getCellQuestion(columnName)` - the function that returns the cell question by column name.
|
4103
4110
|
*/
|
4104
4111
|
onMatrixCellValidate: EventBase<SurveyModel>;
|
4105
4112
|
/*
|
4106
4113
|
* The event is fired on adding a new panel in Panel Dynamic question.
|
4107
|
-
*
|
4108
|
-
*
|
4109
|
-
*
|
4114
|
+
* `sender` - the survey object that fires the event.
|
4115
|
+
* `options.question` - a panel question.
|
4116
|
+
* `options.panel` - an added panel.
|
4110
4117
|
*/
|
4111
4118
|
onDynamicPanelAdded: EventBase<SurveyModel>;
|
4112
4119
|
/*
|
4113
4120
|
* The event is fired on removing a panel from Panel Dynamic question.
|
4114
|
-
*
|
4115
|
-
*
|
4116
|
-
*
|
4117
|
-
*
|
4121
|
+
* `sender` - the survey object that fires the event.
|
4122
|
+
* `options.question` - a panel question.
|
4123
|
+
* `options.panelIndex` - a removed panel index.
|
4124
|
+
* `options.panel` - a removed panel.
|
4118
4125
|
*/
|
4119
4126
|
onDynamicPanelRemoved: EventBase<SurveyModel>;
|
4120
4127
|
/*
|
@@ -4123,92 +4130,92 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
|
|
4123
4130
|
onTimer: EventBase<SurveyModel>;
|
4124
4131
|
/*
|
4125
4132
|
* The event is fired before displaying a new information in the Timer Panel. Use it to change the default text.
|
4126
|
-
*
|
4127
|
-
*
|
4133
|
+
* `sender` - the survey object that fires the event.
|
4134
|
+
* `options.text` - the timer panel info text.
|
4128
4135
|
*/
|
4129
4136
|
onTimerPanelInfoText: EventBase<SurveyModel>;
|
4130
4137
|
/*
|
4131
4138
|
* The event is fired when item value is changed in Panel Dynamic question.
|
4132
|
-
*
|
4133
|
-
*
|
4134
|
-
*
|
4135
|
-
*
|
4136
|
-
*
|
4137
|
-
*
|
4138
|
-
*
|
4139
|
+
* `sender` - the survey object that fires the event.
|
4140
|
+
* `options.question` - the panel question.
|
4141
|
+
* `options.panel` - the dynamic panel item.
|
4142
|
+
* `options.name` - the item name.
|
4143
|
+
* `options.value` - a new value.
|
4144
|
+
* `options.itemIndex` - the panel item index.
|
4145
|
+
* `options.itemValue` - the panel item object.
|
4139
4146
|
*/
|
4140
4147
|
onDynamicPanelItemValueChanged: EventBase<SurveyModel>;
|
4141
4148
|
/*
|
4142
4149
|
* Use this event to define, whether an answer to a question is correct or not.
|
4143
|
-
*
|
4144
|
-
*
|
4145
|
-
*
|
4146
|
-
*
|
4150
|
+
* `sender` - the survey object that fires the event.
|
4151
|
+
* `options.question` - a question on which you have to decide if the answer is correct or not.
|
4152
|
+
* `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.
|
4153
|
+
* `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
4154
|
*/
|
4148
4155
|
onIsAnswerCorrect: EventBase<SurveyModel>;
|
4149
4156
|
/*
|
4150
4157
|
* Use this event to control drag&drop operations during design mode.
|
4151
|
-
*
|
4152
|
-
*
|
4153
|
-
*
|
4154
|
-
*
|
4155
|
-
*
|
4156
|
-
*
|
4157
|
-
*
|
4158
|
+
* `sender` - the survey object that fires the event.
|
4159
|
+
* `options.allow` - set it to `false` to disable dragging.
|
4160
|
+
* `options.target` - a target element that is dragged.
|
4161
|
+
* `options.source` - a source element. It can be `null`, if it is a new element, dragging from toolbox.
|
4162
|
+
* `options.parent` - a page or panel where target element is dragging.
|
4163
|
+
* `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.
|
4164
|
+
* `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
4165
|
*/
|
4159
4166
|
onDragDropAllow: EventBase<SurveyModel>;
|
4160
4167
|
/*
|
4161
4168
|
* 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
|
-
*
|
4169
|
+
* `sender` - the survey object that fires the event.
|
4170
|
+
* `options.element` - an element that is going to be scrolled on top.
|
4171
|
+
* `options.question` - a question that is going to be scrolled on top. It can be null if options.page is not null.
|
4172
|
+
* `options.page` - a page that is going to be scrolled on top. It can be null if options.question is not null.
|
4173
|
+
* `options.elementId` - the unique element DOM Id.
|
4174
|
+
* `options.cancel` - set this property to true to cancel the default scrolling.
|
4168
4175
|
*/
|
4169
4176
|
onScrollingElementToTop: EventBase<SurveyModel>;
|
4170
4177
|
onLocaleChangedEvent: EventBase<SurveyModel>;
|
4171
4178
|
/*
|
4172
4179
|
* Use this event to create/customize actions to be displayed in a question's title.
|
4173
|
-
*
|
4174
|
-
*
|
4175
|
-
*
|
4180
|
+
* `sender` - A [Survey](https://surveyjs.io/Documentation/Library?id=SurveyModel) object that fires the event.
|
4181
|
+
* `options.question` - A [Question](https://surveyjs.io/Documentation/Library?id=Question) object for which the event is fired.
|
4182
|
+
* `options.titleActions` - A list of actions ([IAction](https://surveyjs.io/Documentation/Library?id=IAction) objects) associated with the processed question.
|
4176
4183
|
*/
|
4177
4184
|
onGetQuestionTitleActions: EventBase<SurveyModel>;
|
4178
4185
|
/*
|
4179
4186
|
* Use this event to create/customize actions to be displayed in a panel's title.
|
4180
|
-
*
|
4181
|
-
*
|
4182
|
-
*
|
4187
|
+
* `sender` - A survey object that fires the event.
|
4188
|
+
* `options.panel` - A panel ([PanelModel](https://surveyjs.io/Documentation/Library?id=panelmodel) object) for which the event is fired.
|
4189
|
+
* `options.titleActions` - A list of actions ([IAction](https://surveyjs.io/Documentation/Library?id=IAction) objects) associated with the processed panel.
|
4183
4190
|
*/
|
4184
4191
|
onGetPanelTitleActions: EventBase<SurveyModel>;
|
4185
4192
|
/*
|
4186
4193
|
* Use this event to create/customize actions to be displayed in a page's title.
|
4187
|
-
*
|
4188
|
-
*
|
4189
|
-
*
|
4194
|
+
* `sender` - A survey object that fires the event.
|
4195
|
+
* `options.page` - A page ([PageModel](https://surveyjs.io/Documentation/Library?id=pagemodel) object) for which the event is fired.
|
4196
|
+
* `options.titleActions` - A list of actions ([IAction](https://surveyjs.io/Documentation/Library?id=IAction) objects) associated with the processed page.
|
4190
4197
|
*/
|
4191
4198
|
onGetPageTitleActions: EventBase<SurveyModel>;
|
4192
4199
|
/*
|
4193
4200
|
* Use this event to create/customize actions to be displayed in a matrix question's row.
|
4194
|
-
*
|
4195
|
-
*
|
4196
|
-
*
|
4197
|
-
*
|
4201
|
+
* `sender` - A survey object that fires the event.
|
4202
|
+
* `options.question` - A matrix question ([QuestionMatrixBaseModel](https://surveyjs.io/Documentation/Library?id=questionmatrixbasemodel) object) for which the event is fired.
|
4203
|
+
* `options.row` - A matrix row for which the event is fired.
|
4204
|
+
* `options.actions` - A list of actions ([IAction](https://surveyjs.io/Documentation/Library?id=IAction) objects) associated with the processed matrix question and row.
|
4198
4205
|
*/
|
4199
4206
|
onGetMatrixRowActions: EventBase<SurveyModel>;
|
4200
4207
|
/*
|
4201
4208
|
* The event is fired after the survey element content was collapsed or expanded.
|
4202
|
-
*
|
4203
|
-
*
|
4209
|
+
* `sender` - the survey object that fires the event.
|
4210
|
+
* `options.element` - Specifies which survey element content was collapsed or expanded.
|
4204
4211
|
*/
|
4205
4212
|
onElementContentVisibilityChanged: EventBase<SurveyModel>;
|
4206
4213
|
/*
|
4207
4214
|
* The event is fired before expression question convert it's value into display value for rendering.
|
4208
|
-
*
|
4209
|
-
*
|
4210
|
-
*
|
4211
|
-
*
|
4215
|
+
* `sender` - the survey object that fires the event.
|
4216
|
+
* `options.question` - The expression question.
|
4217
|
+
* `options.value` - The question value.
|
4218
|
+
* `options.displayValue` - the display value that you can change before rendering.
|
4212
4219
|
*/
|
4213
4220
|
onGetExpressionDisplayValue: EventBase<SurveyModel>;
|
4214
4221
|
/*
|
@@ -6113,9 +6120,9 @@ export declare class Question extends SurveyElement implements IQuestion, ICondi
|
|
6113
6120
|
commentElement: any;
|
6114
6121
|
/*
|
6115
6122
|
* The event is fired when isReady property of question is changed.
|
6116
|
-
*
|
6117
|
-
*
|
6118
|
-
*
|
6123
|
+
* options.question - the question
|
6124
|
+
* options.isReady - current value of isReady
|
6125
|
+
* options.oldIsReady - old value of isReady
|
6119
6126
|
*/
|
6120
6127
|
onReadyChanged: EventBase<Question>;
|
6121
6128
|
isReadOnlyRenderDiv(): boolean;
|
@@ -6335,6 +6342,8 @@ export declare class Question extends SurveyElement implements IQuestion, ICondi
|
|
6335
6342
|
showErrorOnCore(location: string): boolean;
|
6336
6343
|
get showErrorOnTop(): boolean;
|
6337
6344
|
get showErrorOnBottom(): boolean;
|
6345
|
+
get showErrorsAboveQuestion(): boolean;
|
6346
|
+
get showErrorsBelowQuestion(): boolean;
|
6338
6347
|
get cssError(): string;
|
6339
6348
|
protected setCssError(val: string): void;
|
6340
6349
|
protected getCssError(cssClasses: any): string;
|
@@ -6843,6 +6852,7 @@ export declare class PageModel extends PanelModelBase implements IPage {
|
|
6843
6852
|
get isStarted(): boolean;
|
6844
6853
|
protected calcCssClasses(css: any): any;
|
6845
6854
|
get cssTitle(): string;
|
6855
|
+
get cssRoot(): string;
|
6846
6856
|
num: number;
|
6847
6857
|
/*
|
6848
6858
|
* 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 +7127,7 @@ export declare class QuestionExpressionModel extends Question {
|
|
7117
7127
|
get locFormat(): LocalizableString;
|
7118
7128
|
/*
|
7119
7129
|
* 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
|
-
*
|
7130
|
+
* Example: "({quantity} * {price}) * (100 - {discount}) / 100"
|
7121
7131
|
*/
|
7122
7132
|
get expression(): string;
|
7123
7133
|
set expression(val: string);
|
@@ -7170,8 +7180,8 @@ export declare class QuestionFileModel extends Question {
|
|
7170
7180
|
isDragging: boolean;
|
7171
7181
|
/*
|
7172
7182
|
* The event is fired after question state has been changed.
|
7173
|
-
*
|
7174
|
-
*
|
7183
|
+
* sender the question object that fires the event
|
7184
|
+
* options.state new question state value.
|
7175
7185
|
*/
|
7176
7186
|
onStateChanged: EventBase<QuestionFileModel>;
|
7177
7187
|
previewValue: any;
|
@@ -7388,6 +7398,15 @@ export declare class QuestionMatrixBaseModel<TRow, TColumn> extends Question {
|
|
7388
7398
|
clearIncorrectValues(): void;
|
7389
7399
|
protected clearInvisibleValuesInRows(): void;
|
7390
7400
|
needResponsiveWidth(): boolean;
|
7401
|
+
getTableCss(): string;
|
7402
|
+
/*
|
7403
|
+
* Aligns matrix cell content in the vertical direction.
|
7404
|
+
*/
|
7405
|
+
verticalAlign: "top" | "middle";
|
7406
|
+
/*
|
7407
|
+
* Specifies whether to apply shading to alternate matrix rows.
|
7408
|
+
*/
|
7409
|
+
alternateRows: boolean;
|
7391
7410
|
}
|
7392
7411
|
/*
|
7393
7412
|
* A Model for a multiple text question.
|
@@ -7614,10 +7633,10 @@ export declare class QuestionPanelDynamicModel extends Question implements IQues
|
|
7614
7633
|
set panelCount(val: number);
|
7615
7634
|
/*
|
7616
7635
|
* 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
|
-
*
|
7636
|
+
* default - the default value. User can't collapse/expand panels
|
7637
|
+
* expanded - User can collapse/expand panels and all panels are expanded by default
|
7638
|
+
* collapsed - User can collapse/expand panels and all panels are collapsed by default
|
7639
|
+
* firstExpanded - User can collapse/expand panels. The first panel is expanded and others are collapsed
|
7621
7640
|
*/
|
7622
7641
|
get panelsState(): string;
|
7623
7642
|
set panelsState(val: string);
|
@@ -7833,13 +7852,8 @@ export declare class QuestionRatingModel extends Question {
|
|
7833
7852
|
get hasMinLabel(): boolean;
|
7834
7853
|
get hasMaxLabel(): boolean;
|
7835
7854
|
/*
|
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.
|
7855
|
+
* 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.
|
7856
|
+
* 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
7857
|
*/
|
7844
7858
|
displayRateDescriptionsAsExtremeItems: boolean;
|
7845
7859
|
useDropdown: "auto" | "always" | "never";
|
@@ -8142,13 +8156,15 @@ export declare class QuestionSignaturePadModel extends Question {
|
|
8142
8156
|
/*
|
8143
8157
|
* Use it to set the specific width for the signature pad.
|
8144
8158
|
*/
|
8145
|
-
get
|
8146
|
-
set
|
8159
|
+
get signatureWidth(): number;
|
8160
|
+
set signatureWidth(val: number);
|
8147
8161
|
/*
|
8148
8162
|
* Use it to set the specific height for the signature pad.
|
8149
8163
|
*/
|
8150
|
-
get
|
8151
|
-
set
|
8164
|
+
get signatureHeight(): number;
|
8165
|
+
set signatureHeight(val: number);
|
8166
|
+
get height(): number;
|
8167
|
+
set height(val: number);
|
8152
8168
|
/*
|
8153
8169
|
* Use it to clear content of the signature pad.
|
8154
8170
|
*/
|
@@ -8171,6 +8187,7 @@ export declare class QuestionSignaturePadModel extends Question {
|
|
8171
8187
|
get clearButtonCaption(): string;
|
8172
8188
|
needShowPlaceholder(): boolean;
|
8173
8189
|
get placeHolderText(): string;
|
8190
|
+
endLoadingFromJson(): void;
|
8174
8191
|
}
|
8175
8192
|
/*
|
8176
8193
|
* A Base Model for a comment and text questions
|
@@ -8587,6 +8604,7 @@ export declare class QuestionMatrixDropdownModelBase extends QuestionMatrixBaseM
|
|
8587
8604
|
get allowAdaptiveActions(): boolean;
|
8588
8605
|
set allowAdaptiveActions(val: boolean);
|
8589
8606
|
getRequiredText(): string;
|
8607
|
+
hasChoices(): boolean;
|
8590
8608
|
onColumnPropertyChanged(column: MatrixDropdownColumn, name: string, newValue: any): void;
|
8591
8609
|
onColumnItemValuePropertyChanged(column: MatrixDropdownColumn, propertyName: string, obj: ItemValue, name: string, newValue: any, oldValue: any): void;
|
8592
8610
|
onShowInMultipleColumnsChanged(column: MatrixDropdownColumn): void;
|
@@ -8909,6 +8927,12 @@ export declare class QuestionCheckboxModel extends QuestionCheckboxBase {
|
|
8909
8927
|
protected onCreating(): void;
|
8910
8928
|
protected getFirstInputElementId(): string;
|
8911
8929
|
/*
|
8930
|
+
* Set this property if you want to store the checkbox value as array of objects instead of array of values
|
8931
|
+
* For example: if "valuePropertyName" equals car, then instead of having ["Ford", "Tesla"], you will have [{car: "Ford"}, {car: "Tesla"}]
|
8932
|
+
*/
|
8933
|
+
get valuePropertyName(): string;
|
8934
|
+
set valuePropertyName(val: string);
|
8935
|
+
/*
|
8912
8936
|
* Returns the select all item. By using this property, you may change programmatically it's value and text.
|
8913
8937
|
*/
|
8914
8938
|
get selectAllItem(): ItemValue;
|
@@ -8976,6 +9000,10 @@ export declare class QuestionCheckboxModel extends QuestionCheckboxBase {
|
|
8976
9000
|
protected setDefaultValueWithOthers(): void;
|
8977
9001
|
protected getHasOther(val: any): boolean;
|
8978
9002
|
protected valueFromData(val: any): any;
|
9003
|
+
protected rendredValueFromData(val: any): any;
|
9004
|
+
protected rendredValueToData(val: any): any;
|
9005
|
+
protected convertValueFromObject(val: any): any;
|
9006
|
+
protected convertValueToObject(val: any): any;
|
8979
9007
|
protected renderedValueFromDataCore(val: any): any;
|
8980
9008
|
protected rendredValueToDataCore(val: any): any;
|
8981
9009
|
get checkBoxSvgPath(): string;
|
@@ -9209,7 +9237,7 @@ export declare class QuestionMatrixDynamicModel extends QuestionMatrixDropdownMo
|
|
9209
9237
|
set addRowText(val: string);
|
9210
9238
|
get locAddRowText(): LocalizableString;
|
9211
9239
|
/*
|
9212
|
-
* By default the 'Add Row' button is shown on bottom if columnLayout is horizontal and on top if columnLayout is vertical.
|
9240
|
+
* By default the 'Add Row' button is shown on bottom if columnLayout is horizontal and on top if columnLayout is vertical.
|
9213
9241
|
* You may set it to "top", "bottom" or "topBottom" (to show on top and bottom).
|
9214
9242
|
*/
|
9215
9243
|
get addRowLocation(): string;
|
@@ -9546,6 +9574,8 @@ export declare var registerFunction: (name: string, func: any) => any;
|
|
9546
9574
|
export declare var parse: any;
|
9547
9575
|
export declare var defaultActionBarCss: {
|
9548
9576
|
root: string,
|
9577
|
+
defaultSizeMode: string,
|
9578
|
+
smallSizeMode: string,
|
9549
9579
|
item: string,
|
9550
9580
|
itemActive: string,
|
9551
9581
|
itemPressed: string,
|
@@ -10586,6 +10616,7 @@ export declare var defaultV2Css: {
|
|
10586
10616
|
logo: string,
|
10587
10617
|
logoImage: string,
|
10588
10618
|
headerText: string,
|
10619
|
+
headerClose: string,
|
10589
10620
|
navigationButton: string,
|
10590
10621
|
bodyNavigationButton: string,
|
10591
10622
|
completedPage: string,
|
@@ -10662,6 +10693,7 @@ export declare var defaultV2Css: {
|
|
10662
10693
|
progressTextInBar: string,
|
10663
10694
|
page: {
|
10664
10695
|
root: string,
|
10696
|
+
emptyHeaderRoot: string,
|
10665
10697
|
title: string,
|
10666
10698
|
description: string,
|
10667
10699
|
},
|
@@ -10721,7 +10753,9 @@ export declare var defaultV2Css: {
|
|
10721
10753
|
icon: string,
|
10722
10754
|
item: string,
|
10723
10755
|
tooltip: string,
|
10756
|
+
outsideQuestion: string,
|
10724
10757
|
aboveQuestion: string,
|
10758
|
+
belowQuestion: string,
|
10725
10759
|
locationTop: string,
|
10726
10760
|
locationBottom: string,
|
10727
10761
|
},
|
@@ -10857,9 +10891,14 @@ export declare var defaultV2Css: {
|
|
10857
10891
|
mainRoot: string,
|
10858
10892
|
tableWrapper: string,
|
10859
10893
|
root: string,
|
10894
|
+
rootVerticalAlignTop: string,
|
10895
|
+
rootVerticalAlignMiddle: string,
|
10896
|
+
rootAlternateRows: string,
|
10860
10897
|
rowError: string,
|
10861
10898
|
cell: string,
|
10899
|
+
row: string,
|
10862
10900
|
headerCell: string,
|
10901
|
+
rowTextCell: string,
|
10863
10902
|
label: string,
|
10864
10903
|
itemOnError: string,
|
10865
10904
|
itemValue: string,
|
@@ -10877,7 +10916,11 @@ export declare var defaultV2Css: {
|
|
10877
10916
|
mainRoot: string,
|
10878
10917
|
rootScroll: string,
|
10879
10918
|
root: string,
|
10919
|
+
rootVerticalAlignTop: string,
|
10920
|
+
rootVerticalAlignMiddle: string,
|
10921
|
+
rootAlternateRows: string,
|
10880
10922
|
cell: string,
|
10923
|
+
row: string,
|
10881
10924
|
headerCell: string,
|
10882
10925
|
rowTextCell: string,
|
10883
10926
|
cellRequiredText: string,
|
@@ -10898,6 +10941,7 @@ export declare var defaultV2Css: {
|
|
10898
10941
|
empty: string,
|
10899
10942
|
root: string,
|
10900
10943
|
cell: string,
|
10944
|
+
row: string,
|
10901
10945
|
headerCell: string,
|
10902
10946
|
rowTextCell: string,
|
10903
10947
|
cellRequiredText: string,
|