survey-react 1.9.79 → 1.9.81
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 +192 -35
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +65 -10
- package/modern.css.map +1 -1
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/survey.css +49 -4
- package/survey.css.map +1 -1
- package/survey.min.css +2 -2
- package/survey.react.d.ts +331 -143
- package/survey.react.js +1533 -768
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +3 -3
package/survey.react.d.ts
CHANGED
@@ -10,6 +10,16 @@ declare module "settings" {
|
|
10
10
|
* ```
|
11
11
|
*/
|
12
12
|
export var settings: {
|
13
|
+
/**
|
14
|
+
* Specifies an action to perform when users press the Enter key within a survey.
|
15
|
+
*
|
16
|
+
* Possible values:
|
17
|
+
*
|
18
|
+
* - `"moveToNextEditor"` - Moves focus to the next editor.
|
19
|
+
* - `"loseFocus"` - Removes focus from the current editor.
|
20
|
+
* - `"default"` - Behaves as a standard `<input>` element.
|
21
|
+
*/
|
22
|
+
enterKeyAction: "default" | "moveToNextEditor" | "loseFocus";
|
13
23
|
/**
|
14
24
|
* An object that configures string comparison.
|
15
25
|
*
|
@@ -369,6 +379,23 @@ declare module "settings" {
|
|
369
379
|
inputTypes: string[];
|
370
380
|
dataList: string[];
|
371
381
|
};
|
382
|
+
/**
|
383
|
+
* Contains properties that apply to [Single-Choice](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-question-model), [Multiple-Choice](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-with-dropdown-list), and [Dynamic Matrix](https://surveyjs.io/form-library/documentation/api-reference/dynamic-matrix-table-question-model) questions.
|
384
|
+
*
|
385
|
+
* Nested properties:
|
386
|
+
*
|
387
|
+
* - `columnWidthsByType`: `Object`\
|
388
|
+
* An object that specifies fixed and minimum column width based on the column type.\
|
389
|
+
* Example: `settings.matrix.columnWidthsByType = { "tagbox": { minWidth: "240px", width: "300px" } }`
|
390
|
+
*/
|
391
|
+
matrix: {
|
392
|
+
columnWidthsByType: {
|
393
|
+
[index: string]: {
|
394
|
+
minWidth?: string;
|
395
|
+
width?: string;
|
396
|
+
};
|
397
|
+
};
|
398
|
+
};
|
372
399
|
};
|
373
400
|
}
|
374
401
|
declare module "helpers" {
|
@@ -422,6 +449,7 @@ declare module "localization/english" {
|
|
422
449
|
progressText: string;
|
423
450
|
indexText: string;
|
424
451
|
panelDynamicProgressText: string;
|
452
|
+
panelDynamicTabTextFormat: string;
|
425
453
|
questionsProgressText: string;
|
426
454
|
emptySurvey: string;
|
427
455
|
completingSurvey: string;
|
@@ -530,6 +558,7 @@ declare module "surveyStrings" {
|
|
530
558
|
progressText: string;
|
531
559
|
indexText: string;
|
532
560
|
panelDynamicProgressText: string;
|
561
|
+
panelDynamicTabTextFormat: string;
|
533
562
|
questionsProgressText: string;
|
534
563
|
emptySurvey: string;
|
535
564
|
completingSurvey: string;
|
@@ -821,7 +850,6 @@ declare module "jsonobject" {
|
|
821
850
|
settingValue(obj: any, value: any): any;
|
822
851
|
setValue(obj: any, value: any, jsonConv: JsonObject): void;
|
823
852
|
getObjType(objType: string): string;
|
824
|
-
getClassName(className: string): string;
|
825
853
|
/**
|
826
854
|
* Depricated, please use getChoices
|
827
855
|
*/
|
@@ -987,6 +1015,7 @@ declare module "jsonobject" {
|
|
987
1015
|
private removePosFromObj;
|
988
1016
|
private isValueArray;
|
989
1017
|
private createNewObj;
|
1018
|
+
private getClassNameForNewObj;
|
990
1019
|
private checkNewObjectOnErrors;
|
991
1020
|
private getRequiredError;
|
992
1021
|
private addNewError;
|
@@ -1471,6 +1500,7 @@ declare module "list" {
|
|
1471
1500
|
onSelectionChanged: (item: T, ...params: any[]) => void;
|
1472
1501
|
allowSelection: boolean;
|
1473
1502
|
private onFilterStringChangedCallback?;
|
1503
|
+
elementId?: string;
|
1474
1504
|
private listContainerHtmlElement;
|
1475
1505
|
private loadingIndicatorValue;
|
1476
1506
|
searchEnabled: boolean;
|
@@ -1492,7 +1522,7 @@ declare module "list" {
|
|
1492
1522
|
get visibleItems(): Array<T>;
|
1493
1523
|
private get shouldProcessFilter();
|
1494
1524
|
private onFilterStringChanged;
|
1495
|
-
constructor(items: Array<IAction>, onSelectionChanged: (item: T, ...params: any[]) => void, allowSelection: boolean, selectedItem?: IAction, onFilterStringChangedCallback?: (text: string) => void);
|
1525
|
+
constructor(items: Array<IAction>, onSelectionChanged: (item: T, ...params: any[]) => void, allowSelection: boolean, selectedItem?: IAction, onFilterStringChangedCallback?: (text: string) => void, elementId?: string);
|
1496
1526
|
setItems(items: Array<IAction>, sortByVisibleIndex?: boolean): void;
|
1497
1527
|
protected onSet(): void;
|
1498
1528
|
protected getDefaultCssClasses(): {
|
@@ -1759,6 +1789,7 @@ declare module "actions/action" {
|
|
1759
1789
|
ariaChecked?: boolean;
|
1760
1790
|
ariaExpanded?: boolean;
|
1761
1791
|
ariaRole?: string;
|
1792
|
+
elementId?: string;
|
1762
1793
|
}
|
1763
1794
|
export interface IActionDropdownPopupOptions extends IListModel, IPopupOptionsBase {
|
1764
1795
|
}
|
@@ -1829,7 +1860,6 @@ declare module "actions/action" {
|
|
1829
1860
|
private raiseUpdate;
|
1830
1861
|
constructor(innerItem: IAction);
|
1831
1862
|
private createLocTitle;
|
1832
|
-
owner: ILocalizableOwner;
|
1833
1863
|
location?: string;
|
1834
1864
|
id: string;
|
1835
1865
|
private _visible;
|
@@ -2276,9 +2306,14 @@ declare module "survey-element" {
|
|
2276
2306
|
protected getIsErrorsModeTooltip(): boolean;
|
2277
2307
|
protected getIsTooltipErrorSupportedByParent(): boolean;
|
2278
2308
|
protected getIsTooltipErrorInsideSupported(): boolean;
|
2279
|
-
get hasParent():
|
2309
|
+
get hasParent(): any;
|
2280
2310
|
isSingleInRow: boolean;
|
2281
|
-
|
2311
|
+
private shouldAddRunnerStyles;
|
2312
|
+
protected getHasFrameV2(): boolean;
|
2313
|
+
protected getIsNested(): boolean;
|
2314
|
+
protected getCssRoot(cssClasses: {
|
2315
|
+
[index: string]: string;
|
2316
|
+
}): string;
|
2282
2317
|
/**
|
2283
2318
|
* Sets survey element width in CSS values.
|
2284
2319
|
*
|
@@ -2340,6 +2375,8 @@ declare module "survey-element" {
|
|
2340
2375
|
get clickTitleFunction(): any;
|
2341
2376
|
protected needClickTitleFunction(): boolean;
|
2342
2377
|
protected processTitleClick(): void;
|
2378
|
+
get additionalTitleToolbar(): ActionContainer;
|
2379
|
+
protected getAdditionalTitleToolbar(): ActionContainer | null;
|
2343
2380
|
protected getCssTitle(cssClasses: any): string;
|
2344
2381
|
localeChanged(): void;
|
2345
2382
|
}
|
@@ -2447,6 +2484,18 @@ declare module "questionfactory" {
|
|
2447
2484
|
createElement(elementType: string, name: string): IElement;
|
2448
2485
|
}
|
2449
2486
|
}
|
2487
|
+
declare module "drag-drop-helper-v1" {
|
2488
|
+
import { IElement, ISurveyElement } from "base-interfaces";
|
2489
|
+
export class DragDropInfo {
|
2490
|
+
source: IElement;
|
2491
|
+
target: IElement;
|
2492
|
+
nestedPanelDepth: number;
|
2493
|
+
constructor(source: IElement, target: IElement, nestedPanelDepth?: number);
|
2494
|
+
destination: ISurveyElement;
|
2495
|
+
isBottom: boolean;
|
2496
|
+
isEdge: boolean;
|
2497
|
+
}
|
2498
|
+
}
|
2450
2499
|
declare module "defaultCss/defaultV2Css" {
|
2451
2500
|
export var surveyCss: any;
|
2452
2501
|
export var defaultV2Css: {
|
@@ -2487,6 +2536,7 @@ declare module "defaultCss/defaultV2Css" {
|
|
2487
2536
|
edit: string;
|
2488
2537
|
};
|
2489
2538
|
panel: {
|
2539
|
+
asPage: string;
|
2490
2540
|
number: string;
|
2491
2541
|
title: string;
|
2492
2542
|
titleExpandable: string;
|
@@ -2518,6 +2568,8 @@ declare module "defaultCss/defaultV2Css" {
|
|
2518
2568
|
root: string;
|
2519
2569
|
navigation: string;
|
2520
2570
|
title: string;
|
2571
|
+
header: string;
|
2572
|
+
headerTab: string;
|
2521
2573
|
button: string;
|
2522
2574
|
buttonRemove: string;
|
2523
2575
|
buttonAdd: string;
|
@@ -2726,6 +2778,7 @@ declare module "defaultCss/defaultV2Css" {
|
|
2726
2778
|
itemLabelOnError: string;
|
2727
2779
|
item: string;
|
2728
2780
|
itemTitle: string;
|
2781
|
+
content: string;
|
2729
2782
|
row: string;
|
2730
2783
|
cell: string;
|
2731
2784
|
};
|
@@ -2838,6 +2891,7 @@ declare module "defaultCss/defaultV2Css" {
|
|
2838
2891
|
empty: string;
|
2839
2892
|
root: string;
|
2840
2893
|
tableWrapper: string;
|
2894
|
+
content: string;
|
2841
2895
|
cell: string;
|
2842
2896
|
row: string;
|
2843
2897
|
itemCell: string;
|
@@ -2883,6 +2937,11 @@ declare module "defaultCss/defaultV2Css" {
|
|
2883
2937
|
itemStarDisabled: string;
|
2884
2938
|
itemStarHighlighted: string;
|
2885
2939
|
itemStarUnhighlighted: string;
|
2940
|
+
itemSmiley: string;
|
2941
|
+
itemSmileyOnError: string;
|
2942
|
+
itemSmileyHover: string;
|
2943
|
+
itemSmileySelected: string;
|
2944
|
+
itemSmileyDisabled: string;
|
2886
2945
|
minText: string;
|
2887
2946
|
itemText: string;
|
2888
2947
|
maxText: string;
|
@@ -3681,6 +3740,9 @@ declare module "question_baseselect" {
|
|
3681
3740
|
protected runItemsEnableCondition(values: HashTable<any>, properties: HashTable<any>): any;
|
3682
3741
|
protected onAfterRunItemsEnableCondition(): void;
|
3683
3742
|
protected onEnableItemCallBack(item: ItemValue): boolean;
|
3743
|
+
protected onSelectedItemValuesChangedHandler(newValue: any): void;
|
3744
|
+
protected getSingleSelectedItem(): ItemValue;
|
3745
|
+
protected onGetSingleSelectedItem(selectedItemByValue: ItemValue): void;
|
3684
3746
|
private setConditionalChoicesRunner;
|
3685
3747
|
private setConditionalEnableChoicesRunner;
|
3686
3748
|
private canSurveyChangeItemVisibility;
|
@@ -3876,7 +3938,7 @@ declare module "question_baseselect" {
|
|
3876
3938
|
private getFilteredChoices;
|
3877
3939
|
protected get activeChoices(): Array<ItemValue>;
|
3878
3940
|
private getQuestionWithChoices;
|
3879
|
-
|
3941
|
+
private getChoicesFromQuestion;
|
3880
3942
|
private copyChoiceItem;
|
3881
3943
|
protected get hasActiveChoices(): boolean;
|
3882
3944
|
protected isHeadChoice(item: ItemValue, question: QuestionSelectBase): boolean;
|
@@ -4396,7 +4458,11 @@ declare module "question_paneldynamic" {
|
|
4396
4458
|
*/
|
4397
4459
|
get renderMode(): string;
|
4398
4460
|
set renderMode(val: string);
|
4461
|
+
get tabAlign(): "center" | "left" | "right";
|
4462
|
+
set tabAlign(val: "center" | "left" | "right");
|
4399
4463
|
get isRenderModeList(): boolean;
|
4464
|
+
get isRenderModeTab(): boolean;
|
4465
|
+
get hasTitleOnLeftTop(): boolean;
|
4400
4466
|
setVisibleIndex(value: number): number;
|
4401
4467
|
private setPanelVisibleIndex;
|
4402
4468
|
/**
|
@@ -4557,6 +4623,7 @@ declare module "question_paneldynamic" {
|
|
4557
4623
|
get progressText(): string;
|
4558
4624
|
get progress(): string;
|
4559
4625
|
getRootCss(): string;
|
4626
|
+
get cssHeader(): string;
|
4560
4627
|
getPanelWrapperCss(): string;
|
4561
4628
|
getPanelRemoveButtonCss(): string;
|
4562
4629
|
getAddButtonCss(): string;
|
@@ -4570,12 +4637,20 @@ declare module "question_paneldynamic" {
|
|
4570
4637
|
get locNoEntriesText(): LocalizableString;
|
4571
4638
|
getShowNoEntriesPlaceholder(): boolean;
|
4572
4639
|
needResponsiveWidth(): boolean;
|
4640
|
+
private additionalTitleToolbarValue;
|
4641
|
+
protected getAdditionalTitleToolbar(): ActionContainer | null;
|
4573
4642
|
private footerToolbarValue;
|
4574
4643
|
get footerToolbar(): ActionContainer;
|
4575
4644
|
legacyNavigation: boolean;
|
4576
4645
|
private updateFooterActionsCallback;
|
4577
4646
|
private updateFooterActions;
|
4578
4647
|
private initFooterToolbar;
|
4648
|
+
private createTabByPanel;
|
4649
|
+
private getAdditionalTitleToolbarCss;
|
4650
|
+
private updateTabToolbarItemsPressedState;
|
4651
|
+
private updateTabToolbar;
|
4652
|
+
private addTabFromToolbar;
|
4653
|
+
private removeTabFromToolbar;
|
4579
4654
|
private get showLegacyNavigation();
|
4580
4655
|
}
|
4581
4656
|
}
|
@@ -5690,9 +5765,6 @@ declare module "survey-events-api" {
|
|
5690
5765
|
* Set this property to `false` if you want to cancel the preview.
|
5691
5766
|
*/
|
5692
5767
|
allow: boolean;
|
5693
|
-
/**
|
5694
|
-
* @deprecated Use the `allow` property instead.
|
5695
|
-
*/
|
5696
5768
|
allowShowPreview: boolean;
|
5697
5769
|
}
|
5698
5770
|
export interface NavigateToUrlEvent {
|
@@ -5829,7 +5901,7 @@ declare module "survey-events-api" {
|
|
5829
5901
|
}
|
5830
5902
|
export interface SettingQuestionErrorsEvent extends QuestionEventMixin {
|
5831
5903
|
/**
|
5832
|
-
* An array of errors. The array is empty if the validated question
|
5904
|
+
* An array of errors. The array is empty if the validated question satisfies all validation rules.
|
5833
5905
|
*/
|
5834
5906
|
errors: Array<SurveyError>;
|
5835
5907
|
}
|
@@ -5893,9 +5965,13 @@ declare module "survey-events-api" {
|
|
5893
5965
|
}
|
5894
5966
|
export interface ProcessHtmlEvent {
|
5895
5967
|
/**
|
5896
|
-
*
|
5968
|
+
* HTML markup. You can modify this parameter's value.
|
5897
5969
|
*/
|
5898
5970
|
html: string;
|
5971
|
+
/**
|
5972
|
+
* Indicates a page, question, or message for which HTML content is intended: [`"completed"`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#completedHtml) | [`"completed-before"`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#completedBeforeHtml) | [`"loading"`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#loadingHtml) | [`"html-question"`](https://surveyjs.io/form-library/documentation/api-reference/add-custom-html-to-survey#html).
|
5973
|
+
*/
|
5974
|
+
reason: string;
|
5899
5975
|
}
|
5900
5976
|
export interface GetQuestionTitleEvent extends QuestionEventMixin {
|
5901
5977
|
/**
|
@@ -6925,9 +7001,10 @@ declare module "survey" {
|
|
6925
7001
|
*/
|
6926
7002
|
onComplete: EventBase<SurveyModel, CompleteEvent>;
|
6927
7003
|
/**
|
6928
|
-
* An event that is raised before the survey displays a [preview](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page). Use this event to cancel the preview.
|
6929
|
-
*
|
7004
|
+
* An event that is raised before the survey displays a [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page). Use this event to cancel the preview.
|
6930
7005
|
* @see showPreviewBeforeComplete
|
7006
|
+
* @see showPreview
|
7007
|
+
* @see cancelPreview
|
6931
7008
|
*/
|
6932
7009
|
onShowingPreview: EventBase<SurveyModel, ShowingPreviewEvent>;
|
6933
7010
|
/**
|
@@ -7130,7 +7207,7 @@ declare module "survey" {
|
|
7130
7207
|
*/
|
7131
7208
|
onValidatedErrorsOnCurrentPage: EventBase<SurveyModel, ValidatedErrorsOnCurrentPageEvent>;
|
7132
7209
|
/**
|
7133
|
-
*
|
7210
|
+
* An event that is raised when the survey processes HTML content. Handle this event to modify HTML content before displaying.
|
7134
7211
|
* @see completedHtml
|
7135
7212
|
* @see loadingHtml
|
7136
7213
|
* @see QuestionHtmlModel.html
|
@@ -7501,6 +7578,7 @@ declare module "survey" {
|
|
7501
7578
|
*/
|
7502
7579
|
onGetExpressionDisplayValue: EventBase<SurveyModel, GetExpressionDisplayValueEvent>;
|
7503
7580
|
constructor(jsonObj?: any, renderedElement?: any);
|
7581
|
+
protected createTryAgainAction(): IAction;
|
7504
7582
|
private createHtmlLocString;
|
7505
7583
|
/**
|
7506
7584
|
* The list of errors on loading survey JSON. If the list is empty after loading a JSON, then the JSON is correct and has no errors.
|
@@ -7510,9 +7588,10 @@ declare module "survey" {
|
|
7510
7588
|
getType(): string;
|
7511
7589
|
protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
|
7512
7590
|
/**
|
7513
|
-
* Returns
|
7591
|
+
* Returns an array of all pages in the survey.
|
7592
|
+
*
|
7593
|
+
* To get an array of only visible pages, use the [`visiblePages`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#visiblePages) array.
|
7514
7594
|
* @see PageModel
|
7515
|
-
* @see visiblePages
|
7516
7595
|
*/
|
7517
7596
|
get pages(): Array<PageModel>;
|
7518
7597
|
renderCallback: () => void;
|
@@ -7558,11 +7637,7 @@ declare module "survey" {
|
|
7558
7637
|
get triggers(): Array<SurveyTrigger>;
|
7559
7638
|
set triggers(val: Array<SurveyTrigger>);
|
7560
7639
|
/**
|
7561
|
-
*
|
7562
|
-
* @see CalculatedValue
|
7563
|
-
*
|
7564
|
-
* For more information, refer to [Calculated Values](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#calculated-values).
|
7565
|
-
*
|
7640
|
+
* An array of [calculated values](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#calculated-values).
|
7566
7641
|
*/
|
7567
7642
|
get calculatedValues(): Array<CalculatedValue>;
|
7568
7643
|
set calculatedValues(val: Array<CalculatedValue>);
|
@@ -7637,6 +7712,8 @@ declare module "survey" {
|
|
7637
7712
|
* Gets or sets the visibility of the table of contents.
|
7638
7713
|
*
|
7639
7714
|
* Default value: `false`
|
7715
|
+
*
|
7716
|
+
* [View Demo](https://surveyjs.io/form-library/examples/toc-feature/ (linkStyle))
|
7640
7717
|
* @see tocLocation
|
7641
7718
|
*/
|
7642
7719
|
get showTOC(): boolean;
|
@@ -7648,6 +7725,8 @@ declare module "survey" {
|
|
7648
7725
|
*
|
7649
7726
|
* - `"left"` (default)
|
7650
7727
|
* - `"right"`
|
7728
|
+
*
|
7729
|
+
* [View Demo](https://surveyjs.io/form-library/examples/toc-feature/ (linkStyle))
|
7651
7730
|
* @see showTOC
|
7652
7731
|
*/
|
7653
7732
|
get tocLocation(): "left" | "right";
|
@@ -7749,43 +7828,44 @@ declare module "survey" {
|
|
7749
7828
|
get maxOthersLength(): number;
|
7750
7829
|
set maxOthersLength(val: number);
|
7751
7830
|
/**
|
7752
|
-
*
|
7753
|
-
* The available options:
|
7831
|
+
* Specifies whether the survey switches to the next page automatically after a user answers all questions on the current page.
|
7754
7832
|
*
|
7755
|
-
*
|
7756
|
-
* - `autogonext` - navigate to the next page automatically but do not submit survey data.
|
7757
|
-
* - `false` - do not navigate to the next page and do not submit survey data automatically.
|
7833
|
+
* Default value: `false`
|
7758
7834
|
*
|
7759
|
-
*
|
7835
|
+
* If you enable this property, the survey is also completed automatically. Set the [`allowCompleteSurveyAutomatic`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#allowCompleteSurveyAutomatic) property to `false` if you want to disable this behavior.
|
7760
7836
|
*
|
7761
|
-
*
|
7837
|
+
* > If any of the following questions is answered last, the survey does not switch to the next page: Checkbox, Boolean (rendered as Checkbox), Comment, Signature Pad, Image Picker (with Multi Select), File, Single-Choice Matrix (not all rows are answered), Dynamic Matrix, Panel Dynamic.
|
7762
7838
|
*
|
7763
|
-
* [View Demo](https://surveyjs.io/form-library/examples/
|
7839
|
+
* [View Demo](https://surveyjs.io/form-library/examples/automatically-move-to-next-page-if-answer-selected/ (linkStyle))
|
7764
7840
|
*/
|
7765
7841
|
get goNextPageAutomatic(): boolean | "autogonext";
|
7766
7842
|
set goNextPageAutomatic(val: boolean | "autogonext");
|
7767
7843
|
/**
|
7768
|
-
*
|
7769
|
-
*
|
7844
|
+
* Specifies whether to complete the survey automatically after a user answers all questions on the last page. Applies only if the [`goNextPageAutomatic`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#goNextPageAutomatic) property is `true`.
|
7845
|
+
*
|
7846
|
+
* Default value: `true`
|
7770
7847
|
*/
|
7771
7848
|
get allowCompleteSurveyAutomatic(): boolean;
|
7772
7849
|
set allowCompleteSurveyAutomatic(val: boolean);
|
7773
7850
|
/**
|
7774
|
-
*
|
7851
|
+
* Specifies when the survey validates answers.
|
7775
7852
|
*
|
7776
|
-
*
|
7853
|
+
* Possible values:
|
7854
|
+
*
|
7855
|
+
* - `"onNextPage"` (default) - Triggers validation before the survey is switched to the next page or completed.
|
7856
|
+
* - `"onValueChanged"` - Triggers validation each time a question value is changed.
|
7857
|
+
* - `"onComplete"` - Triggers validation when a user clicks the Complete button. If previous pages contain errors, the survey switches to the page with the first error.
|
7777
7858
|
*
|
7778
|
-
*
|
7779
|
-
* - `onValueChanged` - check errors on every question value (i.e., answer) changing.
|
7780
|
-
* - `onValueChanging` - check errors before setting value into survey. If there is an error, then survey data is not changed, but question value will be keeped.
|
7781
|
-
* - `onComplete` - to validate all visible questions on complete button click. If there are errors on previous pages, then the page with the first error becomes the current.
|
7859
|
+
* Refer to the following help topic for more information: [Data Validation](https://surveyjs.io/form-library/documentation/data-validation).
|
7782
7860
|
*/
|
7783
7861
|
get checkErrorsMode(): string;
|
7784
7862
|
set checkErrorsMode(val: string);
|
7785
7863
|
/**
|
7786
|
-
* Specifies whether
|
7787
|
-
*
|
7788
|
-
*
|
7864
|
+
* Specifies whether to increase the height of text areas to accommodate multi-line comments.
|
7865
|
+
*
|
7866
|
+
* Default value: `false`
|
7867
|
+
*
|
7868
|
+
* You can override this property for individual Comment questions: [`autoGrow`](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model#autoGrow).
|
7789
7869
|
*/
|
7790
7870
|
get autoGrowComment(): boolean;
|
7791
7871
|
set autoGrowComment(val: boolean);
|
@@ -8005,21 +8085,19 @@ declare module "survey" {
|
|
8005
8085
|
set completeText(newValue: string);
|
8006
8086
|
get locCompleteText(): LocalizableString;
|
8007
8087
|
/**
|
8008
|
-
*
|
8009
|
-
* @see locale
|
8088
|
+
* Gets or sets a caption for the Preview button.
|
8010
8089
|
* @see showPreviewBeforeComplete
|
8011
|
-
* @see editText
|
8012
8090
|
* @see showPreview
|
8091
|
+
* @see editText
|
8013
8092
|
*/
|
8014
8093
|
get previewText(): string;
|
8015
8094
|
set previewText(newValue: string);
|
8016
8095
|
get locPreviewText(): LocalizableString;
|
8017
8096
|
/**
|
8018
|
-
*
|
8019
|
-
* @see locale
|
8097
|
+
* Gets or sets a caption for the Edit button displayed when the survey shows a [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page).
|
8020
8098
|
* @see showPreviewBeforeComplete
|
8021
|
-
* @see previewText
|
8022
8099
|
* @see cancelPreview
|
8100
|
+
* @see previewText
|
8023
8101
|
*/
|
8024
8102
|
get editText(): string;
|
8025
8103
|
set editText(newValue: string);
|
@@ -8213,10 +8291,10 @@ declare module "survey" {
|
|
8213
8291
|
*/
|
8214
8292
|
get comments(): any;
|
8215
8293
|
/**
|
8216
|
-
* Returns
|
8217
|
-
*
|
8218
|
-
*
|
8219
|
-
* @see
|
8294
|
+
* Returns an array of visible pages without the start page.
|
8295
|
+
*
|
8296
|
+
* To get an array of all pages, use the [`pages`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#pages) property. If all pages are visible, the `pages` and `visiblePages` arrays are identical.
|
8297
|
+
* @see [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-visibility)
|
8220
8298
|
*/
|
8221
8299
|
get visiblePages(): Array<PageModel>;
|
8222
8300
|
private isPageInVisibleList;
|
@@ -8226,24 +8304,40 @@ declare module "survey" {
|
|
8226
8304
|
get isEmpty(): boolean;
|
8227
8305
|
get PageCount(): number;
|
8228
8306
|
/**
|
8229
|
-
* Returns
|
8230
|
-
*
|
8307
|
+
* Returns a total number of survey pages.
|
8308
|
+
*
|
8309
|
+
* To get the number of visible pages, use the [`visiblePageCount`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#visiblePageCount) property.
|
8231
8310
|
* @see pages
|
8232
8311
|
*/
|
8233
8312
|
get pageCount(): number;
|
8234
8313
|
/**
|
8235
|
-
* Returns
|
8236
|
-
*
|
8314
|
+
* Returns the number of visible survey pages.
|
8315
|
+
*
|
8316
|
+
* To get a total number of survey pages, use the [`pageCount`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#pageCount) property.
|
8237
8317
|
* @see visiblePages
|
8318
|
+
* @see [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-visibility)
|
8238
8319
|
*/
|
8239
8320
|
get visiblePageCount(): number;
|
8240
8321
|
/**
|
8241
|
-
* Returns the
|
8322
|
+
* Returns the start page. Applies only if the [`firstPageIsStarted`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#firstPageIsStarted) property is set to `true`.
|
8323
|
+
*
|
8324
|
+
* Refer to the following help topic for more information: [Start Page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#start-page).
|
8242
8325
|
* @see firstPageIsStarted
|
8326
|
+
* @see activePage
|
8243
8327
|
*/
|
8244
8328
|
get startedPage(): PageModel;
|
8245
8329
|
/**
|
8246
|
-
* Gets or sets the current
|
8330
|
+
* Gets or sets the current page.
|
8331
|
+
*
|
8332
|
+
* If you want to change the current page, set this property to a `PageModel` object. You can get this object in different ways. For example, you can call the [`getPageByName()`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#getPageByName) method to obtain a `PageModel` object with a specific name:
|
8333
|
+
*
|
8334
|
+
* ```js
|
8335
|
+
* survey.currentPage = survey.getPageByName("my-page-name");
|
8336
|
+
* ```
|
8337
|
+
*
|
8338
|
+
* Alternatively, you can change the current page if you set the [`currentPageNo`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#currentPageNo) property to the index of the required page.
|
8339
|
+
*
|
8340
|
+
* The `currentPage` property does not return the start page even if it is current. Use the [`activePage`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#activePage) property instead if your survey contains a start page.
|
8247
8341
|
*/
|
8248
8342
|
get currentPage(): any;
|
8249
8343
|
set currentPage(value: any);
|
@@ -8251,10 +8345,10 @@ declare module "survey" {
|
|
8251
8345
|
private get isCurrentPageAvailable();
|
8252
8346
|
private isPageExistsInSurvey;
|
8253
8347
|
/**
|
8254
|
-
* Returns
|
8348
|
+
* Returns [`startedPage`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#startedPage) if the survey currently displays a start page; otherwise, returns [`currentPage`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#currentPage).
|
8349
|
+
* @see startedPage
|
8255
8350
|
* @see currentPage
|
8256
8351
|
* @see firstPageIsStarted
|
8257
|
-
* @see startedPage
|
8258
8352
|
*/
|
8259
8353
|
get activePage(): any;
|
8260
8354
|
/**
|
@@ -8269,20 +8363,24 @@ declare module "survey" {
|
|
8269
8363
|
private onStateAndCurrentPageChanged;
|
8270
8364
|
private getPageByObject;
|
8271
8365
|
/**
|
8272
|
-
*
|
8366
|
+
* A zero-based index of the current page in the [`visiblePages`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#visiblePages) array.
|
8273
8367
|
*
|
8274
8368
|
* [View Demo](https://surveyjs.io/form-library/examples/survey-editprevious/ (linkStyle))
|
8369
|
+
* @see visiblePages
|
8275
8370
|
*/
|
8276
8371
|
get currentPageNo(): number;
|
8277
8372
|
set currentPageNo(value: number);
|
8278
8373
|
/**
|
8279
|
-
*
|
8374
|
+
* Specifies the sort order of questions in the survey.
|
8280
8375
|
*
|
8281
|
-
*
|
8376
|
+
* Possible values:
|
8377
|
+
*
|
8378
|
+
* - `"initial"` (default) - Preserves the original order of questions.
|
8379
|
+
* - `"random"` - Displays questions in random order.
|
8282
8380
|
*
|
8283
|
-
*
|
8284
|
-
*
|
8285
|
-
* @see
|
8381
|
+
* You can override this property for individual pages and panels.
|
8382
|
+
* @see PageModel.questionsOrder
|
8383
|
+
* @see PanelModel.questionsOrder
|
8286
8384
|
*/
|
8287
8385
|
get questionsOrder(): string;
|
8288
8386
|
set questionsOrder(val: string);
|
@@ -8321,14 +8419,11 @@ declare module "survey" {
|
|
8321
8419
|
protected setCompletedState(value: string, text: string): void;
|
8322
8420
|
notify(message: string, type: string): void;
|
8323
8421
|
/**
|
8324
|
-
*
|
8325
|
-
* @param clearData clear
|
8326
|
-
* @param
|
8327
|
-
* @see data
|
8328
|
-
* @see state
|
8329
|
-
* @see currentPage
|
8422
|
+
* Resets the survey [`state`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#state) and, optionally, [`data`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data). If `state` is `"completed"`, it becomes `"running"`.
|
8423
|
+
* @param clearData *Optional.* Specifies whether to clear survey data. Default value: `true`.
|
8424
|
+
* @param goToFirstPage *Optional.* Specifies whether to switch the survey to the first page. Default value: `true`.
|
8330
8425
|
*/
|
8331
|
-
clear(clearData?: boolean,
|
8426
|
+
clear(clearData?: boolean, goToFirstPage?: boolean): void;
|
8332
8427
|
mergeValues(src: any, dest: any): void;
|
8333
8428
|
private updateValuesWithDefaults;
|
8334
8429
|
protected updateCustomWidgets(page: PageModel): void;
|
@@ -8512,27 +8607,22 @@ declare module "survey" {
|
|
8512
8607
|
navigationMouseDown(): boolean;
|
8513
8608
|
private resetNavigationButton;
|
8514
8609
|
private mouseDownPage;
|
8515
|
-
nextPageUIClick():
|
8610
|
+
nextPageUIClick(): boolean;
|
8516
8611
|
nextPageMouseDown(): boolean;
|
8517
8612
|
/**
|
8518
|
-
*
|
8519
|
-
*
|
8520
|
-
* Details: [Preview State](https://surveyjs.io/Documentation/Library#states-preview)
|
8521
|
-
* @see showPreviewBeforeComplete
|
8613
|
+
* Displays a [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page). Returns `false` if the preview cannot be displayed because of validation errors.
|
8522
8614
|
* @see cancelPreview
|
8615
|
+
* @see showPreviewBeforeComplete
|
8616
|
+
* @see onShowingPreview
|
8523
8617
|
* @see state
|
8524
|
-
* @see previewText
|
8525
|
-
* @see editText
|
8526
8618
|
*/
|
8527
8619
|
showPreview(): boolean;
|
8528
8620
|
private showPreviewCore;
|
8529
8621
|
/**
|
8530
|
-
* Cancels preview and switches
|
8531
|
-
*
|
8532
|
-
* Details: [Preview State](https://surveyjs.io/Documentation/Library#states-preview)
|
8533
|
-
* @param curPage - A new current page. If the parameter is undefined then the last page becomes the current.
|
8534
|
-
* @see showPreviewBeforeComplete
|
8622
|
+
* Cancels a [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page) and switches the survey to the page specified by the `curPage` parameter.
|
8623
|
+
* @param curPage A new current page. If you do not specify this parameter, the survey displays the last page.
|
8535
8624
|
* @see showPreview
|
8625
|
+
* @see showPreviewBeforeComplete
|
8536
8626
|
* @see state
|
8537
8627
|
*/
|
8538
8628
|
cancelPreview(curPage?: any): void;
|
@@ -8542,18 +8632,22 @@ declare module "survey" {
|
|
8542
8632
|
get isSinglePage(): boolean;
|
8543
8633
|
set isSinglePage(val: boolean);
|
8544
8634
|
/**
|
8545
|
-
*
|
8635
|
+
* Specifies how to distribute survey elements between pages.
|
8546
8636
|
*
|
8547
|
-
*
|
8637
|
+
* Possible values:
|
8548
8638
|
*
|
8549
|
-
* - `singlePage` -
|
8550
|
-
* - `questionPerPage` -
|
8639
|
+
* - `"singlePage"` - Combines all survey pages into a single page.
|
8640
|
+
* - `"questionPerPage"` - Creates a separate page for every question.
|
8641
|
+
* - `"standard"` (default) - Retains the original structure specified in the JSON schema.
|
8551
8642
|
*/
|
8552
8643
|
get questionsOnPageMode(): string;
|
8553
8644
|
set questionsOnPageMode(val: string);
|
8554
8645
|
/**
|
8555
|
-
* Gets or sets
|
8556
|
-
*
|
8646
|
+
* Gets or sets a Boolean value that specifies whether the first page is a start page.
|
8647
|
+
*
|
8648
|
+
* Refer to the following help topic for more information: [Start Page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#start-page).
|
8649
|
+
* @see startedPage
|
8650
|
+
* @see activePage
|
8557
8651
|
*/
|
8558
8652
|
get firstPageIsStarted(): boolean;
|
8559
8653
|
set firstPageIsStarted(val: boolean);
|
@@ -8632,6 +8726,7 @@ declare module "survey" {
|
|
8632
8726
|
* @see navigateToUrlOnCondition
|
8633
8727
|
*/
|
8634
8728
|
doComplete(isCompleteOnTrigger?: boolean): boolean;
|
8729
|
+
private saveDataOnComplete;
|
8635
8730
|
private checkOnCompletingEvent;
|
8636
8731
|
/**
|
8637
8732
|
* Starts the survey. Changes the survey mode from "starting" to "running". Call this function if your survey has a start page, otherwise this function does nothing.
|
@@ -8769,16 +8864,19 @@ declare module "survey" {
|
|
8769
8864
|
getPage(index: number): PageModel;
|
8770
8865
|
/**
|
8771
8866
|
* Adds an existing page to the survey.
|
8772
|
-
* @param page
|
8773
|
-
* @param index
|
8867
|
+
* @param page A page to add.
|
8868
|
+
* @param index An index at which to insert the page. If you do not specify this parameter, the page will be added to the end.
|
8774
8869
|
* @see addNewPage
|
8870
|
+
* @see createNewPage
|
8775
8871
|
*/
|
8776
8872
|
addPage(page: PageModel, index?: number): void;
|
8777
8873
|
/**
|
8778
|
-
* Creates a new page and adds it to
|
8779
|
-
* @param name
|
8780
|
-
* @param index
|
8874
|
+
* Creates a new page and adds it to the survey.
|
8875
|
+
* @param name A page name. If you do not specify this parameter, it will be generated automatically.
|
8876
|
+
* @param index An index at which to insert the page. If you do not specify this parameter, the page will be added to the end.
|
8877
|
+
* @returns The created and added page.
|
8781
8878
|
* @see addPage
|
8879
|
+
* @see createNewPage
|
8782
8880
|
*/
|
8783
8881
|
addNewPage(name?: string, index?: number): PageModel;
|
8784
8882
|
/**
|
@@ -8861,8 +8959,9 @@ declare module "survey" {
|
|
8861
8959
|
*/
|
8862
8960
|
getAllPanels(visibleOnly?: boolean, includingDesignTime?: boolean): Array<IPanel>;
|
8863
8961
|
/**
|
8864
|
-
* Creates and returns a new page
|
8865
|
-
*
|
8962
|
+
* Creates and returns a new page but does not add it to the survey.
|
8963
|
+
*
|
8964
|
+
* Call the [`addPage(page)`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#addPage) method to add the created page to the survey later or the [`addNewPage(name, index)`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#addNewPage) method to create _and_ add a page to the survey.
|
8866
8965
|
* @see addPage
|
8867
8966
|
* @see addNewPage
|
8868
8967
|
*/
|
@@ -9038,7 +9137,7 @@ declare module "survey" {
|
|
9038
9137
|
panelRemoved(panel: PanelModel): void;
|
9039
9138
|
validateQuestion(question: Question): SurveyError;
|
9040
9139
|
validatePanel(panel: PanelModel): SurveyError;
|
9041
|
-
processHtml(html: string): string;
|
9140
|
+
processHtml(html: string, reason?: string): string;
|
9042
9141
|
processText(text: string, returnDisplayValue: boolean): string;
|
9043
9142
|
processTextEx(text: string, returnDisplayValue: boolean, doEncoding: boolean): any;
|
9044
9143
|
private processTextCore;
|
@@ -9191,6 +9290,7 @@ declare module "survey" {
|
|
9191
9290
|
* @param name question name
|
9192
9291
|
*/
|
9193
9292
|
focusQuestion(name: string): boolean;
|
9293
|
+
questionEditFinishCallback(question: Question, event: any): void;
|
9194
9294
|
getElementWrapperComponentName(element: any, reason?: string): string;
|
9195
9295
|
getQuestionContentWrapperComponentName(element: any): string;
|
9196
9296
|
getRowWrapperComponentName(row: QuestionRowModel): string;
|
@@ -9203,6 +9303,27 @@ declare module "survey" {
|
|
9203
9303
|
skeletonComponentName: string;
|
9204
9304
|
getSkeletonComponentName(element: ISurveyElement): string;
|
9205
9305
|
private layoutElements;
|
9306
|
+
/**
|
9307
|
+
* Adds an element to the survey layout.
|
9308
|
+
*
|
9309
|
+
* This method accepts an object with the following layout element properties:
|
9310
|
+
*
|
9311
|
+
* - `id`: `String` | `"timerpanel"` | `"progress-buttons"` | `"progress-questions"` | `"progress-pages"` | `"progress-correctquestions"` | `"progress-requiredquestions"` | `"toc-navigation"` | `"navigationbuttons"`\
|
9312
|
+
* A layout element identifier. You can use possible values to access and relocate or customize predefined layout elements.
|
9313
|
+
*
|
9314
|
+
* - `container`: `"header"` | `"footer"` | `"left"` | `"right"` | `"contentTop"` | `"contentBottom"`\
|
9315
|
+
* A layout container that holds the element. If you want to display the element within multiple containers, set this property to an array of possible values.
|
9316
|
+
*
|
9317
|
+
* - `component`: `String`\
|
9318
|
+
* The name of the component that renders the layout element.
|
9319
|
+
*
|
9320
|
+
* - `data`: `any`\
|
9321
|
+
* Data passed as props to `component`.
|
9322
|
+
*
|
9323
|
+
* [View Demo](https://surveyjs.io/form-library/examples/progress-bar-with-percentage/ (linkStyle))
|
9324
|
+
* @param layoutElement A layout element configuration.
|
9325
|
+
* @returns The configuration of the previous layout element with the same `id`.
|
9326
|
+
*/
|
9206
9327
|
addLayoutElement(layoutElement: ISurveyLayoutElement): ISurveyLayoutElement;
|
9207
9328
|
removeLayoutElement(layoutElementId: string): ISurveyLayoutElement;
|
9208
9329
|
getContainerContent(container: LayoutElementContainer): any[];
|
@@ -9213,6 +9334,27 @@ declare module "survey" {
|
|
9213
9334
|
disposeCallback: () => void;
|
9214
9335
|
}
|
9215
9336
|
}
|
9337
|
+
declare module "drag-drop-page-helper-v1" {
|
9338
|
+
import { IElement, ISurveyElement } from "base-interfaces";
|
9339
|
+
import { PageModel } from "page";
|
9340
|
+
export class DragDropPageHelperV1 {
|
9341
|
+
private page;
|
9342
|
+
constructor(page: PageModel);
|
9343
|
+
private dragDropInfo;
|
9344
|
+
getDragDropInfo(): any;
|
9345
|
+
dragDropStart(src: IElement, target: IElement, nestedPanelDepth?: number): void;
|
9346
|
+
dragDropMoveTo(destination: ISurveyElement, isBottom?: boolean, isEdge?: boolean): boolean;
|
9347
|
+
private correctDragDropInfo;
|
9348
|
+
private dragDropAllowFromSurvey;
|
9349
|
+
dragDropFinish(isCancel?: boolean): IElement;
|
9350
|
+
private dragDropGetElementIndex;
|
9351
|
+
private dragDropCanDropTagert;
|
9352
|
+
private dragDropCanDropSource;
|
9353
|
+
private dragDropCanDropCore;
|
9354
|
+
private dragDropCanDropNotNext;
|
9355
|
+
private dragDropIsSameElement;
|
9356
|
+
}
|
9357
|
+
}
|
9216
9358
|
declare module "page" {
|
9217
9359
|
import { IPage, IPanel, IElement, ISurveyElement } from "base-interfaces";
|
9218
9360
|
import { PanelModelBase } from "panel";
|
@@ -9224,6 +9366,7 @@ declare module "page" {
|
|
9224
9366
|
*/
|
9225
9367
|
export class PageModel extends PanelModelBase implements IPage {
|
9226
9368
|
private hasShownValue;
|
9369
|
+
private dragDropPageHelper;
|
9227
9370
|
constructor(name?: string);
|
9228
9371
|
getType(): string;
|
9229
9372
|
toString(): string;
|
@@ -9231,9 +9374,9 @@ declare module "page" {
|
|
9231
9374
|
protected canShowPageNumber(): boolean;
|
9232
9375
|
protected canShowTitle(): boolean;
|
9233
9376
|
/**
|
9234
|
-
* A caption displayed on a navigation button in the progress bar. Applies
|
9377
|
+
* A caption displayed on a navigation button in the TOC or progress bar. Applies when [`showTOC`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#showTOC) is `true` or when [`showProgressBar`](https://surveyjs.io/form-library/documentation/surveymodel#showProgressBar) is `true` and [`progressBarType`](https://surveyjs.io/form-library/documentation/surveymodel#progressBarType) is `"buttons"`.
|
9235
9378
|
*
|
9236
|
-
* If this property is undefined, the navigation
|
9379
|
+
* If this property is undefined, the navigation buttons display page [titles](https://surveyjs.io/form-library/documentation/api-reference/page-model#title) or [names](https://surveyjs.io/form-library/documentation/pagemodel#name).
|
9237
9380
|
*/
|
9238
9381
|
get navigationTitle(): string;
|
9239
9382
|
set navigationTitle(val: string);
|
@@ -9310,22 +9453,31 @@ declare module "page" {
|
|
9310
9453
|
set maxTimeToFinish(val: number);
|
9311
9454
|
protected onNumChanged(value: number): void;
|
9312
9455
|
protected onVisibleChanged(): void;
|
9313
|
-
|
9314
|
-
protected getDragDropInfo(): any;
|
9456
|
+
getDragDropInfo(): any;
|
9315
9457
|
dragDropStart(src: IElement, target: IElement, nestedPanelDepth?: number): void;
|
9316
9458
|
dragDropMoveTo(destination: ISurveyElement, isBottom?: boolean, isEdge?: boolean): boolean;
|
9317
|
-
private correctDragDropInfo;
|
9318
|
-
private dragDropAllowFromSurvey;
|
9319
9459
|
dragDropFinish(isCancel?: boolean): IElement;
|
9320
|
-
private dragDropGetElementIndex;
|
9321
|
-
private dragDropCanDropTagert;
|
9322
|
-
private dragDropCanDropSource;
|
9323
|
-
private dragDropCanDropCore;
|
9324
|
-
private dragDropCanDropNotNext;
|
9325
|
-
private dragDropIsSameElement;
|
9326
9460
|
ensureRowsVisibility(): void;
|
9327
9461
|
}
|
9328
9462
|
}
|
9463
|
+
declare module "drag-drop-panel-helper-v1" {
|
9464
|
+
import { IElement, ISurveyElement } from "base-interfaces";
|
9465
|
+
import { DragDropInfo } from "drag-drop-helper-v1";
|
9466
|
+
import { PanelModelBase, QuestionRowModel } from "panel";
|
9467
|
+
export class DragDropPanelHelperV1 {
|
9468
|
+
private panel;
|
9469
|
+
constructor(panel: PanelModelBase);
|
9470
|
+
dragDropAddTarget(dragDropInfo: DragDropInfo): void;
|
9471
|
+
dragDropFindRow(findElement: ISurveyElement): QuestionRowModel;
|
9472
|
+
dragDropMoveElement(src: IElement, target: IElement, targetIndex: number): void;
|
9473
|
+
updateRowsOnElementAdded(element: IElement, index: number, dragDropInfo?: DragDropInfo, thisElement?: PanelModelBase): void;
|
9474
|
+
private dragDropAddTargetToRow;
|
9475
|
+
private dragDropAddTargetToEmptyPanel;
|
9476
|
+
private dragDropAddTargetToExistingRow;
|
9477
|
+
private dragDropAddTargetToNewRow;
|
9478
|
+
private dragDropAddTargetToEmptyPanelCore;
|
9479
|
+
}
|
9480
|
+
}
|
9329
9481
|
declare module "panel" {
|
9330
9482
|
import { HashTable } from "helpers";
|
9331
9483
|
import { Base } from "base";
|
@@ -9337,15 +9489,7 @@ declare module "panel" {
|
|
9337
9489
|
import { SurveyError } from "survey-error";
|
9338
9490
|
import { IAction } from "actions/action";
|
9339
9491
|
import { ActionContainer } from "actions/container";
|
9340
|
-
|
9341
|
-
source: IElement;
|
9342
|
-
target: IElement;
|
9343
|
-
nestedPanelDepth: number;
|
9344
|
-
constructor(source: IElement, target: IElement, nestedPanelDepth?: number);
|
9345
|
-
destination: ISurveyElement;
|
9346
|
-
isBottom: boolean;
|
9347
|
-
isEdge: boolean;
|
9348
|
-
}
|
9492
|
+
import { DragDropInfo } from "drag-drop-helper-v1";
|
9349
9493
|
export class QuestionRowModel extends Base {
|
9350
9494
|
panel: PanelModelBase;
|
9351
9495
|
private static rowCounter;
|
@@ -9392,6 +9536,7 @@ declare module "panel" {
|
|
9392
9536
|
addElementCallback: (element: IElement) => void;
|
9393
9537
|
removeElementCallback: (element: IElement) => void;
|
9394
9538
|
onGetQuestionTitleLocation: () => string;
|
9539
|
+
private dragDropPanelHelper;
|
9395
9540
|
constructor(name?: string);
|
9396
9541
|
getType(): string;
|
9397
9542
|
setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void;
|
@@ -9605,10 +9750,10 @@ declare module "panel" {
|
|
9605
9750
|
getQuestionStartIndex(): string;
|
9606
9751
|
getChildrenLayoutType(): string;
|
9607
9752
|
getProgressInfo(): IProgressInfo;
|
9608
|
-
|
9753
|
+
get root(): PanelModelBase;
|
9609
9754
|
protected childVisibilityChanged(): void;
|
9610
|
-
|
9611
|
-
|
9755
|
+
createRowAndSetLazy(index: number): QuestionRowModel;
|
9756
|
+
createRow(): QuestionRowModel;
|
9612
9757
|
onSurveyLoad(): void;
|
9613
9758
|
onFirstRendering(): void;
|
9614
9759
|
updateRows(): void;
|
@@ -9620,15 +9765,14 @@ declare module "panel" {
|
|
9620
9765
|
private onElementVisibilityChanged;
|
9621
9766
|
private onElementStartWithNewLineChanged;
|
9622
9767
|
private updateRowsVisibility;
|
9623
|
-
|
9768
|
+
canBuildRows(): boolean;
|
9624
9769
|
private buildRows;
|
9625
9770
|
private isLazyRenderInRow;
|
9626
9771
|
protected canRenderFirstRows(): boolean;
|
9627
|
-
|
9628
|
-
private updateRowsOnElementAdded;
|
9772
|
+
getDragDropInfo(): any;
|
9629
9773
|
private updateRowsOnElementRemoved;
|
9630
|
-
|
9631
|
-
|
9774
|
+
updateRowsRemoveElementFromRow(element: IElement, row: QuestionRowModel): void;
|
9775
|
+
findRowByElement(el: IElement): QuestionRowModel;
|
9632
9776
|
elementWidthChanged(el: IElement): void;
|
9633
9777
|
get processedTitle(): string;
|
9634
9778
|
protected getRenderedTitle(str: string): string;
|
@@ -9718,13 +9862,8 @@ declare module "panel" {
|
|
9718
9862
|
runCondition(values: HashTable<any>, properties: HashTable<any>): void;
|
9719
9863
|
onAnyValueChanged(name: string): void;
|
9720
9864
|
checkBindings(valueName: string, value: any): void;
|
9721
|
-
|
9865
|
+
dragDropAddTarget(dragDropInfo: DragDropInfo): void;
|
9722
9866
|
dragDropFindRow(findElement: ISurveyElement): QuestionRowModel;
|
9723
|
-
private dragDropAddTargetToRow;
|
9724
|
-
private dragDropAddTargetToEmptyPanel;
|
9725
|
-
private dragDropAddTargetToExistingRow;
|
9726
|
-
private dragDropAddTargetToNewRow;
|
9727
|
-
private dragDropAddTargetToEmptyPanelCore;
|
9728
9867
|
dragDropMoveElement(src: IElement, target: IElement, targetIndex: number): void;
|
9729
9868
|
needResponsiveWidth(): boolean;
|
9730
9869
|
get hasDescriptionUnderTitle(): boolean;
|
@@ -9849,6 +9988,11 @@ declare module "panel" {
|
|
9849
9988
|
protected onVisibleChanged(): void;
|
9850
9989
|
needResponsiveWidth(): boolean;
|
9851
9990
|
focusIn(): void;
|
9991
|
+
protected getHasFrameV2(): boolean;
|
9992
|
+
protected getIsNested(): boolean;
|
9993
|
+
protected getCssRoot(cssClasses: {
|
9994
|
+
[index: string]: string;
|
9995
|
+
}): string;
|
9852
9996
|
getContainerCss(): string;
|
9853
9997
|
}
|
9854
9998
|
}
|
@@ -10069,7 +10213,6 @@ declare module "question" {
|
|
10069
10213
|
* You can use question values as placeholders in the following places:
|
10070
10214
|
*
|
10071
10215
|
* - Survey element titles and descriptions
|
10072
|
-
* - The [`expression`](https://surveyjs.io/form-library/documentation/questionexpressionmodel#expression) property of the [Expression](https://surveyjs.io/form-library/documentation/questionexpressionmodel) question
|
10073
10216
|
* - The [`html`](https://surveyjs.io/form-library/documentation/questionhtmlmodel#html) property of the [HTML](https://surveyjs.io/form-library/documentation/questionhtmlmodel) question
|
10074
10217
|
*
|
10075
10218
|
* To use a question value as a placeholder, specify the question `name` in curly brackets: `{questionName}`. Refer to the following help topic for more information: [Dynamic Texts - Question Values](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#question-values).
|
@@ -10279,7 +10422,9 @@ declare module "question" {
|
|
10279
10422
|
protected calcCssClasses(css: any): any;
|
10280
10423
|
get cssRoot(): string;
|
10281
10424
|
protected setCssRoot(val: string): void;
|
10282
|
-
protected getCssRoot(cssClasses:
|
10425
|
+
protected getCssRoot(cssClasses: {
|
10426
|
+
[index: string]: string;
|
10427
|
+
}): string;
|
10283
10428
|
get cssHeader(): string;
|
10284
10429
|
protected setCssHeader(val: string): void;
|
10285
10430
|
protected getCssHeader(cssClasses: any): string;
|
@@ -11327,7 +11472,7 @@ declare module "base-interfaces" {
|
|
11327
11472
|
validatePanel(panel: IPanel): SurveyError;
|
11328
11473
|
hasVisibleQuestionByValueName(valueName: string): boolean;
|
11329
11474
|
questionCountByValueName(valueName: string): number;
|
11330
|
-
processHtml(html: string): string;
|
11475
|
+
processHtml(html: string, reason: string): string;
|
11331
11476
|
getSurveyMarkdownHtml(element: Base, text: string, name: string): string;
|
11332
11477
|
getRendererForString(element: Base, name: string): string;
|
11333
11478
|
getRendererContextForString(element: Base, locStr: LocalizableString): any;
|
@@ -12046,6 +12191,8 @@ declare module "validator" {
|
|
12046
12191
|
}
|
12047
12192
|
/**
|
12048
12193
|
* Use it to validate the text by regular expressions.
|
12194
|
+
*
|
12195
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
12049
12196
|
*/
|
12050
12197
|
export class RegexValidator extends SurveyValidator {
|
12051
12198
|
constructor(regex?: string);
|
@@ -12181,11 +12328,13 @@ declare module "dropdownListModel" {
|
|
12181
12328
|
inputString: string;
|
12182
12329
|
showSelectedItemLocText: boolean;
|
12183
12330
|
showInputFieldComponent: boolean;
|
12331
|
+
ariaActivedescendant: string;
|
12184
12332
|
private applyInputString;
|
12185
12333
|
private applyHintString;
|
12186
12334
|
get inputStringRendered(): string;
|
12187
12335
|
set inputStringRendered(val: string);
|
12188
12336
|
get placeholderRendered(): any;
|
12337
|
+
get listElementId(): string;
|
12189
12338
|
hasScroll: boolean;
|
12190
12339
|
hintString: string;
|
12191
12340
|
private get hintStringLC();
|
@@ -12209,6 +12358,7 @@ declare module "dropdownListModel" {
|
|
12209
12358
|
onScroll(event: Event): void;
|
12210
12359
|
onBlur(event: any): void;
|
12211
12360
|
onFocus(event: any): void;
|
12361
|
+
setInputStringFromSelectedItem(newValue?: any): void;
|
12212
12362
|
scrollToFocusedItem(): void;
|
12213
12363
|
}
|
12214
12364
|
}
|
@@ -12225,7 +12375,7 @@ declare module "question_dropdown" {
|
|
12225
12375
|
* [View Demo](https://surveyjs.io/form-library/examples/questiontype-dropdown/ (linkStyle))
|
12226
12376
|
*/
|
12227
12377
|
export class QuestionDropdownModel extends QuestionSelectBase {
|
12228
|
-
|
12378
|
+
dropdownListModelValue: DropdownListModel;
|
12229
12379
|
lastSelectedItemValue: ItemValue;
|
12230
12380
|
updateReadOnlyText(): void;
|
12231
12381
|
constructor(name: string);
|
@@ -12246,6 +12396,7 @@ declare module "question_dropdown" {
|
|
12246
12396
|
getType(): string;
|
12247
12397
|
get ariaRole(): string;
|
12248
12398
|
get selectedItem(): ItemValue;
|
12399
|
+
protected onGetSingleSelectedItem(selectedItemByValue: ItemValue): void;
|
12249
12400
|
supportGoNextPageAutomatic(): boolean;
|
12250
12401
|
private minMaxChoices;
|
12251
12402
|
protected getChoices(): Array<ItemValue>;
|
@@ -12320,9 +12471,13 @@ declare module "question_dropdown" {
|
|
12320
12471
|
get showSelectedItemLocText(): boolean;
|
12321
12472
|
get showInputFieldComponent(): boolean;
|
12322
12473
|
private get selectedItemText();
|
12474
|
+
get dropdownListModel(): DropdownListModel;
|
12475
|
+
set dropdownListModel(val: DropdownListModel);
|
12323
12476
|
get popupModel(): PopupModel;
|
12477
|
+
get ariaExpanded(): boolean;
|
12324
12478
|
onOpened: EventBase<QuestionDropdownModel>;
|
12325
12479
|
onOpenedCallBack(): void;
|
12480
|
+
protected onSelectedItemValuesChangedHandler(newValue: any): void;
|
12326
12481
|
protected hasUnknownValue(val: any, includeOther: boolean, isFilteredChoices: boolean, checkEmptyValue: boolean): boolean;
|
12327
12482
|
protected onVisibleChoicesChanged(): void;
|
12328
12483
|
protected getFirstInputElementId(): string;
|
@@ -12686,7 +12841,7 @@ declare module "multiSelectListModel" {
|
|
12686
12841
|
selectedItems: Array<IAction>;
|
12687
12842
|
hideSelectedItems: boolean;
|
12688
12843
|
private updateItemState;
|
12689
|
-
constructor(items: Array<IAction>, onSelectionChanged: (item: T, status: string) => void, allowSelection: boolean, selectedItems?: Array<IAction>, onFilterStringChangedCallback?: (text: string) => void);
|
12844
|
+
constructor(items: Array<IAction>, onSelectionChanged: (item: T, status: string) => void, allowSelection: boolean, selectedItems?: Array<IAction>, onFilterStringChangedCallback?: (text: string) => void, elementId?: string);
|
12690
12845
|
onItemClick: (item: T) => void;
|
12691
12846
|
isItemDisabled: (itemValue: T) => boolean;
|
12692
12847
|
isItemSelected: (itemValue: T) => boolean;
|
@@ -12710,6 +12865,7 @@ declare module "dropdownMultiSelectListModel" {
|
|
12710
12865
|
private getSelectedActions;
|
12711
12866
|
protected getFocusFirstInputSelector(): string;
|
12712
12867
|
protected createListModel(): MultiSelectListModel<ItemValue>;
|
12868
|
+
protected resetFilterString(): void;
|
12713
12869
|
previousValue: any;
|
12714
12870
|
doneButtonCaption: string;
|
12715
12871
|
private get shouldResetAfterCancel();
|
@@ -12723,6 +12879,7 @@ declare module "dropdownMultiSelectListModel" {
|
|
12723
12879
|
removeLastSelectedItem(): void;
|
12724
12880
|
constructor(question: Question, onSelectionChanged?: (item: IAction, ...params: any[]) => void);
|
12725
12881
|
inputKeyHandler(event: any): void;
|
12882
|
+
setInputStringFromSelectedItem(newValue: any): void;
|
12726
12883
|
}
|
12727
12884
|
}
|
12728
12885
|
declare module "question_tagbox" {
|
@@ -12784,6 +12941,7 @@ declare module "question_tagbox" {
|
|
12784
12941
|
getType(): string;
|
12785
12942
|
get ariaRole(): string;
|
12786
12943
|
get popupModel(): PopupModel;
|
12944
|
+
get ariaExpanded(): boolean;
|
12787
12945
|
getControlClass(): string;
|
12788
12946
|
onOpened: EventBase<QuestionTagboxModel>;
|
12789
12947
|
onOpenedCallBack(): void;
|
@@ -13104,6 +13262,7 @@ declare module "question_html" {
|
|
13104
13262
|
set html(val: string);
|
13105
13263
|
get locHtml(): LocalizableString;
|
13106
13264
|
get processedHtml(): string;
|
13265
|
+
private processHtml;
|
13107
13266
|
}
|
13108
13267
|
}
|
13109
13268
|
declare module "question_radiogroup" {
|
@@ -13281,12 +13440,15 @@ declare module "question_rating" {
|
|
13281
13440
|
rateType: "numbers" | "labels" | "stars" | "smileys";
|
13282
13441
|
smileysColorMode: "monochrome" | "colored";
|
13283
13442
|
get isStar(): boolean;
|
13284
|
-
get
|
13443
|
+
get isSmiley(): boolean;
|
13444
|
+
get itemComponentName(): "sv-rating-item-star" | "sv-rating-item-smiley" | "sv-rating-item";
|
13285
13445
|
protected valueToData(val: any): any;
|
13286
13446
|
setValueFromClick(value: any): void;
|
13287
13447
|
onItemMouseIn(item: RenderedRatingItem): void;
|
13288
13448
|
onItemMouseOut(item: RenderedRatingItem): void;
|
13289
13449
|
get ratingRootCss(): string;
|
13450
|
+
getItemSmiley(item: ItemValue): string;
|
13451
|
+
getItemSmileyIconName(item: ItemValue): string;
|
13290
13452
|
getItemClass(item: ItemValue, highlight?: "none" | "highlighted" | "unhighlighted"): string;
|
13291
13453
|
getControlClass(): string;
|
13292
13454
|
get placeholder(): string;
|
@@ -13566,6 +13728,7 @@ declare module "surveyToc" {
|
|
13566
13728
|
import { SurveyModel } from "survey";
|
13567
13729
|
export function tryNavigateToPage(survey: SurveyModel, index: number): boolean;
|
13568
13730
|
export function createTOCListModel(survey: SurveyModel): ListModel<Action>;
|
13731
|
+
export function getTocRootCss(survey: SurveyModel): string;
|
13569
13732
|
}
|
13570
13733
|
declare module "surveyProgress" {
|
13571
13734
|
export class SurveyProgressModel {
|
@@ -13786,7 +13949,7 @@ declare module "question_custom" {
|
|
13786
13949
|
*/
|
13787
13950
|
onPropertyChanged?(question: Question, propertyName: string, newValue: any): void;
|
13788
13951
|
/**
|
13789
|
-
* A function that is called
|
13952
|
+
* A function that is called after the question value is changed.
|
13790
13953
|
*
|
13791
13954
|
* Parameters:
|
13792
13955
|
*
|
@@ -13799,8 +13962,9 @@ declare module "question_custom" {
|
|
13799
13962
|
*/
|
13800
13963
|
onValueChanged?(question: Question, name: string, newValue: any): void;
|
13801
13964
|
/**
|
13802
|
-
* A function that is called before a question value is changed.
|
13803
|
-
*
|
13965
|
+
* A function that is called before a question value is changed.
|
13966
|
+
*
|
13967
|
+
* This function should return the value you want to save: `newValue`, a custom value, or `undefined` if you want to clear the question value.
|
13804
13968
|
*
|
13805
13969
|
* Parameters:
|
13806
13970
|
*
|
@@ -14182,6 +14346,7 @@ declare module "dragdrop/survey-elements" {
|
|
14182
14346
|
protected getDraggedElementClass(): string;
|
14183
14347
|
protected createElementFromJson(json: object): HTMLElement;
|
14184
14348
|
private createNewElement;
|
14349
|
+
protected findDropTargetNodeByDragOverNode(dragOverNode: HTMLElement): HTMLElement;
|
14185
14350
|
protected getDropTargetByDataAttributeValue(dataAttributeValue: string, dropTargetNode: HTMLElement, event: PointerEvent): any;
|
14186
14351
|
protected isDropTargetValid(): boolean;
|
14187
14352
|
protected calculateIsBottom(clientY: number, dropTargetNode?: HTMLElement): boolean;
|
@@ -14532,6 +14697,8 @@ declare module "defaultCss/cssstandard" {
|
|
14532
14697
|
paneldynamic: {
|
14533
14698
|
root: string;
|
14534
14699
|
title: string;
|
14700
|
+
header: string;
|
14701
|
+
headerTab: string;
|
14535
14702
|
button: string;
|
14536
14703
|
buttonAdd: string;
|
14537
14704
|
buttonRemove: string;
|
@@ -14604,6 +14771,10 @@ declare module "defaultCss/cssstandard" {
|
|
14604
14771
|
minText: string;
|
14605
14772
|
itemText: string;
|
14606
14773
|
maxText: string;
|
14774
|
+
itemStar: string;
|
14775
|
+
itemStarSelected: string;
|
14776
|
+
itemSmiley: string;
|
14777
|
+
itemSmileySelected: string;
|
14607
14778
|
};
|
14608
14779
|
text: {
|
14609
14780
|
root: string;
|
@@ -15039,6 +15210,10 @@ declare module "defaultCss/cssmodern" {
|
|
15039
15210
|
cleanButtonIconId: string;
|
15040
15211
|
controlValue: string;
|
15041
15212
|
controlInputFieldComponent: string;
|
15213
|
+
itemSmiley: string;
|
15214
|
+
itemStar: string;
|
15215
|
+
itemSmileySelected: string;
|
15216
|
+
itemStarSelected: string;
|
15042
15217
|
};
|
15043
15218
|
comment: {
|
15044
15219
|
root: string;
|
@@ -20903,6 +21078,18 @@ declare module "react/components/rating/rating-item-star" {
|
|
20903
21078
|
render(): JSX.Element | null;
|
20904
21079
|
}
|
20905
21080
|
}
|
21081
|
+
declare module "react/components/rating/rating-item-smiley" {
|
21082
|
+
import { QuestionRatingModel, RenderedRatingItem } from "entries/core";
|
21083
|
+
import { SurveyElementBase } from "react/reactquestion_element";
|
21084
|
+
import { IRatingItemProps } from "react/components/rating/rating-item";
|
21085
|
+
export class RatingItemSmiley extends SurveyElementBase<IRatingItemProps, any> {
|
21086
|
+
get question(): QuestionRatingModel;
|
21087
|
+
get item(): RenderedRatingItem;
|
21088
|
+
get index(): any;
|
21089
|
+
getStateElement(): RenderedRatingItem;
|
21090
|
+
render(): JSX.Element | null;
|
21091
|
+
}
|
21092
|
+
}
|
20906
21093
|
declare module "react/tagbox-filter" {
|
20907
21094
|
import { DropdownMultiSelectListModel, QuestionTagboxModel } from "entries/core";
|
20908
21095
|
import { SurveyElementBase } from "react/reactquestion_element";
|
@@ -21197,8 +21384,8 @@ declare module "react/reactquestion_matrixdropdownbase" {
|
|
21197
21384
|
renderHeader(): JSX.Element | null;
|
21198
21385
|
renderFooter(): JSX.Element | null;
|
21199
21386
|
renderRows(): JSX.Element;
|
21200
|
-
renderRow(keyValue: any, row: QuestionMatrixDropdownRenderedRow, cssClasses: any): JSX.Element;
|
21201
|
-
renderCell(cell: QuestionMatrixDropdownRenderedCell, index: number, cssClasses: any): JSX.Element;
|
21387
|
+
renderRow(keyValue: any, row: QuestionMatrixDropdownRenderedRow, cssClasses: any, reason?: string): JSX.Element;
|
21388
|
+
renderCell(cell: QuestionMatrixDropdownRenderedCell, index: number, cssClasses: any, reason?: string): JSX.Element;
|
21202
21389
|
private renderCellContent;
|
21203
21390
|
}
|
21204
21391
|
export class SurveyQuestionMatrixDropdownCell extends SurveyQuestionAndErrorsCell {
|
@@ -21597,6 +21784,7 @@ declare module "entries/react-ui-model" {
|
|
21597
21784
|
export { SurveyQuestionRanking, SurveyQuestionRankingItem, } from "react/reactquestion_ranking";
|
21598
21785
|
export { RatingItem } from "react/components/rating/rating-item";
|
21599
21786
|
export { RatingItemStar } from "react/components/rating/rating-item-star";
|
21787
|
+
export { RatingItemSmiley } from "react/components/rating/rating-item-smiley";
|
21600
21788
|
export { TagboxFilterString } from "react/tagbox-filter";
|
21601
21789
|
export { SurveyQuestionOptionItem } from "react/dropdown-item";
|
21602
21790
|
export { SurveyQuestionDropdownBase } from "react/dropdown-base";
|