survey-react 1.9.119 → 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/defaultV2.css +112 -62
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +9 -6
- package/modern.css.map +1 -1
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/survey.css +1 -1
- package/survey.css.map +1 -1
- package/survey.min.css +1 -1
- package/survey.react.d.ts +215 -174
- package/survey.react.js +429 -200
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +3 -3
package/survey.min.css
CHANGED
package/survey.react.d.ts
CHANGED
@@ -2307,6 +2307,7 @@ declare module "defaultCss/defaultV2Css" {
|
|
2307
2307
|
backgroundImage: string;
|
2308
2308
|
clearButton: string;
|
2309
2309
|
clearButtonIconId: string;
|
2310
|
+
loadingIndicator: string;
|
2310
2311
|
};
|
2311
2312
|
saveData: {
|
2312
2313
|
root: string;
|
@@ -3755,14 +3756,10 @@ declare module "question_file" {
|
|
3755
3756
|
import { Action } from "actions/action";
|
3756
3757
|
import { Camera } from "utils/camera";
|
3757
3758
|
import { LocalizableString } from "localizablestring";
|
3758
|
-
|
3759
|
-
|
3760
|
-
*
|
3761
|
-
* [View Demo](https://surveyjs.io/form-library/examples/file-upload/ (linkStyle))
|
3762
|
-
*/
|
3763
|
-
export class QuestionFileModel extends Question {
|
3759
|
+
export function dataUrl2File(dataUrl: string, fileName: string, type: string): File;
|
3760
|
+
export class QuestionFileModelBase extends Question {
|
3764
3761
|
isUploading: boolean;
|
3765
|
-
|
3762
|
+
currentState: string;
|
3766
3763
|
/**
|
3767
3764
|
* An event that is raised after the upload state has changed.
|
3768
3765
|
*
|
@@ -3773,10 +3770,37 @@ declare module "question_file" {
|
|
3773
3770
|
* - `options.state`: `string`\
|
3774
3771
|
* The current upload state: `"empty"`, `"loading"`, `"loaded"`, or `"error"`.
|
3775
3772
|
*/
|
3776
|
-
onUploadStateChanged: EventBase<
|
3777
|
-
onStateChanged: EventBase<
|
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;
|
3778
3803
|
previewValue: any[];
|
3779
|
-
currentState: string;
|
3780
3804
|
indexToShow: number;
|
3781
3805
|
pageSize: number;
|
3782
3806
|
containsMultiplyFiles: boolean;
|
@@ -3829,8 +3853,6 @@ declare module "question_file" {
|
|
3829
3853
|
private previewValueChanged;
|
3830
3854
|
isPreviewVisible(index: number): boolean;
|
3831
3855
|
getType(): string;
|
3832
|
-
clearValue(): void;
|
3833
|
-
clearOnDeletingContainer(): void;
|
3834
3856
|
/**
|
3835
3857
|
* Disable this property only to implement a custom preview.
|
3836
3858
|
*
|
@@ -3861,20 +3883,6 @@ declare module "question_file" {
|
|
3861
3883
|
*/
|
3862
3884
|
get acceptedTypes(): string;
|
3863
3885
|
set acceptedTypes(val: string);
|
3864
|
-
/**
|
3865
|
-
* Specifies whether to store file content as text in `SurveyModel`'s [`data`](https://surveyjs.io/form-library/documentation/surveymodel#data) property.
|
3866
|
-
*
|
3867
|
-
* 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.
|
3868
|
-
*/
|
3869
|
-
get storeDataAsText(): boolean;
|
3870
|
-
set storeDataAsText(val: boolean);
|
3871
|
-
/**
|
3872
|
-
* Enable this property if you want to wait until files are uploaded to complete the survey.
|
3873
|
-
*
|
3874
|
-
* Default value: `false`
|
3875
|
-
*/
|
3876
|
-
get waitForUpload(): boolean;
|
3877
|
-
set waitForUpload(val: boolean);
|
3878
3886
|
/**
|
3879
3887
|
* Specifies whether to show a preview of image files.
|
3880
3888
|
*/
|
@@ -3939,7 +3947,6 @@ declare module "question_file" {
|
|
3939
3947
|
get multipleRendered(): string;
|
3940
3948
|
get showChooseButton(): boolean;
|
3941
3949
|
get showFileDecorator(): boolean;
|
3942
|
-
get showLoadingIndicator(): boolean;
|
3943
3950
|
get allowShowPreview(): boolean;
|
3944
3951
|
get showPreviewContainer(): boolean;
|
3945
3952
|
get showRemoveButtonCore(): boolean;
|
@@ -3951,6 +3958,7 @@ declare module "question_file" {
|
|
3951
3958
|
*/
|
3952
3959
|
removeFile(name: string): void;
|
3953
3960
|
protected removeFileByContent(content: any): void;
|
3961
|
+
protected setValueFromResult(arg: any): void;
|
3954
3962
|
/**
|
3955
3963
|
* Loads multiple files into the question.
|
3956
3964
|
* @param files An array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects.
|
@@ -3964,8 +3972,6 @@ declare module "question_file" {
|
|
3964
3972
|
protected get isFileLoading(): boolean;
|
3965
3973
|
protected set isFileLoading(val: boolean);
|
3966
3974
|
protected getIsQuestionReady(): boolean;
|
3967
|
-
protected onCheckForErrors(errors: Array<SurveyError>, isOnValueChanged: boolean): void;
|
3968
|
-
protected stateChanged(state: string): void;
|
3969
3975
|
private allFilesOk;
|
3970
3976
|
private isFileImage;
|
3971
3977
|
getPlainData(options?: IPlainDataOptions): IQuestionPlainData;
|
@@ -4551,7 +4557,7 @@ declare module "question_baseselect" {
|
|
4551
4557
|
getStoreOthersAsComment(): boolean;
|
4552
4558
|
onSurveyLoad(): void;
|
4553
4559
|
onAnyValueChanged(name: string, questionName: string): void;
|
4554
|
-
updateValueFromSurvey(newValue: any): void;
|
4560
|
+
updateValueFromSurvey(newValue: any, clearData: boolean): void;
|
4555
4561
|
protected getCommentFromValue(newValue: any): string;
|
4556
4562
|
protected setOtherValueIntoValue(newValue: any): any;
|
4557
4563
|
onOtherValueInput(event: any): void;
|
@@ -4875,7 +4881,7 @@ declare module "question_expression" {
|
|
4875
4881
|
get formatedValue(): string;
|
4876
4882
|
protected updateFormatedValue(): void;
|
4877
4883
|
protected onValueChanged(): void;
|
4878
|
-
updateValueFromSurvey(newValue: any): void;
|
4884
|
+
updateValueFromSurvey(newValue: any, clearData: boolean): void;
|
4879
4885
|
protected getDisplayValueCore(keysAsText: boolean, value: any): any;
|
4880
4886
|
/**
|
4881
4887
|
* Specifies a display style for the question value.
|
@@ -6479,6 +6485,146 @@ declare module "question_paneldynamic" {
|
|
6479
6485
|
protected calcCssClasses(css: any): any;
|
6480
6486
|
}
|
6481
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
|
+
}
|
6482
6628
|
declare module "survey-events-api" {
|
6483
6629
|
import { IAction } from "actions/action";
|
6484
6630
|
import { Base } from "base";
|
@@ -6493,6 +6639,7 @@ declare module "survey-events-api" {
|
|
6493
6639
|
import { MatrixDropdownColumn } from "question_matrixdropdowncolumn";
|
6494
6640
|
import { QuestionMatrixDynamicModel } from "question_matrixdynamic";
|
6495
6641
|
import { QuestionPanelDynamicModel } from "question_paneldynamic";
|
6642
|
+
import { QuestionSignaturePadModel } from "question_signaturepad";
|
6496
6643
|
import { SurveyModel } from "survey";
|
6497
6644
|
import { SurveyError } from "survey-error";
|
6498
6645
|
import { Trigger } from "trigger";
|
@@ -6504,9 +6651,9 @@ declare module "survey-events-api" {
|
|
6504
6651
|
}
|
6505
6652
|
export interface FileQuestionEventMixin {
|
6506
6653
|
/**
|
6507
|
-
* 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.
|
6508
6655
|
*/
|
6509
|
-
question: QuestionFileModel;
|
6656
|
+
question: QuestionFileModel | QuestionSignaturePadModel;
|
6510
6657
|
}
|
6511
6658
|
export interface PanelDynamicQuestionEventMixin {
|
6512
6659
|
/**
|
@@ -8382,6 +8529,23 @@ declare module "header" {
|
|
8382
8529
|
processResponsiveness(width: number): void;
|
8383
8530
|
}
|
8384
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
|
+
}
|
8385
8549
|
declare module "survey" {
|
8386
8550
|
import { JsonError } from "jsonobject";
|
8387
8551
|
import { Base, EventBase } from "base";
|
@@ -8411,6 +8575,7 @@ declare module "survey" {
|
|
8411
8575
|
import { ITheme, ImageFit, ImageAttachment } from "themes";
|
8412
8576
|
import { PopupModel } from "popup";
|
8413
8577
|
import { Cover } from "header";
|
8578
|
+
import { QuestionSignaturePadModel } from "question_signaturepad";
|
8414
8579
|
/**
|
8415
8580
|
* The `SurveyModel` object contains properties and methods that allow you to control the survey and access its elements.
|
8416
8581
|
*
|
@@ -8705,6 +8870,8 @@ declare module "survey" {
|
|
8705
8870
|
* For information on event handler parameters, refer to descriptions within the interface.
|
8706
8871
|
*
|
8707
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))
|
8708
8875
|
* @see onGetQuestionTitle
|
8709
8876
|
* @see onGetQuestionNo
|
8710
8877
|
*/
|
@@ -8744,7 +8911,7 @@ declare module "survey" {
|
|
8744
8911
|
*/
|
8745
8912
|
onGetResult: EventBase<SurveyModel, GetResultEvent>;
|
8746
8913
|
/**
|
8747
|
-
* 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.
|
8748
8915
|
*
|
8749
8916
|
* For information on event handler parameters, refer to descriptions within the interface.
|
8750
8917
|
*
|
@@ -8766,7 +8933,7 @@ declare module "survey" {
|
|
8766
8933
|
*/
|
8767
8934
|
onDownloadFile: EventBase<SurveyModel, DownloadFileEvent>;
|
8768
8935
|
/**
|
8769
|
-
* 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.
|
8770
8937
|
*
|
8771
8938
|
* For information on event handler parameters, refer to descriptions within the interface.
|
8772
8939
|
*
|
@@ -9521,10 +9688,11 @@ declare module "survey" {
|
|
9521
9688
|
getSurveyErrorCustomText(obj: PanelModel | Question | SurveyModel, text: string, error: SurveyError): string;
|
9522
9689
|
getQuestionDisplayValue(question: Question, displayValue: any): any;
|
9523
9690
|
/**
|
9524
|
-
*
|
9691
|
+
* A message that is displayed when a survey does not contain visible pages or questions.
|
9525
9692
|
* @see [Localization & Globalization](https://surveyjs.io/form-library/documentation/survey-localization)
|
9526
9693
|
*/
|
9527
9694
|
get emptySurveyText(): string;
|
9695
|
+
set emptySurveyText(val: string);
|
9528
9696
|
/**
|
9529
9697
|
* An image URL or a Base64-encoded image to use as a survey logo.
|
9530
9698
|
*
|
@@ -9899,7 +10067,7 @@ declare module "survey" {
|
|
9899
10067
|
* @see setValue
|
9900
10068
|
*/
|
9901
10069
|
mergeData(data: any): void;
|
9902
|
-
setDataCore(data: any): void;
|
10070
|
+
setDataCore(data: any, clearData?: boolean): void;
|
9903
10071
|
getStructuredData(includePages?: boolean, level?: number): any;
|
9904
10072
|
setStructuredData(data: any, doMerge?: boolean): void;
|
9905
10073
|
private collectDataFromPanel;
|
@@ -10518,14 +10686,14 @@ declare module "survey" {
|
|
10518
10686
|
* }
|
10519
10687
|
* );
|
10520
10688
|
* ```
|
10521
|
-
* @param question A [File Upload question instance](https://surveyjs.io/form-library/documentation/api-reference/file-model).
|
10522
|
-
* @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).
|
10523
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.
|
10524
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.
|
10525
10693
|
* @see onUploadFiles
|
10526
10694
|
* @see downloadFile
|
10527
10695
|
*/
|
10528
|
-
uploadFiles(question: QuestionFileModel, name: string, files: File[], callback: (data: any | Array<any>, errors?: any | Array<any>) => any): void;
|
10696
|
+
uploadFiles(question: QuestionFileModel | QuestionSignaturePadModel, name: string, files: File[], callback: (data: any | Array<any>, errors?: any | Array<any>) => any): void;
|
10529
10697
|
/**
|
10530
10698
|
* Downloads a file from a server.
|
10531
10699
|
*
|
@@ -10557,7 +10725,7 @@ declare module "survey" {
|
|
10557
10725
|
* @see uploadFiles
|
10558
10726
|
*/
|
10559
10727
|
downloadFile(question: QuestionFileModel, questionName: string, fileValue: any, callback: (status: string, data: any) => any): void;
|
10560
|
-
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;
|
10561
10729
|
updateChoicesFromServer(question: QuestionSelectBase, choices: Array<ItemValue>, serverResult: any): Array<ItemValue>;
|
10562
10730
|
loadedChoicesFromServer(question: IQuestion): void;
|
10563
10731
|
protected createSurveyService(): dxSurveyService;
|
@@ -11123,6 +11291,7 @@ declare module "survey" {
|
|
11123
11291
|
*/
|
11124
11292
|
applyTheme(theme: ITheme): void;
|
11125
11293
|
themeChanged(theme: ITheme): void;
|
11294
|
+
private taskManager;
|
11126
11295
|
/**
|
11127
11296
|
* Disposes of the survey model.
|
11128
11297
|
*
|
@@ -12398,7 +12567,7 @@ declare module "question" {
|
|
12398
12567
|
onMouseDown(): void;
|
12399
12568
|
protected setNewComment(newValue: string): void;
|
12400
12569
|
protected getValidName(name: string): string;
|
12401
|
-
updateValueFromSurvey(newValue: any): void;
|
12570
|
+
updateValueFromSurvey(newValue: any, clearData?: boolean): void;
|
12402
12571
|
private updateValueFromSurveyCore;
|
12403
12572
|
updateCommentFromSurvey(newValue: any): any;
|
12404
12573
|
protected onChangeQuestionValue(newValue: any): void;
|
@@ -13329,7 +13498,7 @@ declare module "base-interfaces" {
|
|
13329
13498
|
hasTitle: boolean;
|
13330
13499
|
isEmpty(): boolean;
|
13331
13500
|
onSurveyValueChanged(newValue: any): any;
|
13332
|
-
updateValueFromSurvey(newValue: any):
|
13501
|
+
updateValueFromSurvey(newValue: any, clearData: boolean): void;
|
13333
13502
|
updateCommentFromSurvey(newValue: any): any;
|
13334
13503
|
supportGoNextPageAutomatic(): boolean;
|
13335
13504
|
clearUnusedValues(): any;
|
@@ -13393,7 +13562,7 @@ declare module "base-interfaces" {
|
|
13393
13562
|
svgMountContainer: HTMLElement | string;
|
13394
13563
|
stylesSheetsMountContainer: HTMLElement;
|
13395
13564
|
};
|
13396
|
-
export type LayoutElementContainer = "header" | "footer" | "left" | "right" | "contentTop" | "contentBottom";
|
13565
|
+
export type LayoutElementContainer = "header" | "footer" | "left" | "right" | "contentTop" | "contentBottom" | "center";
|
13397
13566
|
export type HorizontalAlignment = "left" | "center" | "right";
|
13398
13567
|
export type VerticalAlignment = "top" | "middle" | "bottom";
|
13399
13568
|
export interface ISurveyLayoutElement {
|
@@ -15100,7 +15269,7 @@ declare module "question_checkbox" {
|
|
15100
15269
|
private shouldCheckMaxSelectedChoices;
|
15101
15270
|
private checkMinSelectedChoicesUnreached;
|
15102
15271
|
protected getItemClassCore(item: any, options: any): string;
|
15103
|
-
updateValueFromSurvey(newValue: any): void;
|
15272
|
+
updateValueFromSurvey(newValue: any, clearData: boolean): void;
|
15104
15273
|
protected setDefaultValue(): void;
|
15105
15274
|
private addIntoInvisibleOldValues;
|
15106
15275
|
protected hasValueToClearIncorrectValues(): boolean;
|
@@ -16163,135 +16332,6 @@ declare module "question_image" {
|
|
16163
16332
|
private isVideo;
|
16164
16333
|
}
|
16165
16334
|
}
|
16166
|
-
declare module "question_signaturepad" {
|
16167
|
-
import { Question } from "question";
|
16168
|
-
import { ITheme } from "themes";
|
16169
|
-
/**
|
16170
|
-
* A class that describes the Signature question type.
|
16171
|
-
*
|
16172
|
-
* [View Demo](https://surveyjs.io/form-library/examples/signature-pad-widget-javascript/ (linkStyle))
|
16173
|
-
*/
|
16174
|
-
export class QuestionSignaturePadModel extends Question {
|
16175
|
-
isDrawingValue: boolean;
|
16176
|
-
private getPenColorFromTheme;
|
16177
|
-
private updateColors;
|
16178
|
-
protected getCssRoot(cssClasses: any): string;
|
16179
|
-
protected updateValue(): void;
|
16180
|
-
constructor(name: string);
|
16181
|
-
getType(): string;
|
16182
|
-
afterRenderQuestionElement(el: HTMLElement): void;
|
16183
|
-
beforeDestroyQuestionElement(el: HTMLElement): void;
|
16184
|
-
themeChanged(theme: ITheme): void;
|
16185
|
-
private canvas;
|
16186
|
-
private scale;
|
16187
|
-
private valueIsUpdatingInternally;
|
16188
|
-
private resizeCanvas;
|
16189
|
-
private scaleCanvas;
|
16190
|
-
private refreshCanvas;
|
16191
|
-
private updateValueHandler;
|
16192
|
-
initSignaturePad(el: HTMLElement): void;
|
16193
|
-
destroySignaturePad(el: HTMLElement): void;
|
16194
|
-
/**
|
16195
|
-
* Specifies the format in which to store the signature image.
|
16196
|
-
*
|
16197
|
-
* Possible values:
|
16198
|
-
*
|
16199
|
-
* - `"png"` (default)
|
16200
|
-
* - `"jpeg"`
|
16201
|
-
* - `"svg"`
|
16202
|
-
*/
|
16203
|
-
get dataFormat(): string;
|
16204
|
-
set dataFormat(val: string);
|
16205
|
-
/**
|
16206
|
-
* Specifies the width of the signature area. Accepts positive integer numbers.
|
16207
|
-
*/
|
16208
|
-
get signatureWidth(): number;
|
16209
|
-
set signatureWidth(val: number);
|
16210
|
-
/**
|
16211
|
-
* Specifies the height of the signature area. Accepts positive integer numbers.
|
16212
|
-
*/
|
16213
|
-
get signatureHeight(): number;
|
16214
|
-
set signatureHeight(val: number);
|
16215
|
-
/**
|
16216
|
-
* Specifies whether the signature area should be scaled to fit into the question width.
|
16217
|
-
*
|
16218
|
-
* Default value: `false`
|
16219
|
-
*
|
16220
|
-
* 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.
|
16221
|
-
*
|
16222
|
-
* > 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.
|
16223
|
-
*/
|
16224
|
-
signatureAutoScaleEnabled: boolean;
|
16225
|
-
/**
|
16226
|
-
* Speicifies the minimum width of pen strokes, measured in pixels.
|
16227
|
-
*
|
16228
|
-
* Default value: 0.5
|
16229
|
-
*/
|
16230
|
-
penMinWidth: number;
|
16231
|
-
/**
|
16232
|
-
* Speicifies the maximum width of pen strokes, measured in pixels.
|
16233
|
-
*
|
16234
|
-
* Default value: 2.5
|
16235
|
-
*/
|
16236
|
-
penMaxWidth: number;
|
16237
|
-
private get containerHeight();
|
16238
|
-
private get containerWidth();
|
16239
|
-
get renderedCanvasWidth(): string;
|
16240
|
-
get height(): number;
|
16241
|
-
set height(val: number);
|
16242
|
-
/**
|
16243
|
-
* Specifies whether to display a button that clears the signature area.
|
16244
|
-
*
|
16245
|
-
* Default value: `true`
|
16246
|
-
*/
|
16247
|
-
get allowClear(): boolean;
|
16248
|
-
set allowClear(val: boolean);
|
16249
|
-
get canShowClearButton(): boolean;
|
16250
|
-
/**
|
16251
|
-
* Specifies a color for the pen.
|
16252
|
-
*
|
16253
|
-
* This property accepts color values in the following formats:
|
16254
|
-
*
|
16255
|
-
* - Hexadecimal colors (`"#FF0000"`)
|
16256
|
-
* - RGB colors (`"rgb(255,0,0)"`)
|
16257
|
-
* - Color names (`"red"`)
|
16258
|
-
* @see backgroundColor
|
16259
|
-
*/
|
16260
|
-
get penColor(): string;
|
16261
|
-
set penColor(val: string);
|
16262
|
-
/**
|
16263
|
-
* Specifies a color for the signature area background. Ignored if [`backgroundImage`](#backgroundImage) is set.
|
16264
|
-
*
|
16265
|
-
* This property accepts color values in the following formats:
|
16266
|
-
*
|
16267
|
-
* - Hexadecimal colors (`"#FF0000"`)
|
16268
|
-
* - RGB colors (`"rgb(255,0,0)"`)
|
16269
|
-
* - Color names (`"red"`)
|
16270
|
-
* @see penColor
|
16271
|
-
*/
|
16272
|
-
get backgroundColor(): string;
|
16273
|
-
set backgroundColor(val: string);
|
16274
|
-
/**
|
16275
|
-
* An image to display in the background of the signature area. Accepts a base64 or URL string value.
|
16276
|
-
* @see backgroundColor
|
16277
|
-
*/
|
16278
|
-
get backgroundImage(): string;
|
16279
|
-
set backgroundImage(val: string);
|
16280
|
-
get clearButtonCaption(): string;
|
16281
|
-
/**
|
16282
|
-
* A Boolean value that specifies whether to show the [placeholder](#placeholder).
|
16283
|
-
*
|
16284
|
-
* Default value: `true`
|
16285
|
-
*/
|
16286
|
-
showPlaceholder: boolean;
|
16287
|
-
needShowPlaceholder(): boolean;
|
16288
|
-
/**
|
16289
|
-
* A placeholder for the signature area. Applies when the [`showPlaceholder`](#showPlaceholder) property is `true`.
|
16290
|
-
*/
|
16291
|
-
placeholder: string;
|
16292
|
-
endLoadingFromJson(): void;
|
16293
|
-
}
|
16294
|
-
}
|
16295
16335
|
declare module "surveyToc" {
|
16296
16336
|
import { Action } from "actions/action";
|
16297
16337
|
import { ListModel } from "list";
|
@@ -25051,6 +25091,7 @@ declare module "react/signaturepad" {
|
|
25051
25091
|
protected get question(): QuestionSignaturePadModel;
|
25052
25092
|
protected renderElement(): JSX.Element;
|
25053
25093
|
renderBackgroundImage(): JSX.Element | null;
|
25094
|
+
protected renderLoadingIndicator(): JSX.Element;
|
25054
25095
|
renderCleanButton(): JSX.Element | null;
|
25055
25096
|
}
|
25056
25097
|
}
|