survey-react 1.9.117 → 1.9.118

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
@@ -463,6 +463,7 @@ declare module "jsonobject" {
463
463
  minValue: any;
464
464
  private dataListValue;
465
465
  layout: string;
466
+ onSerializeValue: (obj: any) => any;
466
467
  onGetValue: (obj: any) => any;
467
468
  onSettingValue: (obj: any, value: any) => any;
468
469
  onSetValue: (obj: any, value: any, jsonConv: JsonObject) => any;
@@ -487,6 +488,7 @@ declare module "jsonobject" {
487
488
  set defaultValue(newValue: any);
488
489
  isDefaultValue(value: any): boolean;
489
490
  isDefaultValueByObj(obj: Base, value: any): boolean;
491
+ getSerializableValue(obj: any): any;
490
492
  getValue(obj: any): any;
491
493
  getPropertyValue(obj: any): any;
492
494
  get hasToUseSetValue(): string | ((obj: any, value: any, jsonConv: JsonObject) => any);
@@ -2300,6 +2302,7 @@ declare module "defaultCss/defaultV2Css" {
2300
2302
  };
2301
2303
  saveData: {
2302
2304
  root: string;
2305
+ rootWithButtons: string;
2303
2306
  info: string;
2304
2307
  error: string;
2305
2308
  success: string;
@@ -3885,7 +3888,9 @@ declare module "question_file" {
3885
3888
  confirmRemoveAllMessage: string;
3886
3889
  noFileChosenCaption: string;
3887
3890
  chooseButtonCaption: string;
3888
- takePhotoCaption: string;
3891
+ get takePhotoCaption(): string;
3892
+ set takePhotoCaption(val: string);
3893
+ get locTakePhotoCaption(): LocalizableString;
3889
3894
  replaceButtonCaption: string;
3890
3895
  clearButtonCaption: string;
3891
3896
  removeFileCaption: string;
@@ -4235,6 +4240,7 @@ declare module "question_baseselect" {
4235
4240
  * When users select the "None" item in multi-select questions, all other items become unselected.
4236
4241
  * @see noneItem
4237
4242
  * @see noneText
4243
+ * @see [settings.specialChoicesOrder](https://surveyjs.io/form-library/documentation/api-reference/settings#specialChoicesOrder)
4238
4244
  */
4239
4245
  get showNoneItem(): boolean;
4240
4246
  set showNoneItem(val: boolean);
@@ -4339,6 +4345,7 @@ declare module "question_baseselect" {
4339
4345
  *
4340
4346
  * [View Demo](https://surveyjs.io/form-library/examples/questiontype-dropdownrestfull/ (linkStyle))
4341
4347
  * @see choices
4348
+ * @see [settings.specialChoicesOrder](https://surveyjs.io/form-library/documentation/api-reference/settings#specialChoicesOrder)
4342
4349
  */
4343
4350
  get choicesByUrl(): ChoicesRestful;
4344
4351
  set choicesByUrl(val: ChoicesRestful);
@@ -4361,6 +4368,7 @@ declare module "question_baseselect" {
4361
4368
  * If you need to specify only the `value` property, you can set the `choices` property to an array of primitive values, for example, `[ "item1", "item2", "item3" ]`. These values are both saved in survey results and used as display text.
4362
4369
  * @see choicesByUrl
4363
4370
  * @see choicesFromQuestion
4371
+ * @see [settings.specialChoicesOrder](https://surveyjs.io/form-library/documentation/api-reference/settings#specialChoicesOrder)
4364
4372
  */
4365
4373
  get choices(): Array<any>;
4366
4374
  set choices(newValue: Array<any>);
@@ -4432,6 +4440,7 @@ declare module "question_baseselect" {
4432
4440
  * - `"asc"`- Sorts choice items in ascending order.
4433
4441
  * - `"desc"`- Sorts choice items in ascending order.
4434
4442
  * - `"random"` - Displays choice items in random order.
4443
+ * @see [settings.specialChoicesOrder](https://surveyjs.io/form-library/documentation/api-reference/settings#specialChoicesOrder)
4435
4444
  */
4436
4445
  get choicesOrder(): string;
4437
4446
  set choicesOrder(val: string);
@@ -4446,6 +4455,7 @@ declare module "question_baseselect" {
4446
4455
  * Displays the "Select All", "None", and "Other" choices on individual rows.
4447
4456
  * @see showNoneItem
4448
4457
  * @see showOtherItem
4458
+ * @see [settings.specialChoicesOrder](https://surveyjs.io/form-library/documentation/api-reference/settings#specialChoicesOrder)
4449
4459
  */
4450
4460
  separateSpecialChoices: boolean;
4451
4461
  /**
@@ -4534,7 +4544,6 @@ declare module "question_baseselect" {
4534
4544
  protected getCommentFromValue(newValue: any): string;
4535
4545
  protected setOtherValueIntoValue(newValue: any): any;
4536
4546
  onOtherValueInput(event: any): void;
4537
- onCompositionUpdateOtherValue(event: any): void;
4538
4547
  onOtherValueChange(event: any): void;
4539
4548
  private isRunningChoices;
4540
4549
  private runChoicesByUrl;
@@ -4925,6 +4934,7 @@ declare module "question_matrixdropdowncolumn" {
4925
4934
  getCellType(): string;
4926
4935
  getCustomCellType(column: MatrixDropdownColumn, row: MatrixDropdownRowModelBase, cellType: string): string;
4927
4936
  onColumnCellTypeChanged(column: MatrixDropdownColumn): void;
4937
+ getCellAriaLabel(rowTitle: string, columnTitle: string): string;
4928
4938
  }
4929
4939
  export var matrixDropdownColumnTypes: any;
4930
4940
  export class MatrixDropdownColumn extends Base implements ILocalizableOwner, IWrapperObject {
@@ -5378,6 +5388,9 @@ declare module "question_matrixdynamic" {
5378
5388
  private dragOrClickHelper;
5379
5389
  constructor(index: number, data: IMatrixDropdownData, value: any);
5380
5390
  get rowName(): string;
5391
+ get dataName(): string;
5392
+ get text(): any;
5393
+ getAccessbilityText(): string;
5381
5394
  get shortcutText(): string;
5382
5395
  }
5383
5396
  /**
@@ -6458,7 +6471,7 @@ declare module "question_paneldynamic" {
6458
6471
  declare module "survey-events-api" {
6459
6472
  import { IAction } from "actions/action";
6460
6473
  import { Base } from "base";
6461
- import { IElement, ISurveyElement, IValueItemCustomPropValues } from "base-interfaces";
6474
+ import { IElement, IPanel, ISurveyElement, IValueItemCustomPropValues } from "base-interfaces";
6462
6475
  import { ItemValue } from "itemvalue";
6463
6476
  import { PageModel } from "page";
6464
6477
  import { PanelModel, PanelModelBase } from "panel";
@@ -7316,27 +7329,39 @@ declare module "survey-events-api" {
7316
7329
  /**
7317
7330
  * A survey element being dragged.
7318
7331
  */
7319
- target: IElement;
7332
+ draggedElement: IElement;
7320
7333
  /**
7321
- * A survey element from which `target` is being dragged. This parameter is `null` if `target` is being dragged from the [Toolbox](https://surveyjs.io/survey-creator/documentation/toolbox).
7334
+ * A survey element from which `draggedElement` is being dragged. This parameter is `null` if `draggedElement` is being dragged from the [Toolbox](https://surveyjs.io/survey-creator/documentation/toolbox).
7322
7335
  */
7323
- source: IElement;
7336
+ fromElement: IPanel;
7337
+ /**
7338
+ * A survey element to which `draggedElement` is being dragged.
7339
+ */
7340
+ toElement: IElement;
7324
7341
  /**
7325
7342
  * A survey element before which the target element will be placed. This parameter is `null` if the parent container (page or panel) has no elements or if the target element will be placed below all other elements within the container.
7326
7343
  */
7327
7344
  insertBefore: IElement;
7328
7345
  /**
7329
- * A survey element after which `target` will be placed. This parameter is `null` if the parent container (page or panel) has no elements or if `target` will be placed above all other elements within the container.
7346
+ * A survey element after which `draggedElement` will be placed. This parameter is `null` if the parent container (page or panel) has no elements or if `draggedElement` will be placed above all other elements within the container.
7330
7347
  */
7331
7348
  insertAfter: IElement;
7332
7349
  /**
7333
- * A parent container (page or panel) within which `target` will be placed.
7350
+ * A parent container (page or panel) within which `draggedElement` will be placed.
7334
7351
  */
7335
7352
  parent: ISurveyElement;
7336
7353
  /**
7337
7354
  * A Boolean property that you can set to `false` if you want to cancel the drag and drop operation.
7338
7355
  */
7339
7356
  allow: boolean;
7357
+ /**
7358
+ * Obsolete. Use `options.draggedElement` instead.
7359
+ */
7360
+ target: IElement;
7361
+ /**
7362
+ * Obsolete. Use `options.toElement` instead.
7363
+ */
7364
+ source: IElement;
7340
7365
  }
7341
7366
  export interface ScrollingElementToTopEvent {
7342
7367
  /**
@@ -7757,6 +7782,15 @@ declare module "notifier" {
7757
7782
  import { Base } from "base";
7758
7783
  import { ActionContainer } from "actions/container";
7759
7784
  import { IAction } from "actions/action";
7785
+ interface INotifierCssClasses {
7786
+ root: string;
7787
+ rootWithButtons: string;
7788
+ info: string;
7789
+ error: string;
7790
+ success: string;
7791
+ button: string;
7792
+ shown: string;
7793
+ }
7760
7794
  export class Notifier extends Base {
7761
7795
  private cssClasses;
7762
7796
  active: boolean;
@@ -7768,14 +7802,7 @@ declare module "notifier" {
7768
7802
  private actionsVisibility;
7769
7803
  actionBar: ActionContainer;
7770
7804
  showActions: boolean;
7771
- constructor(cssClasses: {
7772
- root: string;
7773
- info: string;
7774
- error: string;
7775
- success: string;
7776
- button: string;
7777
- shown: string;
7778
- });
7805
+ constructor(cssClasses: INotifierCssClasses);
7779
7806
  getCssClass(type: string): string;
7780
7807
  updateActionsVisibility(type: string): void;
7781
7808
  notify(message: string, type?: string, waitUserAction?: boolean): void;
@@ -7843,11 +7870,10 @@ declare module "question_textbase" {
7843
7870
  protected setQuestionValue(newValue: any, updateIsAnswered?: boolean): void;
7844
7871
  protected convertToCorrectValue(val: any): any;
7845
7872
  protected getValueSeparator(): string;
7846
- disableNativeUndoRedo: boolean;
7847
- protected checkForUndo(event: KeyboardEvent): void;
7848
7873
  protected getControlCssClassBuilder(): CssClassBuilder;
7849
7874
  getControlClass(): string;
7850
7875
  get isNewA11yStructure(): boolean;
7876
+ onKeyDownPreprocess: (event: any) => void;
7851
7877
  }
7852
7878
  }
7853
7879
  declare module "question_text" {
@@ -9097,6 +9123,8 @@ declare module "survey" {
9097
9123
  *
9098
9124
  * - `"advanced"`\
9099
9125
  * An advanced header view applies the same properties as the basic view, plus [header settings](https://surveyjs.io/form-library/documentation/api-reference/iheader) from the [survey theme](https://surveyjs.io/form-library/documentation/api-reference/itheme#header). The advanced view features a more flexible header layout, a capability to specify a background image, and other settings that give a more professional look to the survey header.
9126
+ *
9127
+ * [View Demo](https://surveyjs.io/form-library/examples/brand-your-survey-header/ (linkStyle))
9100
9128
  */
9101
9129
  headerView: "advanced" | "basic";
9102
9130
  private getNavigationCss;
@@ -10026,6 +10054,16 @@ declare module "survey" {
10026
10054
  get completedState(): string;
10027
10055
  get completedStateText(): string;
10028
10056
  protected setCompletedState(value: string, text: string): void;
10057
+ /**
10058
+ * Displays a toast notification with a specified message.
10059
+ *
10060
+ * Depending on the `type` argument, a survey can display the following notification types:
10061
+ *
10062
+ * ![Toast notification types in SurveyJS Form Library](https://surveyjs.io//Content/Images/docs/notification-types.png)
10063
+ * @param message A message to display.
10064
+ * @param type A notification type: `"info"` (default), `"success"`, or `"error"`.
10065
+ * @param showActions For internal use.
10066
+ */
10029
10067
  notify(message: string, type: string, showActions?: boolean): void;
10030
10068
  /**
10031
10069
  * Resets the survey [`state`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#state) and, optionally, [`data`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data). If `state` is `"completed"`, it becomes `"running"`.
@@ -10252,7 +10290,7 @@ declare module "survey" {
10252
10290
  private runningPages;
10253
10291
  private onShowingPreviewChanged;
10254
10292
  private changeCurrentPageFromPreview;
10255
- private origionalPages;
10293
+ private originalPages;
10256
10294
  protected onQuestionsOnPageModeChanged(oldValue: string): void;
10257
10295
  private restoreOriginalPages;
10258
10296
  private getPageStartIndex;
@@ -11874,7 +11912,6 @@ declare module "question" {
11874
11912
  get isContainer(): boolean;
11875
11913
  protected updateCommentElements(): void;
11876
11914
  onCommentInput(event: any): void;
11877
- onCompositionUpdateComment(event: any): void;
11878
11915
  onCommentChange(event: any): void;
11879
11916
  afterRenderQuestionElement(el: HTMLElement): void;
11880
11917
  afterRender(el: HTMLElement): void;
@@ -11989,6 +12026,7 @@ declare module "question" {
11989
12026
  * @see otherItem
11990
12027
  * @see otherErrorText
11991
12028
  * @see showCommentArea
12029
+ * @see [settings.specialChoicesOrder](https://surveyjs.io/form-library/documentation/api-reference/settings#specialChoicesOrder)
11992
12030
  */
11993
12031
  get showOtherItem(): boolean;
11994
12032
  set showOtherItem(val: boolean);
@@ -12511,6 +12549,7 @@ declare module "martixBase" {
12511
12549
  get rowTitleWidth(): string;
12512
12550
  set rowTitleWidth(val: string);
12513
12551
  getCellAriaLabel(rowTitle: string, columnTitle: string): string;
12552
+ get isNewA11yStructure(): boolean;
12514
12553
  }
12515
12554
  }
12516
12555
  declare module "question_matrixdropdownbase" {
@@ -12557,6 +12596,7 @@ declare module "question_matrixdropdownbase" {
12557
12596
  data: IMatrixDropdownData;
12558
12597
  private questionValue;
12559
12598
  constructor(column: MatrixDropdownColumn, row: MatrixDropdownRowModelBase, data: IMatrixDropdownData);
12599
+ private updateCellQuestionTitleDueToAccessebility;
12560
12600
  locStrsChanged(): void;
12561
12601
  protected createQuestion(column: MatrixDropdownColumn, row: MatrixDropdownRowModelBase, data: IMatrixDropdownData): Question;
12562
12602
  get question(): Question;
@@ -12592,10 +12632,12 @@ declare module "question_matrixdropdownbase" {
12592
12632
  constructor(data: IMatrixDropdownData, value: any);
12593
12633
  get id(): string;
12594
12634
  get rowName(): any;
12635
+ get dataName(): string;
12595
12636
  get text(): any;
12596
12637
  get value(): any;
12597
12638
  set value(value: any);
12598
12639
  get locText(): LocalizableString;
12640
+ getAccessbilityText(): string;
12599
12641
  get hasPanel(): boolean;
12600
12642
  get detailPanel(): PanelModel;
12601
12643
  get detailPanelId(): string;
@@ -14323,6 +14365,27 @@ declare module "settings" {
14323
14365
  * Default value: `"none"`
14324
14366
  */
14325
14367
  noneItemValue: string;
14368
+ /**
14369
+ * An object whose properties specify the order of the special choice items (None, Other, Select All) in select-based questions.
14370
+ *
14371
+ * Default value: `{ selectAllItem: [-1], noneItem: [1], otherItem: [2] }`
14372
+ *
14373
+ * Use this object to reorder special choices. Each property accepts an array of integer numbers. Negative numbers place a special choice item above regular choice items, positive numbers place it below them. For instance, the code below specifies the following order of choices: None, Select All, regular choices, Other.
14374
+ *
14375
+ * ```js
14376
+ * import { settings } from "survey-core";
14377
+ *
14378
+ * settings.specialChoicesOrder.noneItem = [-2];
14379
+ * settings.specialChoicesOrder.selectAllItem = [-1];
14380
+ * settings.specialChoicesOrder.otherItem = [1];
14381
+ * ```
14382
+ *
14383
+ * If you want to duplicate a special choice item above and below other choices, add two numbers to the corresponding array:
14384
+ *
14385
+ * ```js
14386
+ * settings.specialChoicesOrder.selectAllItem = [-1, 3] // Displays Select All above and below other choices
14387
+ * ```
14388
+ */
14326
14389
  specialChoicesOrder: {
14327
14390
  selectAllItem: number[];
14328
14391
  noneItem: number[];
@@ -15314,6 +15377,7 @@ declare module "dragdrop/choices" {
15314
15377
  import { QuestionSelectBase } from "question_baseselect";
15315
15378
  import { DragDropCore } from "dragdrop/core";
15316
15379
  export class DragDropChoices extends DragDropCore<QuestionSelectBase> {
15380
+ private imagepickerControlsNode;
15317
15381
  protected get draggedElementType(): string;
15318
15382
  protected createDraggedElementShortcut(text: string, draggedElementNode: HTMLElement, event: PointerEvent): HTMLElement;
15319
15383
  private createImagePickerShortcut;
@@ -16106,7 +16170,9 @@ declare module "question_signaturepad" {
16106
16170
  *
16107
16171
  * Default value: `false`
16108
16172
  *
16109
- * > The signature area is scaled only for display. The resulting image will have dimensions specified by the [`signatureHeight`](#signatureHeight) and [`signatureWidth`](#signatureWidth) properties.
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.
16110
16176
  */
16111
16177
  signatureAutoScaleEnabled: boolean;
16112
16178
  /**
@@ -16898,6 +16964,7 @@ declare module "defaultCss/cssstandard" {
16898
16964
  };
16899
16965
  saveData: {
16900
16966
  root: string;
16967
+ rootWithButtons: string;
16901
16968
  info: string;
16902
16969
  error: string;
16903
16970
  success: string;
@@ -17362,6 +17429,7 @@ declare module "defaultCss/cssmodern" {
17362
17429
  };
17363
17430
  saveData: {
17364
17431
  root: string;
17432
+ rootWithButtons: string;
17365
17433
  info: string;
17366
17434
  error: string;
17367
17435
  success: string;
@@ -23651,11 +23719,13 @@ declare module "react/reactquestion_comment" {
23651
23719
  protected renderElement(): JSX.Element;
23652
23720
  }
23653
23721
  export class SurveyQuestionCommentItem extends ReactSurveyElement {
23722
+ private getStateComment;
23723
+ constructor(props: any);
23654
23724
  protected canRender(): boolean;
23655
23725
  protected onCommentChange(event: any): void;
23656
23726
  protected onCommentInput(event: any): void;
23657
- protected onCommentCompositionUpdate(event: any): void;
23658
23727
  protected getComment(): string;
23728
+ protected setComment(value: any): void;
23659
23729
  protected getId(): string;
23660
23730
  protected getPlaceholder(): string;
23661
23731
  protected renderElement(): JSX.Element;
@@ -23663,8 +23733,8 @@ declare module "react/reactquestion_comment" {
23663
23733
  export class SurveyQuestionOtherValueItem extends SurveyQuestionCommentItem {
23664
23734
  protected onCommentChange(event: any): void;
23665
23735
  protected onCommentInput(event: any): void;
23666
- protected onCommentCompositionUpdate(event: any): void;
23667
23736
  protected getComment(): string;
23737
+ protected setComment(value: any): void;
23668
23738
  protected getId(): string;
23669
23739
  protected getPlaceholder(): string;
23670
23740
  }