survey-react 1.9.119 → 1.9.121

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
@@ -1022,18 +1022,6 @@ declare module "conditions" {
1022
1022
  protected doOnComplete(res: any): void;
1023
1023
  }
1024
1024
  }
1025
- declare module "rendererFactory" {
1026
- import { Question } from "question";
1027
- export class RendererFactory {
1028
- static Instance: RendererFactory;
1029
- private renderersHash;
1030
- unregisterRenderer(questionType: string, rendererAs: string): void;
1031
- registerRenderer(questionType: string, renderAs: string, renderer: any): void;
1032
- getRenderer(questionType: string, renderAs: string): any;
1033
- getRendererByQuestion(question: Question): any;
1034
- clear(): void;
1035
- }
1036
- }
1037
1025
  declare module "utils/cssClassBuilder" {
1038
1026
  export class CssClassBuilder {
1039
1027
  private classes;
@@ -1204,7 +1192,7 @@ declare module "actions/container" {
1204
1192
  addAction(val: IAction, sortByVisibleIndex?: boolean): T;
1205
1193
  private sortItems;
1206
1194
  setItems(items: Array<IAction>, sortByVisibleIndex?: boolean): void;
1207
- initResponsivityManager(container: HTMLDivElement): void;
1195
+ initResponsivityManager(container: HTMLDivElement, delayedUpdateFunction?: (callback: () => void) => void): void;
1208
1196
  resetResponsivityManager(): void;
1209
1197
  getActionById(id: string): T;
1210
1198
  dispose(): void;
@@ -1614,6 +1602,7 @@ declare module "utils/responsivity-manager" {
1614
1602
  private model;
1615
1603
  private itemsSelector;
1616
1604
  private dotsItemSize;
1605
+ private delayedUpdateFunction?;
1617
1606
  private resizeObserver;
1618
1607
  private isInitialized;
1619
1608
  protected minDimensionConst: number;
@@ -1623,11 +1612,12 @@ declare module "utils/responsivity-manager" {
1623
1612
  private dotsSizeConst;
1624
1613
  protected recalcMinDimensionConst: boolean;
1625
1614
  getComputedStyle: (elt: Element) => CSSStyleDeclaration;
1626
- constructor(container: HTMLDivElement, model: AdaptiveActionContainer, itemsSelector: string, dotsItemSize?: number);
1615
+ constructor(container: HTMLDivElement, model: AdaptiveActionContainer, itemsSelector: string, dotsItemSize?: number, delayedUpdateFunction?: (callback: () => void) => void);
1627
1616
  protected getDimensions(element: HTMLElement): IDimensions;
1628
1617
  protected getAvailableSpace(): number;
1629
1618
  protected calcItemSize(item: HTMLDivElement): number;
1630
1619
  private calcMinDimension;
1620
+ private getRenderedVisibleActionsCount;
1631
1621
  private calcItemsSizes;
1632
1622
  protected calcActionDimensions(currentAction: Action, item: HTMLDivElement): void;
1633
1623
  private get isContainerVisible();
@@ -1635,7 +1625,7 @@ declare module "utils/responsivity-manager" {
1635
1625
  dispose(): void;
1636
1626
  }
1637
1627
  export class VerticalResponsivityManager extends ResponsivityManager {
1638
- constructor(container: HTMLDivElement, model: AdaptiveActionContainer, itemsSelector: string, dotsItemSize?: number, minDimension?: number);
1628
+ constructor(container: HTMLDivElement, model: AdaptiveActionContainer, itemsSelector: string, dotsItemSize?: number, minDimension?: number, delayedUpdateFunction?: (callback: () => void) => void);
1639
1629
  protected getDimensions(): IDimensions;
1640
1630
  protected getAvailableSpace(): number;
1641
1631
  protected calcItemSize(item: HTMLDivElement): number;
@@ -1664,7 +1654,7 @@ declare module "actions/adaptive-container" {
1664
1654
  protected getRenderedActions(): Array<T>;
1665
1655
  protected raiseUpdate(isResetInitialized: boolean): void;
1666
1656
  fit(dimension: number, dotsItemSize: number): void;
1667
- initResponsivityManager(container: HTMLDivElement): void;
1657
+ initResponsivityManager(container: HTMLDivElement, delayedUpdateFunction?: (callback: () => void) => void): void;
1668
1658
  resetResponsivityManager(): void;
1669
1659
  setActionsMode(mode: actionModeType): void;
1670
1660
  dispose(): void;
@@ -2307,6 +2297,7 @@ declare module "defaultCss/defaultV2Css" {
2307
2297
  backgroundImage: string;
2308
2298
  clearButton: string;
2309
2299
  clearButtonIconId: string;
2300
+ loadingIndicator: string;
2310
2301
  };
2311
2302
  saveData: {
2312
2303
  root: string;
@@ -2919,6 +2910,7 @@ declare module "question_custom" {
2919
2910
  constructor(name: string, customQuestion: ComponentQuestionJSON);
2920
2911
  getType(): string;
2921
2912
  locStrsChanged(): void;
2913
+ localeChanged(): void;
2922
2914
  protected createWrapper(): void;
2923
2915
  protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
2924
2916
  itemValuePropertyChanged(item: ItemValue, name: string, oldValue: any, newValue: any): void;
@@ -3489,7 +3481,7 @@ declare module "panel" {
3489
3481
  set visible(value: boolean);
3490
3482
  onHidingContent(): void;
3491
3483
  protected onVisibleChanged(): void;
3492
- protected notifyStateChanged(): void;
3484
+ protected notifyStateChanged(prevState: string): void;
3493
3485
  /**
3494
3486
  * Returns `true` if the panel/page is visible or the survey is currently in design mode.
3495
3487
  *
@@ -3670,7 +3662,7 @@ declare module "panel" {
3670
3662
  */
3671
3663
  get no(): string;
3672
3664
  protected setNo(visibleIndex: number): void;
3673
- protected notifyStateChanged(): void;
3665
+ protected notifyStateChanged(prevState: string): void;
3674
3666
  protected createLocTitleProperty(): LocalizableString;
3675
3667
  protected beforeSetVisibleIndex(index: number): number;
3676
3668
  protected getPanelStartIndex(index: number): number;
@@ -3755,14 +3747,10 @@ declare module "question_file" {
3755
3747
  import { Action } from "actions/action";
3756
3748
  import { Camera } from "utils/camera";
3757
3749
  import { LocalizableString } from "localizablestring";
3758
- /**
3759
- * A class that describes the File Upload question type.
3760
- *
3761
- * [View Demo](https://surveyjs.io/form-library/examples/file-upload/ (linkStyle))
3762
- */
3763
- export class QuestionFileModel extends Question {
3750
+ export function dataUrl2File(dataUrl: string, fileName: string, type: string): File;
3751
+ export class QuestionFileModelBase extends Question {
3764
3752
  isUploading: boolean;
3765
- isDragging: boolean;
3753
+ currentState: string;
3766
3754
  /**
3767
3755
  * An event that is raised after the upload state has changed.
3768
3756
  *
@@ -3773,10 +3761,37 @@ declare module "question_file" {
3773
3761
  * - `options.state`: `string`\
3774
3762
  * The current upload state: `"empty"`, `"loading"`, `"loaded"`, or `"error"`.
3775
3763
  */
3776
- onUploadStateChanged: EventBase<QuestionFileModel>;
3777
- onStateChanged: EventBase<QuestionFileModel>;
3764
+ onUploadStateChanged: EventBase<QuestionFileModelBase>;
3765
+ onStateChanged: EventBase<QuestionFileModelBase>;
3766
+ protected stateChanged(state: string): void;
3767
+ get showLoadingIndicator(): boolean;
3768
+ /**
3769
+ * Specifies whether to store file or signature content as text in `SurveyModel`'s [`data`](https://surveyjs.io/form-library/documentation/surveymodel#data) property.
3770
+ *
3771
+ * 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.
3772
+ */
3773
+ get storeDataAsText(): boolean;
3774
+ set storeDataAsText(val: boolean);
3775
+ /**
3776
+ * Enable this property if you want to wait until files are uploaded to complete the survey.
3777
+ *
3778
+ * Default value: `false`
3779
+ */
3780
+ get waitForUpload(): boolean;
3781
+ set waitForUpload(val: boolean);
3782
+ clearValue(): void;
3783
+ clearOnDeletingContainer(): void;
3784
+ protected onCheckForErrors(errors: Array<SurveyError>, isOnValueChanged: boolean): void;
3785
+ protected uploadFiles(files: File[]): void;
3786
+ }
3787
+ /**
3788
+ * A class that describes the File Upload question type.
3789
+ *
3790
+ * [View Demo](https://surveyjs.io/form-library/examples/file-upload/ (linkStyle))
3791
+ */
3792
+ export class QuestionFileModel extends QuestionFileModelBase {
3793
+ isDragging: boolean;
3778
3794
  previewValue: any[];
3779
- currentState: string;
3780
3795
  indexToShow: number;
3781
3796
  pageSize: number;
3782
3797
  containsMultiplyFiles: boolean;
@@ -3829,8 +3844,6 @@ declare module "question_file" {
3829
3844
  private previewValueChanged;
3830
3845
  isPreviewVisible(index: number): boolean;
3831
3846
  getType(): string;
3832
- clearValue(): void;
3833
- clearOnDeletingContainer(): void;
3834
3847
  /**
3835
3848
  * Disable this property only to implement a custom preview.
3836
3849
  *
@@ -3861,20 +3874,6 @@ declare module "question_file" {
3861
3874
  */
3862
3875
  get acceptedTypes(): string;
3863
3876
  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
3877
  /**
3879
3878
  * Specifies whether to show a preview of image files.
3880
3879
  */
@@ -3939,7 +3938,6 @@ declare module "question_file" {
3939
3938
  get multipleRendered(): string;
3940
3939
  get showChooseButton(): boolean;
3941
3940
  get showFileDecorator(): boolean;
3942
- get showLoadingIndicator(): boolean;
3943
3941
  get allowShowPreview(): boolean;
3944
3942
  get showPreviewContainer(): boolean;
3945
3943
  get showRemoveButtonCore(): boolean;
@@ -3951,6 +3949,7 @@ declare module "question_file" {
3951
3949
  */
3952
3950
  removeFile(name: string): void;
3953
3951
  protected removeFileByContent(content: any): void;
3952
+ protected setValueFromResult(arg: any): void;
3954
3953
  /**
3955
3954
  * Loads multiple files into the question.
3956
3955
  * @param files An array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects.
@@ -3964,8 +3963,6 @@ declare module "question_file" {
3964
3963
  protected get isFileLoading(): boolean;
3965
3964
  protected set isFileLoading(val: boolean);
3966
3965
  protected getIsQuestionReady(): boolean;
3967
- protected onCheckForErrors(errors: Array<SurveyError>, isOnValueChanged: boolean): void;
3968
- protected stateChanged(state: string): void;
3969
3966
  private allFilesOk;
3970
3967
  private isFileImage;
3971
3968
  getPlainData(options?: IPlainDataOptions): IQuestionPlainData;
@@ -4551,7 +4548,7 @@ declare module "question_baseselect" {
4551
4548
  getStoreOthersAsComment(): boolean;
4552
4549
  onSurveyLoad(): void;
4553
4550
  onAnyValueChanged(name: string, questionName: string): void;
4554
- updateValueFromSurvey(newValue: any): void;
4551
+ updateValueFromSurvey(newValue: any, clearData: boolean): void;
4555
4552
  protected getCommentFromValue(newValue: any): string;
4556
4553
  protected setOtherValueIntoValue(newValue: any): any;
4557
4554
  onOtherValueInput(event: any): void;
@@ -4875,7 +4872,7 @@ declare module "question_expression" {
4875
4872
  get formatedValue(): string;
4876
4873
  protected updateFormatedValue(): void;
4877
4874
  protected onValueChanged(): void;
4878
- updateValueFromSurvey(newValue: any): void;
4875
+ updateValueFromSurvey(newValue: any, clearData: boolean): void;
4879
4876
  protected getDisplayValueCore(keysAsText: boolean, value: any): any;
4880
4877
  /**
4881
4878
  * Specifies a display style for the question value.
@@ -6479,6 +6476,146 @@ declare module "question_paneldynamic" {
6479
6476
  protected calcCssClasses(css: any): any;
6480
6477
  }
6481
6478
  }
6479
+ declare module "question_signaturepad" {
6480
+ import { ITheme } from "themes";
6481
+ import { QuestionFileModelBase } from "question_file";
6482
+ /**
6483
+ * A class that describes the Signature question type.
6484
+ *
6485
+ * [View Demo](https://surveyjs.io/form-library/examples/signature-pad-widget-javascript/ (linkStyle))
6486
+ */
6487
+ export class QuestionSignaturePadModel extends QuestionFileModelBase {
6488
+ isDrawingValue: boolean;
6489
+ isReadyForUpload: boolean;
6490
+ private getPenColorFromTheme;
6491
+ private updateColors;
6492
+ protected getCssRoot(cssClasses: any): string;
6493
+ protected getFormat(): "" | "image/svg+xml" | "image/jpeg";
6494
+ protected updateValue(): void;
6495
+ constructor(name: string);
6496
+ getType(): string;
6497
+ afterRenderQuestionElement(el: HTMLElement): void;
6498
+ beforeDestroyQuestionElement(el: HTMLElement): void;
6499
+ themeChanged(theme: ITheme): void;
6500
+ private canvas;
6501
+ private element;
6502
+ private scale;
6503
+ private valueIsUpdatingInternally;
6504
+ valueWasChangedFromLastUpload: boolean;
6505
+ private resizeCanvas;
6506
+ private scaleCanvas;
6507
+ private fromDataUrl;
6508
+ private fromUrl;
6509
+ private refreshCanvas;
6510
+ private updateValueHandler;
6511
+ initSignaturePad(el: HTMLElement): void;
6512
+ destroySignaturePad(el: HTMLElement): void;
6513
+ /**
6514
+ * Specifies the format in which to store the signature image.
6515
+ *
6516
+ * Possible values:
6517
+ *
6518
+ * - `"png"` (default)
6519
+ * - `"jpeg"`
6520
+ * - `"svg"`
6521
+ */
6522
+ get dataFormat(): string;
6523
+ set dataFormat(val: string);
6524
+ /**
6525
+ * Specifies the width of the signature area. Accepts positive integer numbers.
6526
+ */
6527
+ get signatureWidth(): number;
6528
+ set signatureWidth(val: number);
6529
+ /**
6530
+ * Specifies the height of the signature area. Accepts positive integer numbers.
6531
+ */
6532
+ get signatureHeight(): number;
6533
+ set signatureHeight(val: number);
6534
+ /**
6535
+ * Specifies whether the signature area should be scaled to fit into the question width.
6536
+ *
6537
+ * Default value: `false`
6538
+ *
6539
+ * 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.
6540
+ *
6541
+ * > 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.
6542
+ */
6543
+ signatureAutoScaleEnabled: boolean;
6544
+ /**
6545
+ * Speicifies the minimum width of pen strokes, measured in pixels.
6546
+ *
6547
+ * Default value: 0.5
6548
+ */
6549
+ penMinWidth: number;
6550
+ /**
6551
+ * Speicifies the maximum width of pen strokes, measured in pixels.
6552
+ *
6553
+ * Default value: 2.5
6554
+ */
6555
+ penMaxWidth: number;
6556
+ private get containerHeight();
6557
+ private get containerWidth();
6558
+ get renderedCanvasWidth(): string;
6559
+ get height(): number;
6560
+ set height(val: number);
6561
+ /**
6562
+ * Specifies whether to display a button that clears the signature area.
6563
+ *
6564
+ * Default value: `true`
6565
+ */
6566
+ get allowClear(): boolean;
6567
+ set allowClear(val: boolean);
6568
+ get canShowClearButton(): boolean;
6569
+ /**
6570
+ * Specifies a color for the pen.
6571
+ *
6572
+ * This property accepts color values in the following formats:
6573
+ *
6574
+ * - Hexadecimal colors (`"#FF0000"`)
6575
+ * - RGB colors (`"rgb(255,0,0)"`)
6576
+ * - Color names (`"red"`)
6577
+ * @see backgroundColor
6578
+ */
6579
+ get penColor(): string;
6580
+ set penColor(val: string);
6581
+ /**
6582
+ * Specifies a color for the signature area background. Ignored if [`backgroundImage`](#backgroundImage) is set.
6583
+ *
6584
+ * This property accepts color values in the following formats:
6585
+ *
6586
+ * - Hexadecimal colors (`"#FF0000"`)
6587
+ * - RGB colors (`"rgb(255,0,0)"`)
6588
+ * - Color names (`"red"`)
6589
+ * @see penColor
6590
+ */
6591
+ get backgroundColor(): string;
6592
+ set backgroundColor(val: string);
6593
+ /**
6594
+ * An image to display in the background of the signature area. Accepts a base64 or URL string value.
6595
+ * @see backgroundColor
6596
+ */
6597
+ get backgroundImage(): string;
6598
+ set backgroundImage(val: string);
6599
+ get clearButtonCaption(): string;
6600
+ /**
6601
+ * A Boolean value that specifies whether to show the [placeholder](#placeholder).
6602
+ *
6603
+ * Default value: `true`
6604
+ */
6605
+ showPlaceholder: boolean;
6606
+ nothingIsDrawn(): boolean;
6607
+ needShowPlaceholder(): boolean;
6608
+ /**
6609
+ * A placeholder for the signature area. Applies when the [`showPlaceholder`](#showPlaceholder) property is `true`.
6610
+ */
6611
+ placeholder: string;
6612
+ onBlur: (event: any) => void;
6613
+ protected uploadResultItemToValue(r: any): any;
6614
+ protected setValueFromResult(arg: any): void;
6615
+ clearValue(): void;
6616
+ endLoadingFromJson(): void;
6617
+ }
6618
+ }
6482
6619
  declare module "survey-events-api" {
6483
6620
  import { IAction } from "actions/action";
6484
6621
  import { Base } from "base";
@@ -6493,6 +6630,7 @@ declare module "survey-events-api" {
6493
6630
  import { MatrixDropdownColumn } from "question_matrixdropdowncolumn";
6494
6631
  import { QuestionMatrixDynamicModel } from "question_matrixdynamic";
6495
6632
  import { QuestionPanelDynamicModel } from "question_paneldynamic";
6633
+ import { QuestionSignaturePadModel } from "question_signaturepad";
6496
6634
  import { SurveyModel } from "survey";
6497
6635
  import { SurveyError } from "survey-error";
6498
6636
  import { Trigger } from "trigger";
@@ -6504,9 +6642,9 @@ declare module "survey-events-api" {
6504
6642
  }
6505
6643
  export interface FileQuestionEventMixin {
6506
6644
  /**
6507
- * A File Upload question instance for which the event is raised.
6645
+ * A File Upload or Signature Pad question instance for which the event is raised.
6508
6646
  */
6509
- question: QuestionFileModel;
6647
+ question: QuestionFileModel | QuestionSignaturePadModel;
6510
6648
  }
6511
6649
  export interface PanelDynamicQuestionEventMixin {
6512
6650
  /**
@@ -8195,15 +8333,16 @@ declare module "question_multipletext" {
8195
8333
  * }
8196
8334
  * ```
8197
8335
  *
8198
- * To enable Markdown support for the `title` property, implement Markdown-to-HTML conversion in the [onTextMarkdown](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onTextMarkdown) event handler. For an example, refer to the following demo: [Convert Markdown to HTML with Showdown](https://surveyjs.io/form-library/examples/edit-survey-questions-markdown/).
8336
+ * To enable Markdown support for the `title` property, implement Markdown-to-HTML conversion in the [`onTextMarkdown`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onTextMarkdown) event handler. For an example, refer to the following demo: [Convert Markdown to HTML with Showdown](https://surveyjs.io/form-library/examples/edit-survey-questions-markdown/).
8337
+ * @see itemTitleWidth
8199
8338
  * @see addItem
8200
8339
  */
8201
8340
  get items(): Array<MultipleTextItemModel>;
8202
8341
  set items(val: Array<MultipleTextItemModel>);
8203
8342
  /**
8204
8343
  * Adds a new input item.
8205
- * @param name An item name
8206
- * @param title (Optional) An item title
8344
+ * @param name An item name.
8345
+ * @param title (Optional) An item title.
8207
8346
  * @see items
8208
8347
  */
8209
8348
  addItem(name: string, title?: string): MultipleTextItemModel;
@@ -8242,6 +8381,15 @@ declare module "question_multipletext" {
8242
8381
  */
8243
8382
  get itemSize(): number;
8244
8383
  set itemSize(val: number);
8384
+ /**
8385
+ * Specifies a uniform width for all text box titles. Accepts CSS values.
8386
+ *
8387
+ * Default value: `""` (the width of each title depends on the title length)
8388
+ * @see items
8389
+ * @see itemErrorLocation
8390
+ */
8391
+ get itemTitleWidth(): string;
8392
+ set itemTitleWidth(val: string);
8245
8393
  rows: Array<MutlipleTextRow>;
8246
8394
  protected onRowCreated(row: MutlipleTextRow): MutlipleTextRow;
8247
8395
  private calcVisibleRows;
@@ -8382,6 +8530,23 @@ declare module "header" {
8382
8530
  processResponsiveness(width: number): void;
8383
8531
  }
8384
8532
  }
8533
+ declare module "surveyTaskManager" {
8534
+ import { Base } from "base";
8535
+ class SurveyTaskModel {
8536
+ type: string;
8537
+ private timestamp;
8538
+ constructor(type: string);
8539
+ }
8540
+ export class SurveyTaskManagerModel extends Base {
8541
+ private taskList;
8542
+ constructor();
8543
+ private onAllTasksCompleted;
8544
+ hasActiveTasks: boolean;
8545
+ runTask(type: string, func: (done: any) => void): SurveyTaskModel;
8546
+ waitAndExecute(action: any): void;
8547
+ private taskFinished;
8548
+ }
8549
+ }
8385
8550
  declare module "survey" {
8386
8551
  import { JsonError } from "jsonobject";
8387
8552
  import { Base, EventBase } from "base";
@@ -8411,6 +8576,7 @@ declare module "survey" {
8411
8576
  import { ITheme, ImageFit, ImageAttachment } from "themes";
8412
8577
  import { PopupModel } from "popup";
8413
8578
  import { Cover } from "header";
8579
+ import { QuestionSignaturePadModel } from "question_signaturepad";
8414
8580
  /**
8415
8581
  * The `SurveyModel` object contains properties and methods that allow you to control the survey and access its elements.
8416
8582
  *
@@ -8705,6 +8871,8 @@ declare module "survey" {
8705
8871
  * For information on event handler parameters, refer to descriptions within the interface.
8706
8872
  *
8707
8873
  * 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).
8874
+ *
8875
+ * [View Demo](https://surveyjs.io/form-library/examples/survey-titletagnames/ (linkStyle))
8708
8876
  * @see onGetQuestionTitle
8709
8877
  * @see onGetQuestionNo
8710
8878
  */
@@ -8744,7 +8912,7 @@ declare module "survey" {
8744
8912
  */
8745
8913
  onGetResult: EventBase<SurveyModel, GetResultEvent>;
8746
8914
  /**
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.
8915
+ * 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
8916
  *
8749
8917
  * For information on event handler parameters, refer to descriptions within the interface.
8750
8918
  *
@@ -8766,7 +8934,7 @@ declare module "survey" {
8766
8934
  */
8767
8935
  onDownloadFile: EventBase<SurveyModel, DownloadFileEvent>;
8768
8936
  /**
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.
8937
+ * 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
8938
  *
8771
8939
  * For information on event handler parameters, refer to descriptions within the interface.
8772
8940
  *
@@ -9521,10 +9689,11 @@ declare module "survey" {
9521
9689
  getSurveyErrorCustomText(obj: PanelModel | Question | SurveyModel, text: string, error: SurveyError): string;
9522
9690
  getQuestionDisplayValue(question: Question, displayValue: any): any;
9523
9691
  /**
9524
- * Returns a message that is displayed when a survey does not contain visible pages or questions.
9692
+ * A message that is displayed when a survey does not contain visible pages or questions.
9525
9693
  * @see [Localization & Globalization](https://surveyjs.io/form-library/documentation/survey-localization)
9526
9694
  */
9527
9695
  get emptySurveyText(): string;
9696
+ set emptySurveyText(val: string);
9528
9697
  /**
9529
9698
  * An image URL or a Base64-encoded image to use as a survey logo.
9530
9699
  *
@@ -9899,7 +10068,7 @@ declare module "survey" {
9899
10068
  * @see setValue
9900
10069
  */
9901
10070
  mergeData(data: any): void;
9902
- setDataCore(data: any): void;
10071
+ setDataCore(data: any, clearData?: boolean): void;
9903
10072
  getStructuredData(includePages?: boolean, level?: number): any;
9904
10073
  setStructuredData(data: any, doMerge?: boolean): void;
9905
10074
  private collectDataFromPanel;
@@ -10518,14 +10687,14 @@ declare module "survey" {
10518
10687
  * }
10519
10688
  * );
10520
10689
  * ```
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).
10690
+ * @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).
10691
+ * @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
10692
  * @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
10693
  * @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
10694
  * @see onUploadFiles
10526
10695
  * @see downloadFile
10527
10696
  */
10528
- uploadFiles(question: QuestionFileModel, name: string, files: File[], callback: (data: any | Array<any>, errors?: any | Array<any>) => any): void;
10697
+ uploadFiles(question: QuestionFileModel | QuestionSignaturePadModel, name: string, files: File[], callback: (data: any | Array<any>, errors?: any | Array<any>) => any): void;
10529
10698
  /**
10530
10699
  * Downloads a file from a server.
10531
10700
  *
@@ -10557,7 +10726,7 @@ declare module "survey" {
10557
10726
  * @see uploadFiles
10558
10727
  */
10559
10728
  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;
10729
+ clearFiles(question: QuestionFileModel | QuestionSignaturePadModel, name: string, value: any, fileName: string, callback: (status: string, data: any) => any): void;
10561
10730
  updateChoicesFromServer(question: QuestionSelectBase, choices: Array<ItemValue>, serverResult: any): Array<ItemValue>;
10562
10731
  loadedChoicesFromServer(question: IQuestion): void;
10563
10732
  protected createSurveyService(): dxSurveyService;
@@ -11065,7 +11234,7 @@ declare module "survey" {
11065
11234
  startMovingQuestion(): void;
11066
11235
  stopMovingQuestion(): void;
11067
11236
  get isQuestionDragging(): boolean;
11068
- private needRenderIcons;
11237
+ needRenderIcons: boolean;
11069
11238
  private skippedPages;
11070
11239
  /**
11071
11240
  * Focuses a question with a specified name. Switches the current page if needed.
@@ -11123,6 +11292,7 @@ declare module "survey" {
11123
11292
  */
11124
11293
  applyTheme(theme: ITheme): void;
11125
11294
  themeChanged(theme: ITheme): void;
11295
+ private taskManager;
11126
11296
  /**
11127
11297
  * Disposes of the survey model.
11128
11298
  *
@@ -11257,7 +11427,7 @@ declare module "survey-element" {
11257
11427
  */
11258
11428
  get state(): string;
11259
11429
  set state(val: string);
11260
- protected notifyStateChanged(): void;
11430
+ protected notifyStateChanged(prevState: string): void;
11261
11431
  /**
11262
11432
  * Returns `true` if the survey element is collapsed.
11263
11433
  * @see state
@@ -11583,6 +11753,18 @@ declare module "questionCustomWidgets" {
11583
11753
  getCustomWidget(question: IQuestion): QuestionCustomWidget;
11584
11754
  }
11585
11755
  }
11756
+ declare module "rendererFactory" {
11757
+ import { Question } from "question";
11758
+ export class RendererFactory {
11759
+ static Instance: RendererFactory;
11760
+ private renderersHash;
11761
+ unregisterRenderer(questionType: string, rendererAs: string): void;
11762
+ registerRenderer(questionType: string, renderAs: string, renderer: any): void;
11763
+ getRenderer(questionType: string, renderAs: string): any;
11764
+ getRendererByQuestion(question: Question): any;
11765
+ clear(): void;
11766
+ }
11767
+ }
11586
11768
  declare module "question" {
11587
11769
  import { HashTable } from "helpers";
11588
11770
  import { EventBase } from "base";
@@ -11720,7 +11902,7 @@ declare module "question" {
11720
11902
  get visible(): boolean;
11721
11903
  set visible(val: boolean);
11722
11904
  protected onVisibleChanged(): void;
11723
- protected notifyStateChanged(): void;
11905
+ protected notifyStateChanged(prevState: string): void;
11724
11906
  private updateIsVisibleProp;
11725
11907
  /**
11726
11908
  * Specifies whether to use display names for question values in placeholders.
@@ -12398,7 +12580,7 @@ declare module "question" {
12398
12580
  onMouseDown(): void;
12399
12581
  protected setNewComment(newValue: string): void;
12400
12582
  protected getValidName(name: string): string;
12401
- updateValueFromSurvey(newValue: any): void;
12583
+ updateValueFromSurvey(newValue: any, clearData?: boolean): void;
12402
12584
  private updateValueFromSurveyCore;
12403
12585
  updateCommentFromSurvey(newValue: any): any;
12404
12586
  protected onChangeQuestionValue(newValue: any): void;
@@ -13329,7 +13511,7 @@ declare module "base-interfaces" {
13329
13511
  hasTitle: boolean;
13330
13512
  isEmpty(): boolean;
13331
13513
  onSurveyValueChanged(newValue: any): any;
13332
- updateValueFromSurvey(newValue: any): any;
13514
+ updateValueFromSurvey(newValue: any, clearData: boolean): void;
13333
13515
  updateCommentFromSurvey(newValue: any): any;
13334
13516
  supportGoNextPageAutomatic(): boolean;
13335
13517
  clearUnusedValues(): any;
@@ -13393,7 +13575,7 @@ declare module "base-interfaces" {
13393
13575
  svgMountContainer: HTMLElement | string;
13394
13576
  stylesSheetsMountContainer: HTMLElement;
13395
13577
  };
13396
- export type LayoutElementContainer = "header" | "footer" | "left" | "right" | "contentTop" | "contentBottom";
13578
+ export type LayoutElementContainer = "header" | "footer" | "left" | "right" | "contentTop" | "contentBottom" | "center";
13397
13579
  export type HorizontalAlignment = "left" | "center" | "right";
13398
13580
  export type VerticalAlignment = "top" | "middle" | "bottom";
13399
13581
  export interface ISurveyLayoutElement {
@@ -13923,6 +14105,9 @@ declare module "settings" {
13923
14105
  root: Document | ShadowRoot;
13924
14106
  rootElement: HTMLElement | ShadowRoot;
13925
14107
  popupMountContainer: HTMLElement | string;
14108
+ /**
14109
+ * @deprecated
14110
+ */
13926
14111
  svgMountContainer: HTMLElement | string;
13927
14112
  stylesSheetsMountContainer: HTMLElement;
13928
14113
  };
@@ -15095,12 +15280,16 @@ declare module "question_checkbox" {
15095
15280
  protected validateItemValues(itemValues: Array<ItemValue>): Array<ItemValue>;
15096
15281
  protected getAnswerCorrectIgnoreOrder(): boolean;
15097
15282
  protected onCheckForErrors(errors: Array<SurveyError>, isOnValueChanged: boolean): void;
15283
+ protected onVisibleChoicesChanged(): void;
15098
15284
  protected onEnableItemCallBack(item: ItemValue): boolean;
15099
15285
  protected onAfterRunItemsEnableCondition(): void;
15286
+ private updateSelectAllItemProps;
15287
+ private getSelectAllEnabled;
15288
+ private getVisibleEnableItems;
15100
15289
  private shouldCheckMaxSelectedChoices;
15101
15290
  private checkMinSelectedChoicesUnreached;
15102
15291
  protected getItemClassCore(item: any, options: any): string;
15103
- updateValueFromSurvey(newValue: any): void;
15292
+ updateValueFromSurvey(newValue: any, clearData: boolean): void;
15104
15293
  protected setDefaultValue(): void;
15105
15294
  private addIntoInvisibleOldValues;
15106
15295
  protected hasValueToClearIncorrectValues(): boolean;
@@ -16163,135 +16352,6 @@ declare module "question_image" {
16163
16352
  private isVideo;
16164
16353
  }
16165
16354
  }
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
16355
  declare module "surveyToc" {
16296
16356
  import { Action } from "actions/action";
16297
16357
  import { ListModel } from "list";
@@ -17513,7 +17573,6 @@ declare module "svgbundle" {
17513
17573
  registerIconFromSvg(iconId: string, iconSvg: string, iconPrefix?: string): boolean;
17514
17574
  registerIconsFromFolder(r: any): void;
17515
17575
  iconsRenderedHtml(): string;
17516
- renderIcons(): void;
17517
17576
  }
17518
17577
  export var SvgRegistry: SvgIconRegistry;
17519
17578
  export var SvgBundleViewModel: any;
@@ -24206,18 +24265,6 @@ declare module "react/components/survey-header/survey-header" {
24206
24265
  render(): JSX.Element | null;
24207
24266
  }
24208
24267
  }
24209
- declare module "react/reacttimerpanel" {
24210
- import { Base, SurveyTimerModel } from "entries/core";
24211
- import { ReactSurveyElement } from "react/reactquestion_element";
24212
- export class SurveyTimerPanel extends ReactSurveyElement {
24213
- constructor(props: any);
24214
- protected getStateElement(): Base;
24215
- protected get timerModel(): SurveyTimerModel;
24216
- private readonly circleLength;
24217
- private get progress();
24218
- render(): JSX.Element | null;
24219
- }
24220
- }
24221
24268
  declare module "react/components/brand-info" {
24222
24269
  import React from "react";
24223
24270
  export class BrandInfo extends React.Component<any, any> {
@@ -24242,6 +24289,15 @@ declare module "react/components/components-container" {
24242
24289
  render(): JSX.Element | null;
24243
24290
  }
24244
24291
  }
24292
+ declare module "react/svgbundle" {
24293
+ import React from "react";
24294
+ export class SvgBundleComponent extends React.Component {
24295
+ private containerRef;
24296
+ constructor(props: any);
24297
+ componentDidMount(): void;
24298
+ render(): JSX.Element;
24299
+ }
24300
+ }
24245
24301
  declare module "react/reactSurvey" {
24246
24302
  import { Base, Question, PageModel, SurveyError, SurveyModel, IAttachKey2clickOptions } from "entries/core";
24247
24303
  import { ISurveyCreator } from "react/reactquestion";
@@ -24296,6 +24352,18 @@ declare module "react/reactSurveyNavigationBase" {
24296
24352
  componentWillUnmount(): void;
24297
24353
  }
24298
24354
  }
24355
+ declare module "react/reacttimerpanel" {
24356
+ import { Base, SurveyTimerModel } from "entries/core";
24357
+ import { ReactSurveyElement } from "react/reactquestion_element";
24358
+ export class SurveyTimerPanel extends ReactSurveyElement {
24359
+ constructor(props: any);
24360
+ protected getStateElement(): Base;
24361
+ protected get timerModel(): SurveyTimerModel;
24362
+ private readonly circleLength;
24363
+ private get progress();
24364
+ render(): JSX.Element | null;
24365
+ }
24366
+ }
24299
24367
  declare module "react/panel" {
24300
24368
  import { SurveyPanelBase } from "react/panel-base";
24301
24369
  import { PanelModel } from "entries/core";
@@ -25051,6 +25119,7 @@ declare module "react/signaturepad" {
25051
25119
  protected get question(): QuestionSignaturePadModel;
25052
25120
  protected renderElement(): JSX.Element;
25053
25121
  renderBackgroundImage(): JSX.Element | null;
25122
+ protected renderLoadingIndicator(): JSX.Element;
25054
25123
  renderCleanButton(): JSX.Element | null;
25055
25124
  }
25056
25125
  }
@@ -25260,6 +25329,7 @@ declare module "entries/react-ui-model" {
25260
25329
  export { SurveyLocStringViewer } from "react/string-viewer";
25261
25330
  export { SurveyLocStringEditor } from "react/string-editor";
25262
25331
  export { LoadingIndicatorComponent } from "react/components/loading-indicator";
25332
+ export { SvgBundleComponent } from "react/svgbundle";
25263
25333
  }
25264
25334
  declare module "entries/react" {
25265
25335
  export * from "entries/core";