survey-react 1.9.118 → 1.9.120

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/survey.react.d.ts CHANGED
@@ -82,6 +82,7 @@ declare module "localization/english" {
82
82
  urlRequestError: string;
83
83
  urlGetChoicesError: string;
84
84
  exceedMaxSize: string;
85
+ noUploadFilesHandler: string;
85
86
  otherRequiredError: string;
86
87
  uploadingFile: string;
87
88
  loadingFile: string;
@@ -201,6 +202,7 @@ declare module "surveyStrings" {
201
202
  urlRequestError: string;
202
203
  urlGetChoicesError: string;
203
204
  exceedMaxSize: string;
205
+ noUploadFilesHandler: string;
204
206
  otherRequiredError: string;
205
207
  uploadingFile: string;
206
208
  loadingFile: string;
@@ -702,6 +704,7 @@ declare module "conditionProcessValue" {
702
704
  private getValueFromSurvey;
703
705
  private getValueFromValues;
704
706
  private getNonNestedObject;
707
+ private getNonNestedObjectCore;
705
708
  private getObjInArray;
706
709
  private getFirstPropertyName;
707
710
  private getObjectValue;
@@ -1760,6 +1763,7 @@ declare module "defaultCss/defaultV2Css" {
1760
1763
  invisible: string;
1761
1764
  navigationButton: string;
1762
1765
  compact: string;
1766
+ errorsContainer: string;
1763
1767
  };
1764
1768
  paneldynamic: {
1765
1769
  mainRoot: string;
@@ -1826,6 +1830,7 @@ declare module "defaultCss/defaultV2Css" {
1826
1830
  emptyHeaderRoot: string;
1827
1831
  title: string;
1828
1832
  description: string;
1833
+ errorsContainer: string;
1829
1834
  };
1830
1835
  pageTitle: string;
1831
1836
  pageDescription: string;
@@ -1880,6 +1885,9 @@ declare module "defaultCss/defaultV2Css" {
1880
1885
  invisible: string;
1881
1886
  composite: string;
1882
1887
  disabled: string;
1888
+ errorsContainer: string;
1889
+ errorsContainerTop: string;
1890
+ errorsContainerBottom: string;
1883
1891
  };
1884
1892
  image: {
1885
1893
  mainRoot: string;
@@ -1899,9 +1907,6 @@ declare module "defaultCss/defaultV2Css" {
1899
1907
  root: string;
1900
1908
  icon: string;
1901
1909
  item: string;
1902
- outsideQuestion: string;
1903
- aboveQuestion: string;
1904
- belowQuestion: string;
1905
1910
  locationTop: string;
1906
1911
  locationBottom: string;
1907
1912
  };
@@ -2119,6 +2124,8 @@ declare module "defaultCss/defaultV2Css" {
2119
2124
  rowHasEndActions: string;
2120
2125
  headerCell: string;
2121
2126
  rowTextCell: string;
2127
+ footerCell: string;
2128
+ footerTotalCell: string;
2122
2129
  columnTitleCell: string;
2123
2130
  cellRequiredText: string;
2124
2131
  detailButton: string;
@@ -2154,6 +2161,7 @@ declare module "defaultCss/defaultV2Css" {
2154
2161
  itemCell: string;
2155
2162
  headerCell: string;
2156
2163
  rowTextCell: string;
2164
+ footerCell: string;
2157
2165
  columnTitleCell: string;
2158
2166
  cellRequiredText: string;
2159
2167
  button: string;
@@ -2299,6 +2307,7 @@ declare module "defaultCss/defaultV2Css" {
2299
2307
  backgroundImage: string;
2300
2308
  clearButton: string;
2301
2309
  clearButtonIconId: string;
2310
+ loadingIndicator: string;
2302
2311
  };
2303
2312
  saveData: {
2304
2313
  root: string;
@@ -3580,6 +3589,8 @@ declare module "panel" {
3580
3589
  set questionErrorLocation(val: string);
3581
3590
  getQuestionErrorLocation(): string;
3582
3591
  get no(): string;
3592
+ get cssError(): string;
3593
+ protected getCssError(cssClasses: any): string;
3583
3594
  dispose(): void;
3584
3595
  }
3585
3596
  /**
@@ -3660,6 +3671,7 @@ declare module "panel" {
3660
3671
  */
3661
3672
  get no(): string;
3662
3673
  protected setNo(visibleIndex: number): void;
3674
+ protected notifyStateChanged(): void;
3663
3675
  protected createLocTitleProperty(): LocalizableString;
3664
3676
  protected beforeSetVisibleIndex(index: number): number;
3665
3677
  protected getPanelStartIndex(index: number): number;
@@ -3692,7 +3704,6 @@ declare module "panel" {
3692
3704
  get hasEditButton(): boolean;
3693
3705
  cancelPreview(): void;
3694
3706
  get cssTitle(): string;
3695
- get cssError(): string;
3696
3707
  get showErrorsAbovePanel(): boolean;
3697
3708
  protected getCssError(cssClasses: any): string;
3698
3709
  protected onVisibleChanged(): void;
@@ -3700,6 +3711,7 @@ declare module "panel" {
3700
3711
  focusIn(): void;
3701
3712
  protected getHasFrameV2(): boolean;
3702
3713
  protected getIsNested(): boolean;
3714
+ private get showPanelAsPage();
3703
3715
  protected getCssRoot(cssClasses: {
3704
3716
  [index: string]: string;
3705
3717
  }): string;
@@ -3744,14 +3756,10 @@ declare module "question_file" {
3744
3756
  import { Action } from "actions/action";
3745
3757
  import { Camera } from "utils/camera";
3746
3758
  import { LocalizableString } from "localizablestring";
3747
- /**
3748
- * A class that describes the File Upload question type.
3749
- *
3750
- * [View Demo](https://surveyjs.io/form-library/examples/file-upload/ (linkStyle))
3751
- */
3752
- export class QuestionFileModel extends Question {
3759
+ export function dataUrl2File(dataUrl: string, fileName: string, type: string): File;
3760
+ export class QuestionFileModelBase extends Question {
3753
3761
  isUploading: boolean;
3754
- isDragging: boolean;
3762
+ currentState: string;
3755
3763
  /**
3756
3764
  * An event that is raised after the upload state has changed.
3757
3765
  *
@@ -3762,10 +3770,37 @@ declare module "question_file" {
3762
3770
  * - `options.state`: `string`\
3763
3771
  * The current upload state: `"empty"`, `"loading"`, `"loaded"`, or `"error"`.
3764
3772
  */
3765
- onUploadStateChanged: EventBase<QuestionFileModel>;
3766
- onStateChanged: EventBase<QuestionFileModel>;
3773
+ onUploadStateChanged: EventBase<QuestionFileModelBase>;
3774
+ onStateChanged: EventBase<QuestionFileModelBase>;
3775
+ protected stateChanged(state: string): void;
3776
+ get showLoadingIndicator(): boolean;
3777
+ /**
3778
+ * Specifies whether to store file or signature content as text in `SurveyModel`'s [`data`](https://surveyjs.io/form-library/documentation/surveymodel#data) property.
3779
+ *
3780
+ * If you disable this property, implement `SurveyModel`'s [`onUploadFiles`](https://surveyjs.io/form-library/documentation/surveymodel#onUploadFiles) event handler to specify how to store file content.
3781
+ */
3782
+ get storeDataAsText(): boolean;
3783
+ set storeDataAsText(val: boolean);
3784
+ /**
3785
+ * Enable this property if you want to wait until files are uploaded to complete the survey.
3786
+ *
3787
+ * Default value: `false`
3788
+ */
3789
+ get waitForUpload(): boolean;
3790
+ set waitForUpload(val: boolean);
3791
+ clearValue(): void;
3792
+ clearOnDeletingContainer(): void;
3793
+ protected onCheckForErrors(errors: Array<SurveyError>, isOnValueChanged: boolean): void;
3794
+ protected uploadFiles(files: File[]): void;
3795
+ }
3796
+ /**
3797
+ * A class that describes the File Upload question type.
3798
+ *
3799
+ * [View Demo](https://surveyjs.io/form-library/examples/file-upload/ (linkStyle))
3800
+ */
3801
+ export class QuestionFileModel extends QuestionFileModelBase {
3802
+ isDragging: boolean;
3767
3803
  previewValue: any[];
3768
- currentState: string;
3769
3804
  indexToShow: number;
3770
3805
  pageSize: number;
3771
3806
  containsMultiplyFiles: boolean;
@@ -3818,8 +3853,6 @@ declare module "question_file" {
3818
3853
  private previewValueChanged;
3819
3854
  isPreviewVisible(index: number): boolean;
3820
3855
  getType(): string;
3821
- clearValue(): void;
3822
- clearOnDeletingContainer(): void;
3823
3856
  /**
3824
3857
  * Disable this property only to implement a custom preview.
3825
3858
  *
@@ -3850,20 +3883,6 @@ declare module "question_file" {
3850
3883
  */
3851
3884
  get acceptedTypes(): string;
3852
3885
  set acceptedTypes(val: string);
3853
- /**
3854
- * Specifies whether to store file content as text in `SurveyModel`'s [`data`](https://surveyjs.io/form-library/documentation/surveymodel#data) property.
3855
- *
3856
- * If you disable this property, implement `SurveyModel`'s [`onUploadFiles`](https://surveyjs.io/form-library/documentation/surveymodel#onUploadFiles) event handler to specify how to store file content.
3857
- */
3858
- get storeDataAsText(): boolean;
3859
- set storeDataAsText(val: boolean);
3860
- /**
3861
- * Enable this property if you want to wait until files are uploaded to complete the survey.
3862
- *
3863
- * Default value: `false`
3864
- */
3865
- get waitForUpload(): boolean;
3866
- set waitForUpload(val: boolean);
3867
3886
  /**
3868
3887
  * Specifies whether to show a preview of image files.
3869
3888
  */
@@ -3928,7 +3947,6 @@ declare module "question_file" {
3928
3947
  get multipleRendered(): string;
3929
3948
  get showChooseButton(): boolean;
3930
3949
  get showFileDecorator(): boolean;
3931
- get showLoadingIndicator(): boolean;
3932
3950
  get allowShowPreview(): boolean;
3933
3951
  get showPreviewContainer(): boolean;
3934
3952
  get showRemoveButtonCore(): boolean;
@@ -3940,6 +3958,7 @@ declare module "question_file" {
3940
3958
  */
3941
3959
  removeFile(name: string): void;
3942
3960
  protected removeFileByContent(content: any): void;
3961
+ protected setValueFromResult(arg: any): void;
3943
3962
  /**
3944
3963
  * Loads multiple files into the question.
3945
3964
  * @param files An array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects.
@@ -3953,8 +3972,6 @@ declare module "question_file" {
3953
3972
  protected get isFileLoading(): boolean;
3954
3973
  protected set isFileLoading(val: boolean);
3955
3974
  protected getIsQuestionReady(): boolean;
3956
- protected onCheckForErrors(errors: Array<SurveyError>, isOnValueChanged: boolean): void;
3957
- protected stateChanged(state: string): void;
3958
3975
  private allFilesOk;
3959
3976
  private isFileImage;
3960
3977
  getPlainData(options?: IPlainDataOptions): IQuestionPlainData;
@@ -4540,7 +4557,7 @@ declare module "question_baseselect" {
4540
4557
  getStoreOthersAsComment(): boolean;
4541
4558
  onSurveyLoad(): void;
4542
4559
  onAnyValueChanged(name: string, questionName: string): void;
4543
- updateValueFromSurvey(newValue: any): void;
4560
+ updateValueFromSurvey(newValue: any, clearData: boolean): void;
4544
4561
  protected getCommentFromValue(newValue: any): string;
4545
4562
  protected setOtherValueIntoValue(newValue: any): any;
4546
4563
  onOtherValueInput(event: any): void;
@@ -4864,7 +4881,7 @@ declare module "question_expression" {
4864
4881
  get formatedValue(): string;
4865
4882
  protected updateFormatedValue(): void;
4866
4883
  protected onValueChanged(): void;
4867
- updateValueFromSurvey(newValue: any): void;
4884
+ updateValueFromSurvey(newValue: any, clearData: boolean): void;
4868
4885
  protected getDisplayValueCore(keysAsText: boolean, value: any): any;
4869
4886
  /**
4870
4887
  * Specifies a display style for the question value.
@@ -5732,9 +5749,9 @@ declare module "themes" {
5732
5749
  *
5733
5750
  * Possible values:
5734
5751
  *
5735
- * - `"survey"` (default)\
5752
+ * - `"survey"`\
5736
5753
  * The header width is the same as the survey width.
5737
- * - `"container"`\
5754
+ * - `"container"` (default)\
5738
5755
  * The header width is the same as the survey container width.
5739
5756
  *
5740
5757
  * @see [SurveyModel.width](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#width)
@@ -6468,6 +6485,146 @@ declare module "question_paneldynamic" {
6468
6485
  protected calcCssClasses(css: any): any;
6469
6486
  }
6470
6487
  }
6488
+ declare module "question_signaturepad" {
6489
+ import { ITheme } from "themes";
6490
+ import { QuestionFileModelBase } from "question_file";
6491
+ /**
6492
+ * A class that describes the Signature question type.
6493
+ *
6494
+ * [View Demo](https://surveyjs.io/form-library/examples/signature-pad-widget-javascript/ (linkStyle))
6495
+ */
6496
+ export class QuestionSignaturePadModel extends QuestionFileModelBase {
6497
+ isDrawingValue: boolean;
6498
+ isReadyForUpload: boolean;
6499
+ private getPenColorFromTheme;
6500
+ private updateColors;
6501
+ protected getCssRoot(cssClasses: any): string;
6502
+ protected getFormat(): "" | "image/svg+xml" | "image/jpeg";
6503
+ protected updateValue(): void;
6504
+ constructor(name: string);
6505
+ getType(): string;
6506
+ afterRenderQuestionElement(el: HTMLElement): void;
6507
+ beforeDestroyQuestionElement(el: HTMLElement): void;
6508
+ themeChanged(theme: ITheme): void;
6509
+ private canvas;
6510
+ private element;
6511
+ private scale;
6512
+ private valueIsUpdatingInternally;
6513
+ valueWasChangedFromLastUpload: boolean;
6514
+ private resizeCanvas;
6515
+ private scaleCanvas;
6516
+ private fromDataUrl;
6517
+ private fromUrl;
6518
+ private refreshCanvas;
6519
+ private updateValueHandler;
6520
+ initSignaturePad(el: HTMLElement): void;
6521
+ destroySignaturePad(el: HTMLElement): void;
6522
+ /**
6523
+ * Specifies the format in which to store the signature image.
6524
+ *
6525
+ * Possible values:
6526
+ *
6527
+ * - `"png"` (default)
6528
+ * - `"jpeg"`
6529
+ * - `"svg"`
6530
+ */
6531
+ get dataFormat(): string;
6532
+ set dataFormat(val: string);
6533
+ /**
6534
+ * Specifies the width of the signature area. Accepts positive integer numbers.
6535
+ */
6536
+ get signatureWidth(): number;
6537
+ set signatureWidth(val: number);
6538
+ /**
6539
+ * Specifies the height of the signature area. Accepts positive integer numbers.
6540
+ */
6541
+ get signatureHeight(): number;
6542
+ set signatureHeight(val: number);
6543
+ /**
6544
+ * Specifies whether the signature area should be scaled to fit into the question width.
6545
+ *
6546
+ * Default value: `false`
6547
+ *
6548
+ * This property auto-scales the signature area to fill all available width within the question box while maintaining the default 3:2 aspect ratio. If you set [custom width](#signatureWidth) and [height](#signatureHeight) values, the setting will keep the aspect ratio of these dimensions.
6549
+ *
6550
+ * > The signature area is scaled only for display. The image saved in survey results will have dimensions specified by the [`signatureHeight`](#signatureHeight) and [`signatureWidth`](#signatureWidth) properties.
6551
+ */
6552
+ signatureAutoScaleEnabled: boolean;
6553
+ /**
6554
+ * Speicifies the minimum width of pen strokes, measured in pixels.
6555
+ *
6556
+ * Default value: 0.5
6557
+ */
6558
+ penMinWidth: number;
6559
+ /**
6560
+ * Speicifies the maximum width of pen strokes, measured in pixels.
6561
+ *
6562
+ * Default value: 2.5
6563
+ */
6564
+ penMaxWidth: number;
6565
+ private get containerHeight();
6566
+ private get containerWidth();
6567
+ get renderedCanvasWidth(): string;
6568
+ get height(): number;
6569
+ set height(val: number);
6570
+ /**
6571
+ * Specifies whether to display a button that clears the signature area.
6572
+ *
6573
+ * Default value: `true`
6574
+ */
6575
+ get allowClear(): boolean;
6576
+ set allowClear(val: boolean);
6577
+ get canShowClearButton(): boolean;
6578
+ /**
6579
+ * Specifies a color for the pen.
6580
+ *
6581
+ * This property accepts color values in the following formats:
6582
+ *
6583
+ * - Hexadecimal colors (`"#FF0000"`)
6584
+ * - RGB colors (`"rgb(255,0,0)"`)
6585
+ * - Color names (`"red"`)
6586
+ * @see backgroundColor
6587
+ */
6588
+ get penColor(): string;
6589
+ set penColor(val: string);
6590
+ /**
6591
+ * Specifies a color for the signature area background. Ignored if [`backgroundImage`](#backgroundImage) is set.
6592
+ *
6593
+ * This property accepts color values in the following formats:
6594
+ *
6595
+ * - Hexadecimal colors (`"#FF0000"`)
6596
+ * - RGB colors (`"rgb(255,0,0)"`)
6597
+ * - Color names (`"red"`)
6598
+ * @see penColor
6599
+ */
6600
+ get backgroundColor(): string;
6601
+ set backgroundColor(val: string);
6602
+ /**
6603
+ * An image to display in the background of the signature area. Accepts a base64 or URL string value.
6604
+ * @see backgroundColor
6605
+ */
6606
+ get backgroundImage(): string;
6607
+ set backgroundImage(val: string);
6608
+ get clearButtonCaption(): string;
6609
+ /**
6610
+ * A Boolean value that specifies whether to show the [placeholder](#placeholder).
6611
+ *
6612
+ * Default value: `true`
6613
+ */
6614
+ showPlaceholder: boolean;
6615
+ nothingIsDrawn(): boolean;
6616
+ needShowPlaceholder(): boolean;
6617
+ /**
6618
+ * A placeholder for the signature area. Applies when the [`showPlaceholder`](#showPlaceholder) property is `true`.
6619
+ */
6620
+ placeholder: string;
6621
+ onBlur: (event: any) => void;
6622
+ protected uploadResultItemToValue(r: any): any;
6623
+ protected setValueFromResult(arg: any): void;
6624
+ clearValue(): void;
6625
+ endLoadingFromJson(): void;
6626
+ }
6627
+ }
6471
6628
  declare module "survey-events-api" {
6472
6629
  import { IAction } from "actions/action";
6473
6630
  import { Base } from "base";
@@ -6482,6 +6639,7 @@ declare module "survey-events-api" {
6482
6639
  import { MatrixDropdownColumn } from "question_matrixdropdowncolumn";
6483
6640
  import { QuestionMatrixDynamicModel } from "question_matrixdynamic";
6484
6641
  import { QuestionPanelDynamicModel } from "question_paneldynamic";
6642
+ import { QuestionSignaturePadModel } from "question_signaturepad";
6485
6643
  import { SurveyModel } from "survey";
6486
6644
  import { SurveyError } from "survey-error";
6487
6645
  import { Trigger } from "trigger";
@@ -6493,9 +6651,9 @@ declare module "survey-events-api" {
6493
6651
  }
6494
6652
  export interface FileQuestionEventMixin {
6495
6653
  /**
6496
- * A File Upload question instance for which the event is raised.
6654
+ * A File Upload or Signature Pad question instance for which the event is raised.
6497
6655
  */
6498
- question: QuestionFileModel;
6656
+ question: QuestionFileModel | QuestionSignaturePadModel;
6499
6657
  }
6500
6658
  export interface PanelDynamicQuestionEventMixin {
6501
6659
  /**
@@ -6970,9 +7128,9 @@ declare module "survey-events-api" {
6970
7128
  }
6971
7129
  export interface UploadFilesEvent extends LoadFilesEvent {
6972
7130
  /**
6973
- * A callback function that you should call when a file is uploaded successfully or when file upload fails. Pass `"success"` or `"error"` as the first argument to indicate the operation status. As the second argument, you can pass the uploaded file's data if file upload was successful or an error message if file upload failed.
7131
+ * A callback function that you should call when a file is uploaded successfully or when file upload fails. Pass an array of successfully uploaded files as the first argument. As the second argument, you can pass an array of error messages if file upload failed.
6974
7132
  */
6975
- callback: (status: string, data?: any) => any;
7133
+ callback: (data: any | Array<any>, errors?: any | Array<any>) => any;
6976
7134
  /**
6977
7135
  * An array of JavaScript <a href="https://developer.mozilla.org/en-US/docs/Web/API/File" target="_blank">File</a> objects that represent files to upload.
6978
7136
  */
@@ -7521,6 +7679,7 @@ declare module "page" {
7521
7679
  protected calcCssClasses(css: any): any;
7522
7680
  get cssTitle(): string;
7523
7681
  get cssRoot(): string;
7682
+ protected getCssError(cssClasses: any): string;
7524
7683
  num: number;
7525
7684
  /**
7526
7685
  * 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.
@@ -8370,6 +8529,23 @@ declare module "header" {
8370
8529
  processResponsiveness(width: number): void;
8371
8530
  }
8372
8531
  }
8532
+ declare module "surveyTaskManager" {
8533
+ import { Base } from "base";
8534
+ class SurveyTaskModel {
8535
+ type: string;
8536
+ private timestamp;
8537
+ constructor(type: string);
8538
+ }
8539
+ export class SurveyTaskManagerModel extends Base {
8540
+ private taskList;
8541
+ constructor();
8542
+ private onAllTasksCompleted;
8543
+ hasActiveTasks: boolean;
8544
+ runTask(type: string, func: (done: any) => void): SurveyTaskModel;
8545
+ waitAndExecute(action: any): void;
8546
+ private taskFinished;
8547
+ }
8548
+ }
8373
8549
  declare module "survey" {
8374
8550
  import { JsonError } from "jsonobject";
8375
8551
  import { Base, EventBase } from "base";
@@ -8398,6 +8574,8 @@ declare module "survey" {
8398
8574
  import { QuestionMultipleTextModel } from "question_multipletext";
8399
8575
  import { ITheme, ImageFit, ImageAttachment } from "themes";
8400
8576
  import { PopupModel } from "popup";
8577
+ import { Cover } from "header";
8578
+ import { QuestionSignaturePadModel } from "question_signaturepad";
8401
8579
  /**
8402
8580
  * The `SurveyModel` object contains properties and methods that allow you to control the survey and access its elements.
8403
8581
  *
@@ -8692,6 +8870,8 @@ declare module "survey" {
8692
8870
  * For information on event handler parameters, refer to descriptions within the interface.
8693
8871
  *
8694
8872
  * If you want to specify heading levels for all titles, use the [`titleTags`](https://surveyjs.io/form-library/documentation/api-reference/settings#titleTags) object in [global settings](https://surveyjs.io/form-library/documentation/api-reference/settings).
8873
+ *
8874
+ * [View Demo](https://surveyjs.io/form-library/examples/survey-titletagnames/ (linkStyle))
8695
8875
  * @see onGetQuestionTitle
8696
8876
  * @see onGetQuestionNo
8697
8877
  */
@@ -8731,7 +8911,7 @@ declare module "survey" {
8731
8911
  */
8732
8912
  onGetResult: EventBase<SurveyModel, GetResultEvent>;
8733
8913
  /**
8734
- * An event that is raised when a File Upload question starts to upload a file. Applies only if [`storeDataAsText`](https://surveyjs.io/form-library/documentation/api-reference/file-model#storeDataAsText) is `false`. Use this event to upload files to your server.
8914
+ * An event that is raised when a File Upload or Signature Pad question starts to upload a file. Applies only if [`storeDataAsText`](https://surveyjs.io/form-library/documentation/api-reference/file-model#storeDataAsText) is `false`. Use this event to upload files to your server.
8735
8915
  *
8736
8916
  * For information on event handler parameters, refer to descriptions within the interface.
8737
8917
  *
@@ -8753,7 +8933,7 @@ declare module "survey" {
8753
8933
  */
8754
8934
  onDownloadFile: EventBase<SurveyModel, DownloadFileEvent>;
8755
8935
  /**
8756
- * An event that is raised when users clear files in a [File Upload](https://surveyjs.io/form-library/documentation/api-reference/file-model) question. Use this event to delete files from your server.
8936
+ * An event that is raised when users clear files in a [File Upload](https://surveyjs.io/form-library/documentation/api-reference/file-model) question or clear signature in a [Signature Pad](https://surveyjs.io/form-library/documentation/api-reference/signature-pad-model) question. Use this event to delete files from your server.
8757
8937
  *
8758
8938
  * For information on event handler parameters, refer to descriptions within the interface.
8759
8939
  *
@@ -9127,6 +9307,7 @@ declare module "survey" {
9127
9307
  * [View Demo](https://surveyjs.io/form-library/examples/brand-your-survey-header/ (linkStyle))
9128
9308
  */
9129
9309
  headerView: "advanced" | "basic";
9310
+ protected insertAdvancedHeader(advHeader: Cover): void;
9130
9311
  private getNavigationCss;
9131
9312
  private lazyRenderingValue;
9132
9313
  showBrandInfo: boolean;
@@ -9322,7 +9503,8 @@ declare module "survey" {
9322
9503
  * Specifies whether to hide validation errors thrown by the Required validation in the UI.
9323
9504
  *
9324
9505
  * [Built-In Client-Side Validators](https://surveyjs.io/form-library/documentation/data-validation#built-in-client-side-validators (linkStyle))
9325
- * @see ignoreValidation
9506
+ * @see validationEnabled
9507
+ * @see validationAllowSwitchPages
9326
9508
  */
9327
9509
  hideRequiredErrors: boolean;
9328
9510
  beforeSettingQuestionErrors(question: Question, errors: Array<SurveyError>): void;
@@ -9395,6 +9577,10 @@ declare module "survey" {
9395
9577
  * - `"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.
9396
9578
  *
9397
9579
  * Refer to the following help topic for more information: [Data Validation](https://surveyjs.io/form-library/documentation/data-validation).
9580
+ * @see validationEnabled
9581
+ * @see validationAllowSwitchPages
9582
+ * @see validationAllowComplete
9583
+ * @see validate
9398
9584
  */
9399
9585
  get checkErrorsMode(): string;
9400
9586
  set checkErrorsMode(val: string);
@@ -9502,10 +9688,11 @@ declare module "survey" {
9502
9688
  getSurveyErrorCustomText(obj: PanelModel | Question | SurveyModel, text: string, error: SurveyError): string;
9503
9689
  getQuestionDisplayValue(question: Question, displayValue: any): any;
9504
9690
  /**
9505
- * Returns a message that is displayed when a survey does not contain visible pages or questions.
9691
+ * A message that is displayed when a survey does not contain visible pages or questions.
9506
9692
  * @see [Localization & Globalization](https://surveyjs.io/form-library/documentation/survey-localization)
9507
9693
  */
9508
9694
  get emptySurveyText(): string;
9695
+ set emptySurveyText(val: string);
9509
9696
  /**
9510
9697
  * An image URL or a Base64-encoded image to use as a survey logo.
9511
9698
  *
@@ -9880,7 +10067,7 @@ declare module "survey" {
9880
10067
  * @see setValue
9881
10068
  */
9882
10069
  mergeData(data: any): void;
9883
- setDataCore(data: any): void;
10070
+ setDataCore(data: any, clearData?: boolean): void;
9884
10071
  getStructuredData(includePages?: boolean, level?: number): any;
9885
10072
  setStructuredData(data: any, doMerge?: boolean): void;
9886
10073
  private collectDataFromPanel;
@@ -10129,15 +10316,32 @@ declare module "survey" {
10129
10316
  */
10130
10317
  deleteCookie(): void;
10131
10318
  /**
10132
- * Specifies whether to skip validation when you switch between pages or complete the survey programmatically or when users do that in the UI.
10319
+ * This property is obsolete. Use the [`validationEnabled`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#validationEnabled) property instead.
10320
+ */
10321
+ get ignoreValidation(): boolean;
10322
+ set ignoreValidation(val: boolean);
10323
+ /**
10324
+ * Specifies whether data validation is enabled.
10133
10325
  *
10134
- * Default value: `false`
10326
+ * Default value: `true`
10327
+ * @see checkErrorsMode
10135
10328
  * @see hideRequiredErrors
10136
- * @see nextPage
10137
- * @see isPrevPage
10138
- * @see completeLastPage
10139
10329
  */
10140
- ignoreValidation: boolean;
10330
+ validationEnabled: boolean;
10331
+ /**
10332
+ * Specifies whether respondents can switch the current page even if it contains validation errors.
10333
+ *
10334
+ * Default value: `false`
10335
+ * @see checkErrorsMode
10336
+ */
10337
+ validationAllowSwitchPages: boolean;
10338
+ /**
10339
+ * Specifies whether respondents can end a survey with validation errors.
10340
+ *
10341
+ * Default value: `false`
10342
+ * @see checkErrorsMode
10343
+ */
10344
+ validationAllowComplete: boolean;
10141
10345
  /**
10142
10346
  * Switches the survey to the next page.
10143
10347
  *
@@ -10482,14 +10686,14 @@ declare module "survey" {
10482
10686
  * }
10483
10687
  * );
10484
10688
  * ```
10485
- * @param question A [File Upload question instance](https://surveyjs.io/form-library/documentation/api-reference/file-model).
10486
- * @param name The File Upload question's [`name`](https://surveyjs.io/form-library/documentation/api-reference/file-model#name).
10689
+ * @param question A [File Upload question instance](https://surveyjs.io/form-library/documentation/api-reference/file-model) or [Signature Pad question instance](https://surveyjs.io/form-library/documentation/api-reference/signature-pad-model).
10690
+ * @param name The File Upload question's [`name`](https://surveyjs.io/form-library/documentation/api-reference/file-model#name) or Signature Pad question's [`name`](https://surveyjs.io/form-library/documentation/api-reference/signature-pad-model#name).
10487
10691
  * @param files An array of JavaScript <a href="https://developer.mozilla.org/en-US/docs/Web/API/File" target="_blank">File</a> objects that represent files to upload.
10488
- * @param callback A callback function that allows you to get the upload status (`"success"` or `"error"`) and file data.
10692
+ * @param callback A callback function that allows you to access successfully uploaded files as the first argument. If any files fail to upload, the second argument contains an array of error messages.
10489
10693
  * @see onUploadFiles
10490
10694
  * @see downloadFile
10491
10695
  */
10492
- uploadFiles(question: QuestionFileModel, name: string, files: File[], callback: (status: string, data: any) => any): void;
10696
+ uploadFiles(question: QuestionFileModel | QuestionSignaturePadModel, name: string, files: File[], callback: (data: any | Array<any>, errors?: any | Array<any>) => any): void;
10493
10697
  /**
10494
10698
  * Downloads a file from a server.
10495
10699
  *
@@ -10521,11 +10725,11 @@ declare module "survey" {
10521
10725
  * @see uploadFiles
10522
10726
  */
10523
10727
  downloadFile(question: QuestionFileModel, questionName: string, fileValue: any, callback: (status: string, data: any) => any): void;
10524
- clearFiles(question: QuestionFileModel, name: string, value: any, fileName: string, callback: (status: string, data: any) => any): void;
10728
+ clearFiles(question: QuestionFileModel | QuestionSignaturePadModel, name: string, value: any, fileName: string, callback: (status: string, data: any) => any): void;
10525
10729
  updateChoicesFromServer(question: QuestionSelectBase, choices: Array<ItemValue>, serverResult: any): Array<ItemValue>;
10526
10730
  loadedChoicesFromServer(question: IQuestion): void;
10527
10731
  protected createSurveyService(): dxSurveyService;
10528
- protected uploadFilesCore(name: string, files: File[], uploadingCallback: (status: string, data: any) => any): void;
10732
+ protected uploadFilesCore(name: string, files: File[], uploadingCallback: (data: any | Array<any>, errors?: any | Array<any>) => any): void;
10529
10733
  getPage(index: number): PageModel;
10530
10734
  /**
10531
10735
  * Adds an existing page to the survey.
@@ -11028,6 +11232,7 @@ declare module "survey" {
11028
11232
  private isMovingQuestion;
11029
11233
  startMovingQuestion(): void;
11030
11234
  stopMovingQuestion(): void;
11235
+ get isQuestionDragging(): boolean;
11031
11236
  private needRenderIcons;
11032
11237
  private skippedPages;
11033
11238
  /**
@@ -11086,6 +11291,7 @@ declare module "survey" {
11086
11291
  */
11087
11292
  applyTheme(theme: ITheme): void;
11088
11293
  themeChanged(theme: ITheme): void;
11294
+ private taskManager;
11089
11295
  /**
11090
11296
  * Disposes of the survey model.
11091
11297
  *
@@ -12179,6 +12385,8 @@ declare module "question" {
12179
12385
  * - `{row.other_question_name}` (to access questions inside the same dynamic matrix or multi-column dropdown)
12180
12386
  *
12181
12387
  * An expression can also include built-in and custom functions for advanced calculations. For example, if the `defaultValue` should be today's date, set the `defaultValueExpression` to `"today()"`, and the corresponding built-in function will be executed each time the survey is loaded. Refer to the following help topic for more information: [Built-In Functions](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#built-in-functions).
12388
+ *
12389
+ * [View Demo](https://surveyjs.io/form-library/examples/specify-default-question-value-dynamically (linkStyle))
12182
12390
  * @see defaultValue
12183
12391
  * @see setValueExpression
12184
12392
  */
@@ -12359,7 +12567,7 @@ declare module "question" {
12359
12567
  onMouseDown(): void;
12360
12568
  protected setNewComment(newValue: string): void;
12361
12569
  protected getValidName(name: string): string;
12362
- updateValueFromSurvey(newValue: any): void;
12570
+ updateValueFromSurvey(newValue: any, clearData?: boolean): void;
12363
12571
  private updateValueFromSurveyCore;
12364
12572
  updateCommentFromSurvey(newValue: any): any;
12365
12573
  protected onChangeQuestionValue(newValue: any): void;
@@ -13169,7 +13377,7 @@ declare module "base-interfaces" {
13169
13377
  maxTextLength: number;
13170
13378
  maxOthersLength: number;
13171
13379
  clearValueOnDisableItems: boolean;
13172
- uploadFiles(question: IQuestion, name: string, files: File[], uploadingCallback: (status: string, data: any) => any): any;
13380
+ uploadFiles(question: IQuestion, name: string, files: File[], uploadingCallback: (data: any | Array<any>, errors?: any | Array<any>) => any): any;
13173
13381
  downloadFile(question: IQuestion, name: string, content: string, callback: (status: string, data: any) => any): any;
13174
13382
  clearFiles(question: IQuestion, name: string, value: any, fileName: string, clearCallback: (status: string, data: any) => any): any;
13175
13383
  updateChoicesFromServer(question: IQuestion, choices: Array<any>, serverResult: any): Array<any>;
@@ -13290,7 +13498,7 @@ declare module "base-interfaces" {
13290
13498
  hasTitle: boolean;
13291
13499
  isEmpty(): boolean;
13292
13500
  onSurveyValueChanged(newValue: any): any;
13293
- updateValueFromSurvey(newValue: any): any;
13501
+ updateValueFromSurvey(newValue: any, clearData: boolean): void;
13294
13502
  updateCommentFromSurvey(newValue: any): any;
13295
13503
  supportGoNextPageAutomatic(): boolean;
13296
13504
  clearUnusedValues(): any;
@@ -13354,7 +13562,7 @@ declare module "base-interfaces" {
13354
13562
  svgMountContainer: HTMLElement | string;
13355
13563
  stylesSheetsMountContainer: HTMLElement;
13356
13564
  };
13357
- export type LayoutElementContainer = "header" | "footer" | "left" | "right" | "contentTop" | "contentBottom";
13565
+ export type LayoutElementContainer = "header" | "footer" | "left" | "right" | "contentTop" | "contentBottom" | "center";
13358
13566
  export type HorizontalAlignment = "left" | "center" | "right";
13359
13567
  export type VerticalAlignment = "top" | "middle" | "bottom";
13360
13568
  export interface ISurveyLayoutElement {
@@ -13363,6 +13571,7 @@ declare module "base-interfaces" {
13363
13571
  component?: string;
13364
13572
  template?: string;
13365
13573
  data?: any;
13574
+ index?: number;
13366
13575
  processResponsiveness?: (width: number) => void;
13367
13576
  }
13368
13577
  export interface IPlainDataOptions {
@@ -15060,7 +15269,7 @@ declare module "question_checkbox" {
15060
15269
  private shouldCheckMaxSelectedChoices;
15061
15270
  private checkMinSelectedChoicesUnreached;
15062
15271
  protected getItemClassCore(item: any, options: any): string;
15063
- updateValueFromSurvey(newValue: any): void;
15272
+ updateValueFromSurvey(newValue: any, clearData: boolean): void;
15064
15273
  protected setDefaultValue(): void;
15065
15274
  private addIntoInvisibleOldValues;
15066
15275
  protected hasValueToClearIncorrectValues(): boolean;
@@ -15532,7 +15741,13 @@ declare module "question_ranking" {
15532
15741
  set selectToRankAreasLayout(val: string);
15533
15742
  get renderedSelectToRankAreasLayout(): string;
15534
15743
  isMobileMode(): boolean;
15744
+ /**
15745
+ * A placeholder displayed in the area for ranked choices. Applies when [`selectToRankEnabled`](https://surveyjs.io/form-library/documentation/api-reference/ranking-question-model#selectToRankEnabled) is `true`.
15746
+ */
15535
15747
  selectToRankEmptyRankedAreaText: string;
15748
+ /**
15749
+ * A placeholder displayed in the area for unranked choices. Applies when [`selectToRankEnabled`](https://surveyjs.io/form-library/documentation/api-reference/ranking-question-model#selectToRankEnabled) is `true`.
15750
+ */
15536
15751
  selectToRankEmptyUnrankedAreaText: string;
15537
15752
  get useFullItemSizeForShortcut(): boolean;
15538
15753
  set useFullItemSizeForShortcut(val: boolean);
@@ -15782,6 +15997,7 @@ declare module "question_rating" {
15782
15997
  itemValuePropertyChanged(item: ItemValue, name: string, oldValue: any, newValue: any): void;
15783
15998
  private createRenderedRateItems;
15784
15999
  renderedRateItems: Array<RenderedRatingItem>;
16000
+ private createRateValues;
15785
16001
  private correctValue;
15786
16002
  getType(): string;
15787
16003
  protected getFirstInputElementId(): string;
@@ -16116,135 +16332,6 @@ declare module "question_image" {
16116
16332
  private isVideo;
16117
16333
  }
16118
16334
  }
16119
- declare module "question_signaturepad" {
16120
- import { Question } from "question";
16121
- import { ITheme } from "themes";
16122
- /**
16123
- * A class that describes the Signature question type.
16124
- *
16125
- * [View Demo](https://surveyjs.io/form-library/examples/signature-pad-widget-javascript/ (linkStyle))
16126
- */
16127
- export class QuestionSignaturePadModel extends Question {
16128
- isDrawingValue: boolean;
16129
- private getPenColorFromTheme;
16130
- private updateColors;
16131
- protected getCssRoot(cssClasses: any): string;
16132
- protected updateValue(): void;
16133
- constructor(name: string);
16134
- getType(): string;
16135
- afterRenderQuestionElement(el: HTMLElement): void;
16136
- beforeDestroyQuestionElement(el: HTMLElement): void;
16137
- themeChanged(theme: ITheme): void;
16138
- private canvas;
16139
- private scale;
16140
- private valueIsUpdatingInternally;
16141
- private resizeCanvas;
16142
- private scaleCanvas;
16143
- private refreshCanvas;
16144
- private updateValueHandler;
16145
- initSignaturePad(el: HTMLElement): void;
16146
- destroySignaturePad(el: HTMLElement): void;
16147
- /**
16148
- * Specifies the format in which to store the signature image.
16149
- *
16150
- * Possible values:
16151
- *
16152
- * - `"png"` (default)
16153
- * - `"jpeg"`
16154
- * - `"svg"`
16155
- */
16156
- get dataFormat(): string;
16157
- set dataFormat(val: string);
16158
- /**
16159
- * Specifies the width of the signature area. Accepts positive integer numbers.
16160
- */
16161
- get signatureWidth(): number;
16162
- set signatureWidth(val: number);
16163
- /**
16164
- * Specifies the height of the signature area. Accepts positive integer numbers.
16165
- */
16166
- get signatureHeight(): number;
16167
- set signatureHeight(val: number);
16168
- /**
16169
- * Specifies whether the signature area should be scaled to fit into the question width.
16170
- *
16171
- * Default value: `false`
16172
- *
16173
- * This property auto-scales the signature area to fill all available width within the question box while maintaining the default 3:2 aspect ratio. If you set [custom width](#signatureWidth) and [height](#signatureHeight) values, the setting will keep the aspect ratio of these dimensions.
16174
- *
16175
- * > The signature area is scaled only for display. The image saved in survey results will have dimensions specified by the [`signatureHeight`](#signatureHeight) and [`signatureWidth`](#signatureWidth) properties.
16176
- */
16177
- signatureAutoScaleEnabled: boolean;
16178
- /**
16179
- * Speicifies the minimum width of pen strokes, measured in pixels.
16180
- *
16181
- * Default value: 0.5
16182
- */
16183
- penMinWidth: number;
16184
- /**
16185
- * Speicifies the maximum width of pen strokes, measured in pixels.
16186
- *
16187
- * Default value: 2.5
16188
- */
16189
- penMaxWidth: number;
16190
- private get containerHeight();
16191
- private get containerWidth();
16192
- get renderedCanvasWidth(): string;
16193
- get height(): number;
16194
- set height(val: number);
16195
- /**
16196
- * Specifies whether to display a button that clears the signature area.
16197
- *
16198
- * Default value: `true`
16199
- */
16200
- get allowClear(): boolean;
16201
- set allowClear(val: boolean);
16202
- get canShowClearButton(): boolean;
16203
- /**
16204
- * Specifies a color for the pen.
16205
- *
16206
- * This property accepts color values in the following formats:
16207
- *
16208
- * - Hexadecimal colors (`"#FF0000"`)
16209
- * - RGB colors (`"rgb(255,0,0)"`)
16210
- * - Color names (`"red"`)
16211
- * @see backgroundColor
16212
- */
16213
- get penColor(): string;
16214
- set penColor(val: string);
16215
- /**
16216
- * Specifies a color for the signature area background. Ignored if [`backgroundImage`](#backgroundImage) is set.
16217
- *
16218
- * This property accepts color values in the following formats:
16219
- *
16220
- * - Hexadecimal colors (`"#FF0000"`)
16221
- * - RGB colors (`"rgb(255,0,0)"`)
16222
- * - Color names (`"red"`)
16223
- * @see penColor
16224
- */
16225
- get backgroundColor(): string;
16226
- set backgroundColor(val: string);
16227
- /**
16228
- * An image to display in the background of the signature area. Accepts a base64 or URL string value.
16229
- * @see backgroundColor
16230
- */
16231
- get backgroundImage(): string;
16232
- set backgroundImage(val: string);
16233
- get clearButtonCaption(): string;
16234
- /**
16235
- * A Boolean value that specifies whether to show the [placeholder](#placeholder).
16236
- *
16237
- * Default value: `true`
16238
- */
16239
- showPlaceholder: boolean;
16240
- needShowPlaceholder(): boolean;
16241
- /**
16242
- * A placeholder for the signature area. Applies when the [`showPlaceholder`](#showPlaceholder) property is `true`.
16243
- */
16244
- placeholder: string;
16245
- endLoadingFromJson(): void;
16246
- }
16247
- }
16248
16335
  declare module "surveyToc" {
16249
16336
  import { Action } from "actions/action";
16250
16337
  import { ListModel } from "list";
@@ -24383,6 +24470,18 @@ declare module "react/components/rating/rating-item-smiley" {
24383
24470
  render(): JSX.Element | null;
24384
24471
  }
24385
24472
  }
24473
+ declare module "react/components/rating/rating-dropdown-item" {
24474
+ import { SurveyElementBase } from "react/reactquestion_element";
24475
+ interface IRatingItemProps {
24476
+ item: any;
24477
+ }
24478
+ export class RatingDropdownItem extends SurveyElementBase<IRatingItemProps, any> {
24479
+ get item(): any;
24480
+ getStateElement(): any;
24481
+ render(): JSX.Element | null;
24482
+ renderDescription(item: any): JSX.Element;
24483
+ }
24484
+ }
24386
24485
  declare module "react/tagbox-filter" {
24387
24486
  import { DropdownMultiSelectListModel, QuestionTagboxModel } from "entries/core";
24388
24487
  import { SurveyElementBase } from "react/reactquestion_element";
@@ -24912,6 +25011,7 @@ declare module "react/reactquestion_rating" {
24912
25011
  declare module "react/rating-dropdown" {
24913
25012
  import { QuestionRatingModel } from "entries/core";
24914
25013
  import { SurveyQuestionDropdownBase } from "react/dropdown-base";
25014
+ export * from "react/components/rating/rating-dropdown-item";
24915
25015
  export class SurveyQuestionRatingDropdown extends SurveyQuestionDropdownBase<QuestionRatingModel> {
24916
25016
  constructor(props: any);
24917
25017
  protected renderElement(): JSX.Element;
@@ -24991,6 +25091,7 @@ declare module "react/signaturepad" {
24991
25091
  protected get question(): QuestionSignaturePadModel;
24992
25092
  protected renderElement(): JSX.Element;
24993
25093
  renderBackgroundImage(): JSX.Element | null;
25094
+ protected renderLoadingIndicator(): JSX.Element;
24994
25095
  renderCleanButton(): JSX.Element | null;
24995
25096
  }
24996
25097
  }
@@ -25136,6 +25237,7 @@ declare module "entries/react-ui-model" {
25136
25237
  export { RatingItem } from "react/components/rating/rating-item";
25137
25238
  export { RatingItemStar } from "react/components/rating/rating-item-star";
25138
25239
  export { RatingItemSmiley } from "react/components/rating/rating-item-smiley";
25240
+ export { RatingDropdownItem } from "react/components/rating/rating-dropdown-item";
25139
25241
  export { TagboxFilterString } from "react/tagbox-filter";
25140
25242
  export { SurveyQuestionOptionItem } from "react/dropdown-item";
25141
25243
  export { SurveyQuestionDropdownBase } from "react/dropdown-base";