survey-react 1.9.80 → 1.9.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/survey.react.d.ts CHANGED
@@ -10,6 +10,16 @@ declare module "settings" {
10
10
  * ```
11
11
  */
12
12
  export var settings: {
13
+ /**
14
+ * Specifies an action to perform when users press the Enter key within a survey.
15
+ *
16
+ * Possible values:
17
+ *
18
+ * - `"moveToNextEditor"` - Moves focus to the next editor.
19
+ * - `"loseFocus"` - Removes focus from the current editor.
20
+ * - `"default"` - Behaves as a standard `<input>` element.
21
+ */
22
+ enterKeyAction: "default" | "moveToNextEditor" | "loseFocus";
13
23
  /**
14
24
  * An object that configures string comparison.
15
25
  *
@@ -369,6 +379,23 @@ declare module "settings" {
369
379
  inputTypes: string[];
370
380
  dataList: string[];
371
381
  };
382
+ /**
383
+ * Contains properties that apply to [Single-Choice](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-question-model), [Multiple-Choice](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-with-dropdown-list), and [Dynamic Matrix](https://surveyjs.io/form-library/documentation/api-reference/dynamic-matrix-table-question-model) questions.
384
+ *
385
+ * Nested properties:
386
+ *
387
+ * - `columnWidthsByType`: `Object`\
388
+ * An object that specifies fixed and minimum column width based on the column type.\
389
+ * Example: `settings.matrix.columnWidthsByType = { "tagbox": { minWidth: "240px", width: "300px" } }`
390
+ */
391
+ matrix: {
392
+ columnWidthsByType: {
393
+ [index: string]: {
394
+ minWidth?: string;
395
+ width?: string;
396
+ };
397
+ };
398
+ };
372
399
  };
373
400
  }
374
401
  declare module "helpers" {
@@ -422,6 +449,7 @@ declare module "localization/english" {
422
449
  progressText: string;
423
450
  indexText: string;
424
451
  panelDynamicProgressText: string;
452
+ panelDynamicTabTextFormat: string;
425
453
  questionsProgressText: string;
426
454
  emptySurvey: string;
427
455
  completingSurvey: string;
@@ -530,6 +558,7 @@ declare module "surveyStrings" {
530
558
  progressText: string;
531
559
  indexText: string;
532
560
  panelDynamicProgressText: string;
561
+ panelDynamicTabTextFormat: string;
533
562
  questionsProgressText: string;
534
563
  emptySurvey: string;
535
564
  completingSurvey: string;
@@ -821,7 +850,6 @@ declare module "jsonobject" {
821
850
  settingValue(obj: any, value: any): any;
822
851
  setValue(obj: any, value: any, jsonConv: JsonObject): void;
823
852
  getObjType(objType: string): string;
824
- getClassName(className: string): string;
825
853
  /**
826
854
  * Depricated, please use getChoices
827
855
  */
@@ -987,6 +1015,7 @@ declare module "jsonobject" {
987
1015
  private removePosFromObj;
988
1016
  private isValueArray;
989
1017
  private createNewObj;
1018
+ private getClassNameForNewObj;
990
1019
  private checkNewObjectOnErrors;
991
1020
  private getRequiredError;
992
1021
  private addNewError;
@@ -2346,6 +2375,8 @@ declare module "survey-element" {
2346
2375
  get clickTitleFunction(): any;
2347
2376
  protected needClickTitleFunction(): boolean;
2348
2377
  protected processTitleClick(): void;
2378
+ get additionalTitleToolbar(): ActionContainer;
2379
+ protected getAdditionalTitleToolbar(): ActionContainer | null;
2349
2380
  protected getCssTitle(cssClasses: any): string;
2350
2381
  localeChanged(): void;
2351
2382
  }
@@ -2453,6 +2484,18 @@ declare module "questionfactory" {
2453
2484
  createElement(elementType: string, name: string): IElement;
2454
2485
  }
2455
2486
  }
2487
+ declare module "drag-drop-helper-v1" {
2488
+ import { IElement, ISurveyElement } from "base-interfaces";
2489
+ export class DragDropInfo {
2490
+ source: IElement;
2491
+ target: IElement;
2492
+ nestedPanelDepth: number;
2493
+ constructor(source: IElement, target: IElement, nestedPanelDepth?: number);
2494
+ destination: ISurveyElement;
2495
+ isBottom: boolean;
2496
+ isEdge: boolean;
2497
+ }
2498
+ }
2456
2499
  declare module "defaultCss/defaultV2Css" {
2457
2500
  export var surveyCss: any;
2458
2501
  export var defaultV2Css: {
@@ -2525,6 +2568,8 @@ declare module "defaultCss/defaultV2Css" {
2525
2568
  root: string;
2526
2569
  navigation: string;
2527
2570
  title: string;
2571
+ header: string;
2572
+ headerTab: string;
2528
2573
  button: string;
2529
2574
  buttonRemove: string;
2530
2575
  buttonAdd: string;
@@ -3696,6 +3741,8 @@ declare module "question_baseselect" {
3696
3741
  protected onAfterRunItemsEnableCondition(): void;
3697
3742
  protected onEnableItemCallBack(item: ItemValue): boolean;
3698
3743
  protected onSelectedItemValuesChangedHandler(newValue: any): void;
3744
+ protected getSingleSelectedItem(): ItemValue;
3745
+ protected onGetSingleSelectedItem(selectedItemByValue: ItemValue): void;
3699
3746
  private setConditionalChoicesRunner;
3700
3747
  private setConditionalEnableChoicesRunner;
3701
3748
  private canSurveyChangeItemVisibility;
@@ -4411,7 +4458,11 @@ declare module "question_paneldynamic" {
4411
4458
  */
4412
4459
  get renderMode(): string;
4413
4460
  set renderMode(val: string);
4461
+ get tabAlign(): "center" | "left" | "right";
4462
+ set tabAlign(val: "center" | "left" | "right");
4414
4463
  get isRenderModeList(): boolean;
4464
+ get isRenderModeTab(): boolean;
4465
+ get hasTitleOnLeftTop(): boolean;
4415
4466
  setVisibleIndex(value: number): number;
4416
4467
  private setPanelVisibleIndex;
4417
4468
  /**
@@ -4572,6 +4623,7 @@ declare module "question_paneldynamic" {
4572
4623
  get progressText(): string;
4573
4624
  get progress(): string;
4574
4625
  getRootCss(): string;
4626
+ get cssHeader(): string;
4575
4627
  getPanelWrapperCss(): string;
4576
4628
  getPanelRemoveButtonCss(): string;
4577
4629
  getAddButtonCss(): string;
@@ -4585,12 +4637,20 @@ declare module "question_paneldynamic" {
4585
4637
  get locNoEntriesText(): LocalizableString;
4586
4638
  getShowNoEntriesPlaceholder(): boolean;
4587
4639
  needResponsiveWidth(): boolean;
4640
+ private additionalTitleToolbarValue;
4641
+ protected getAdditionalTitleToolbar(): ActionContainer | null;
4588
4642
  private footerToolbarValue;
4589
4643
  get footerToolbar(): ActionContainer;
4590
4644
  legacyNavigation: boolean;
4591
4645
  private updateFooterActionsCallback;
4592
4646
  private updateFooterActions;
4593
4647
  private initFooterToolbar;
4648
+ private createTabByPanel;
4649
+ private getAdditionalTitleToolbarCss;
4650
+ private updateTabToolbarItemsPressedState;
4651
+ private updateTabToolbar;
4652
+ private addTabFromToolbar;
4653
+ private removeTabFromToolbar;
4594
4654
  private get showLegacyNavigation();
4595
4655
  }
4596
4656
  }
@@ -5705,9 +5765,6 @@ declare module "survey-events-api" {
5705
5765
  * Set this property to `false` if you want to cancel the preview.
5706
5766
  */
5707
5767
  allow: boolean;
5708
- /**
5709
- * @deprecated Use the `allow` property instead.
5710
- */
5711
5768
  allowShowPreview: boolean;
5712
5769
  }
5713
5770
  export interface NavigateToUrlEvent {
@@ -5844,7 +5901,7 @@ declare module "survey-events-api" {
5844
5901
  }
5845
5902
  export interface SettingQuestionErrorsEvent extends QuestionEventMixin {
5846
5903
  /**
5847
- * An array of errors. The array is empty if the validated question satisfy all validation rules.
5904
+ * An array of errors. The array is empty if the validated question satisfies all validation rules.
5848
5905
  */
5849
5906
  errors: Array<SurveyError>;
5850
5907
  }
@@ -6944,9 +7001,10 @@ declare module "survey" {
6944
7001
  */
6945
7002
  onComplete: EventBase<SurveyModel, CompleteEvent>;
6946
7003
  /**
6947
- * An event that is raised before the survey displays a [preview](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page). Use this event to cancel the preview.
6948
- *
7004
+ * An event that is raised before the survey displays a [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page). Use this event to cancel the preview.
6949
7005
  * @see showPreviewBeforeComplete
7006
+ * @see showPreview
7007
+ * @see cancelPreview
6950
7008
  */
6951
7009
  onShowingPreview: EventBase<SurveyModel, ShowingPreviewEvent>;
6952
7010
  /**
@@ -7530,9 +7588,10 @@ declare module "survey" {
7530
7588
  getType(): string;
7531
7589
  protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
7532
7590
  /**
7533
- * Returns a list of all pages in the survey, including invisible pages.
7591
+ * Returns an array of all pages in the survey.
7592
+ *
7593
+ * To get an array of only visible pages, use the [`visiblePages`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#visiblePages) array.
7534
7594
  * @see PageModel
7535
- * @see visiblePages
7536
7595
  */
7537
7596
  get pages(): Array<PageModel>;
7538
7597
  renderCallback: () => void;
@@ -7578,11 +7637,7 @@ declare module "survey" {
7578
7637
  get triggers(): Array<SurveyTrigger>;
7579
7638
  set triggers(val: Array<SurveyTrigger>);
7580
7639
  /**
7581
- * Gets or sets a list of calculated values in the survey.
7582
- * @see CalculatedValue
7583
- *
7584
- * For more information, refer to [Calculated Values](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#calculated-values).
7585
- *
7640
+ * An array of [calculated values](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#calculated-values).
7586
7641
  */
7587
7642
  get calculatedValues(): Array<CalculatedValue>;
7588
7643
  set calculatedValues(val: Array<CalculatedValue>);
@@ -7773,43 +7828,44 @@ declare module "survey" {
7773
7828
  get maxOthersLength(): number;
7774
7829
  set maxOthersLength(val: number);
7775
7830
  /**
7776
- * Gets or ses whether user proceeds to the next page without pressing the "Next" button after answering all page questions.
7777
- * The available options:
7831
+ * Specifies whether the survey switches to the next page automatically after a user answers all questions on the current page.
7778
7832
  *
7779
- * - `true` - navigate to the next page and submit survey data automatically.
7780
- * - `autogonext` - navigate to the next page automatically but do not submit survey data.
7781
- * - `false` - do not navigate to the next page and do not submit survey data automatically.
7833
+ * Default value: `false`
7782
7834
  *
7783
- * > If any of the following questions is answered last, the survey won't be switched to the next page: Checkbox, Boolean (rendered as Checkbox), Comment, Signature Pad, Image Picker (with Multi Select), File, Single-Choice Matrix (not all rows are answered), Dynamic Matrix, Panel Dynamic.
7835
+ * If you enable this property, the survey is also completed automatically. Set the [`allowCompleteSurveyAutomatic`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#allowCompleteSurveyAutomatic) property to `false` if you want to disable this behavior.
7784
7836
  *
7785
- * @see showNavigationButtons
7837
+ * > If any of the following questions is answered last, the survey does not switch to the next page: Checkbox, Boolean (rendered as Checkbox), Comment, Signature Pad, Image Picker (with Multi Select), File, Single-Choice Matrix (not all rows are answered), Dynamic Matrix, Panel Dynamic.
7786
7838
  *
7787
- * [View Demo](https://surveyjs.io/form-library/examples/survey-autonextpage/ (linkStyle))
7839
+ * [View Demo](https://surveyjs.io/form-library/examples/automatically-move-to-next-page-if-answer-selected/ (linkStyle))
7788
7840
  */
7789
7841
  get goNextPageAutomatic(): boolean | "autogonext";
7790
7842
  set goNextPageAutomatic(val: boolean | "autogonext");
7791
7843
  /**
7792
- * Gets or sets whether a survey is automatically completed when `goNextPageAutomatic = true`. Set it to `false` if you do not want to submit survey automatically on completing the last survey page.
7793
- * @see goNextPageAutomatic
7844
+ * Specifies whether to complete the survey automatically after a user answers all questions on the last page. Applies only if the [`goNextPageAutomatic`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#goNextPageAutomatic) property is `true`.
7845
+ *
7846
+ * Default value: `true`
7794
7847
  */
7795
7848
  get allowCompleteSurveyAutomatic(): boolean;
7796
7849
  set allowCompleteSurveyAutomatic(val: boolean);
7797
7850
  /**
7798
- * Gets or sets a value that specifies how the survey validates the question answers.
7851
+ * Specifies when the survey validates answers.
7799
7852
  *
7800
- * The following options are available:
7853
+ * Possible values:
7854
+ *
7855
+ * - `"onNextPage"` (default) - Triggers validation before the survey is switched to the next page or completed.
7856
+ * - `"onValueChanged"` - Triggers validation each time a question value is changed.
7857
+ * - `"onComplete"` - Triggers validation when a user clicks the Complete button. If previous pages contain errors, the survey switches to the page with the first error.
7801
7858
  *
7802
- * - `onNextPage` (default) - check errors on navigating to the next page or on completing the survey.
7803
- * - `onValueChanged` - check errors on every question value (i.e., answer) changing.
7804
- * - `onValueChanging` - check errors before setting value into survey. If there is an error, then survey data is not changed, but question value will be keeped.
7805
- * - `onComplete` - to validate all visible questions on complete button click. If there are errors on previous pages, then the page with the first error becomes the current.
7859
+ * Refer to the following help topic for more information: [Data Validation](https://surveyjs.io/form-library/documentation/data-validation).
7806
7860
  */
7807
7861
  get checkErrorsMode(): string;
7808
7862
  set checkErrorsMode(val: string);
7809
7863
  /**
7810
- * Specifies whether the text area of [comment](https://surveyjs.io/Documentation/Library?id=questioncommentmodel) questions/elements automatically expands its height to avoid the vertical scrollbar and to display the entire multi-line contents entered by respondents.
7811
- * Default value is false.
7812
- * @see QuestionCommentModel.autoGrow
7864
+ * Specifies whether to increase the height of text areas to accommodate multi-line comments.
7865
+ *
7866
+ * Default value: `false`
7867
+ *
7868
+ * You can override this property for individual Comment questions: [`autoGrow`](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model#autoGrow).
7813
7869
  */
7814
7870
  get autoGrowComment(): boolean;
7815
7871
  set autoGrowComment(val: boolean);
@@ -8029,21 +8085,19 @@ declare module "survey" {
8029
8085
  set completeText(newValue: string);
8030
8086
  get locCompleteText(): LocalizableString;
8031
8087
  /**
8032
- * Gets or sets the 'Preview' button caption.
8033
- * @see locale
8088
+ * Gets or sets a caption for the Preview button.
8034
8089
  * @see showPreviewBeforeComplete
8035
- * @see editText
8036
8090
  * @see showPreview
8091
+ * @see editText
8037
8092
  */
8038
8093
  get previewText(): string;
8039
8094
  set previewText(newValue: string);
8040
8095
  get locPreviewText(): LocalizableString;
8041
8096
  /**
8042
- * Gets or sets the 'Edit' button caption.
8043
- * @see locale
8097
+ * Gets or sets a caption for the Edit button displayed when the survey shows a [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page).
8044
8098
  * @see showPreviewBeforeComplete
8045
- * @see previewText
8046
8099
  * @see cancelPreview
8100
+ * @see previewText
8047
8101
  */
8048
8102
  get editText(): string;
8049
8103
  set editText(newValue: string);
@@ -8237,10 +8291,10 @@ declare module "survey" {
8237
8291
  */
8238
8292
  get comments(): any;
8239
8293
  /**
8240
- * Returns a list of visible pages. If all pages are visible, then this property returns the same list as the `pages` property.
8241
- * @see pages
8242
- * @see PageModel.visible
8243
- * @see PageModel.visibleIf
8294
+ * Returns an array of visible pages without the start page.
8295
+ *
8296
+ * To get an array of all pages, use the [`pages`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#pages) property. If all pages are visible, the `pages` and `visiblePages` arrays are identical.
8297
+ * @see [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-visibility)
8244
8298
  */
8245
8299
  get visiblePages(): Array<PageModel>;
8246
8300
  private isPageInVisibleList;
@@ -8250,24 +8304,40 @@ declare module "survey" {
8250
8304
  get isEmpty(): boolean;
8251
8305
  get PageCount(): number;
8252
8306
  /**
8253
- * Returns the survey page count.
8254
- * @see visiblePageCount
8307
+ * Returns a total number of survey pages.
8308
+ *
8309
+ * To get the number of visible pages, use the [`visiblePageCount`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#visiblePageCount) property.
8255
8310
  * @see pages
8256
8311
  */
8257
8312
  get pageCount(): number;
8258
8313
  /**
8259
- * Returns a number of visible pages within the survey.
8260
- * @see pageCount
8314
+ * Returns the number of visible survey pages.
8315
+ *
8316
+ * To get a total number of survey pages, use the [`pageCount`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#pageCount) property.
8261
8317
  * @see visiblePages
8318
+ * @see [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-visibility)
8262
8319
  */
8263
8320
  get visiblePageCount(): number;
8264
8321
  /**
8265
- * Returns the started page. This property works if the `firstPageIsStarted` property is set to `true`.
8322
+ * Returns the start page. Applies only if the [`firstPageIsStarted`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#firstPageIsStarted) property is set to `true`.
8323
+ *
8324
+ * Refer to the following help topic for more information: [Start Page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#start-page).
8266
8325
  * @see firstPageIsStarted
8326
+ * @see activePage
8267
8327
  */
8268
8328
  get startedPage(): PageModel;
8269
8329
  /**
8270
- * Gets or sets the current survey page. If a survey is rendered, then this property returns a page that a user can see/edit.
8330
+ * Gets or sets the current page.
8331
+ *
8332
+ * If you want to change the current page, set this property to a `PageModel` object. You can get this object in different ways. For example, you can call the [`getPageByName()`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#getPageByName) method to obtain a `PageModel` object with a specific name:
8333
+ *
8334
+ * ```js
8335
+ * survey.currentPage = survey.getPageByName("my-page-name");
8336
+ * ```
8337
+ *
8338
+ * Alternatively, you can change the current page if you set the [`currentPageNo`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#currentPageNo) property to the index of the required page.
8339
+ *
8340
+ * The `currentPage` property does not return the start page even if it is current. Use the [`activePage`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#activePage) property instead if your survey contains a start page.
8271
8341
  */
8272
8342
  get currentPage(): any;
8273
8343
  set currentPage(value: any);
@@ -8275,10 +8345,10 @@ declare module "survey" {
8275
8345
  private get isCurrentPageAvailable();
8276
8346
  private isPageExistsInSurvey;
8277
8347
  /**
8278
- * Returns the currentPage, unless the started page is showing. In this case returns the started page.
8348
+ * Returns [`startedPage`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#startedPage) if the survey currently displays a start page; otherwise, returns [`currentPage`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#currentPage).
8349
+ * @see startedPage
8279
8350
  * @see currentPage
8280
8351
  * @see firstPageIsStarted
8281
- * @see startedPage
8282
8352
  */
8283
8353
  get activePage(): any;
8284
8354
  /**
@@ -8293,20 +8363,24 @@ declare module "survey" {
8293
8363
  private onStateAndCurrentPageChanged;
8294
8364
  private getPageByObject;
8295
8365
  /**
8296
- * The zero-based index of the current page in the visible pages array.
8366
+ * A zero-based index of the current page in the [`visiblePages`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#visiblePages) array.
8297
8367
  *
8298
8368
  * [View Demo](https://surveyjs.io/form-library/examples/survey-editprevious/ (linkStyle))
8369
+ * @see visiblePages
8299
8370
  */
8300
8371
  get currentPageNo(): number;
8301
8372
  set currentPageNo(value: number);
8302
8373
  /**
8303
- * Gets or sets the question display order. Use this property to randomize questions. You can randomize questions on a specific page.
8374
+ * Specifies the sort order of questions in the survey.
8304
8375
  *
8305
- * The following options are available:
8376
+ * Possible values:
8377
+ *
8378
+ * - `"initial"` (default) - Preserves the original order of questions.
8379
+ * - `"random"` - Displays questions in random order.
8306
8380
  *
8307
- * - `random` - randomize questions
8308
- * - `initial` - keep questions in the same order, as in a survey model.
8309
- * @see SurveyPage.questionsOrder
8381
+ * You can override this property for individual pages and panels.
8382
+ * @see PageModel.questionsOrder
8383
+ * @see PanelModel.questionsOrder
8310
8384
  */
8311
8385
  get questionsOrder(): string;
8312
8386
  set questionsOrder(val: string);
@@ -8345,14 +8419,11 @@ declare module "survey" {
8345
8419
  protected setCompletedState(value: string, text: string): void;
8346
8420
  notify(message: string, type: string): void;
8347
8421
  /**
8348
- * Clears the survey data and state. If the survey has a `completed` state, it will get a `running` state.
8349
- * @param clearData clear the data
8350
- * @param gotoFirstPage make the first page as a current page.
8351
- * @see data
8352
- * @see state
8353
- * @see currentPage
8422
+ * Resets the survey [`state`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#state) and, optionally, [`data`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data). If `state` is `"completed"`, it becomes `"running"`.
8423
+ * @param clearData *Optional.* Specifies whether to clear survey data. Default value: `true`.
8424
+ * @param goToFirstPage *Optional.* Specifies whether to switch the survey to the first page. Default value: `true`.
8354
8425
  */
8355
- clear(clearData?: boolean, gotoFirstPage?: boolean): void;
8426
+ clear(clearData?: boolean, goToFirstPage?: boolean): void;
8356
8427
  mergeValues(src: any, dest: any): void;
8357
8428
  private updateValuesWithDefaults;
8358
8429
  protected updateCustomWidgets(page: PageModel): void;
@@ -8539,24 +8610,19 @@ declare module "survey" {
8539
8610
  nextPageUIClick(): boolean;
8540
8611
  nextPageMouseDown(): boolean;
8541
8612
  /**
8542
- * Shows preview for the survey. Switches the survey to the "preview" state.
8543
- *
8544
- * Details: [Preview State](https://surveyjs.io/Documentation/Library#states-preview)
8545
- * @see showPreviewBeforeComplete
8613
+ * Displays a [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page). Returns `false` if the preview cannot be displayed because of validation errors.
8546
8614
  * @see cancelPreview
8615
+ * @see showPreviewBeforeComplete
8616
+ * @see onShowingPreview
8547
8617
  * @see state
8548
- * @see previewText
8549
- * @see editText
8550
8618
  */
8551
8619
  showPreview(): boolean;
8552
8620
  private showPreviewCore;
8553
8621
  /**
8554
- * Cancels preview and switches back to the "running" state.
8555
- *
8556
- * Details: [Preview State](https://surveyjs.io/Documentation/Library#states-preview)
8557
- * @param curPage - A new current page. If the parameter is undefined then the last page becomes the current.
8558
- * @see showPreviewBeforeComplete
8622
+ * Cancels a [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page) and switches the survey to the page specified by the `curPage` parameter.
8623
+ * @param curPage A new current page. If you do not specify this parameter, the survey displays the last page.
8559
8624
  * @see showPreview
8625
+ * @see showPreviewBeforeComplete
8560
8626
  * @see state
8561
8627
  */
8562
8628
  cancelPreview(curPage?: any): void;
@@ -8577,8 +8643,11 @@ declare module "survey" {
8577
8643
  get questionsOnPageMode(): string;
8578
8644
  set questionsOnPageMode(val: string);
8579
8645
  /**
8580
- * Gets or sets whether the first survey page is a start page. Set this property to `true`, to make the first page a starting page.
8581
- * An end user cannot navigate to the start page and the start page does not affect a survey progress.
8646
+ * Gets or sets a Boolean value that specifies whether the first page is a start page.
8647
+ *
8648
+ * Refer to the following help topic for more information: [Start Page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#start-page).
8649
+ * @see startedPage
8650
+ * @see activePage
8582
8651
  */
8583
8652
  get firstPageIsStarted(): boolean;
8584
8653
  set firstPageIsStarted(val: boolean);
@@ -8795,16 +8864,19 @@ declare module "survey" {
8795
8864
  getPage(index: number): PageModel;
8796
8865
  /**
8797
8866
  * Adds an existing page to the survey.
8798
- * @param page a newly added page
8799
- * @param index - a page index to where insert a page. It is -1 by default and the page will be added into the end.
8867
+ * @param page A page to add.
8868
+ * @param index An index at which to insert the page. If you do not specify this parameter, the page will be added to the end.
8800
8869
  * @see addNewPage
8870
+ * @see createNewPage
8801
8871
  */
8802
8872
  addPage(page: PageModel, index?: number): void;
8803
8873
  /**
8804
- * Creates a new page and adds it to a survey. Generates a new name if the `name` parameter is not specified.
8805
- * @param name a page name
8806
- * @param index - a page index to where insert a new page. It is -1 by default and the page will be added into the end.
8874
+ * Creates a new page and adds it to the survey.
8875
+ * @param name A page name. If you do not specify this parameter, it will be generated automatically.
8876
+ * @param index An index at which to insert the page. If you do not specify this parameter, the page will be added to the end.
8877
+ * @returns The created and added page.
8807
8878
  * @see addPage
8879
+ * @see createNewPage
8808
8880
  */
8809
8881
  addNewPage(name?: string, index?: number): PageModel;
8810
8882
  /**
@@ -8887,8 +8959,9 @@ declare module "survey" {
8887
8959
  */
8888
8960
  getAllPanels(visibleOnly?: boolean, includingDesignTime?: boolean): Array<IPanel>;
8889
8961
  /**
8890
- * Creates and returns a new page, but do not add it into the survey.
8891
- * You can use addPage(page) function to add it into survey later.
8962
+ * Creates and returns a new page but does not add it to the survey.
8963
+ *
8964
+ * Call the [`addPage(page)`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#addPage) method to add the created page to the survey later or the [`addNewPage(name, index)`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#addNewPage) method to create _and_ add a page to the survey.
8892
8965
  * @see addPage
8893
8966
  * @see addNewPage
8894
8967
  */
@@ -9217,6 +9290,7 @@ declare module "survey" {
9217
9290
  * @param name question name
9218
9291
  */
9219
9292
  focusQuestion(name: string): boolean;
9293
+ questionEditFinishCallback(question: Question, event: any): void;
9220
9294
  getElementWrapperComponentName(element: any, reason?: string): string;
9221
9295
  getQuestionContentWrapperComponentName(element: any): string;
9222
9296
  getRowWrapperComponentName(row: QuestionRowModel): string;
@@ -9260,6 +9334,27 @@ declare module "survey" {
9260
9334
  disposeCallback: () => void;
9261
9335
  }
9262
9336
  }
9337
+ declare module "drag-drop-page-helper-v1" {
9338
+ import { IElement, ISurveyElement } from "base-interfaces";
9339
+ import { PageModel } from "page";
9340
+ export class DragDropPageHelperV1 {
9341
+ private page;
9342
+ constructor(page: PageModel);
9343
+ private dragDropInfo;
9344
+ getDragDropInfo(): any;
9345
+ dragDropStart(src: IElement, target: IElement, nestedPanelDepth?: number): void;
9346
+ dragDropMoveTo(destination: ISurveyElement, isBottom?: boolean, isEdge?: boolean): boolean;
9347
+ private correctDragDropInfo;
9348
+ private dragDropAllowFromSurvey;
9349
+ dragDropFinish(isCancel?: boolean): IElement;
9350
+ private dragDropGetElementIndex;
9351
+ private dragDropCanDropTagert;
9352
+ private dragDropCanDropSource;
9353
+ private dragDropCanDropCore;
9354
+ private dragDropCanDropNotNext;
9355
+ private dragDropIsSameElement;
9356
+ }
9357
+ }
9263
9358
  declare module "page" {
9264
9359
  import { IPage, IPanel, IElement, ISurveyElement } from "base-interfaces";
9265
9360
  import { PanelModelBase } from "panel";
@@ -9271,6 +9366,7 @@ declare module "page" {
9271
9366
  */
9272
9367
  export class PageModel extends PanelModelBase implements IPage {
9273
9368
  private hasShownValue;
9369
+ private dragDropPageHelper;
9274
9370
  constructor(name?: string);
9275
9371
  getType(): string;
9276
9372
  toString(): string;
@@ -9357,22 +9453,31 @@ declare module "page" {
9357
9453
  set maxTimeToFinish(val: number);
9358
9454
  protected onNumChanged(value: number): void;
9359
9455
  protected onVisibleChanged(): void;
9360
- private dragDropInfo;
9361
- protected getDragDropInfo(): any;
9456
+ getDragDropInfo(): any;
9362
9457
  dragDropStart(src: IElement, target: IElement, nestedPanelDepth?: number): void;
9363
9458
  dragDropMoveTo(destination: ISurveyElement, isBottom?: boolean, isEdge?: boolean): boolean;
9364
- private correctDragDropInfo;
9365
- private dragDropAllowFromSurvey;
9366
9459
  dragDropFinish(isCancel?: boolean): IElement;
9367
- private dragDropGetElementIndex;
9368
- private dragDropCanDropTagert;
9369
- private dragDropCanDropSource;
9370
- private dragDropCanDropCore;
9371
- private dragDropCanDropNotNext;
9372
- private dragDropIsSameElement;
9373
9460
  ensureRowsVisibility(): void;
9374
9461
  }
9375
9462
  }
9463
+ declare module "drag-drop-panel-helper-v1" {
9464
+ import { IElement, ISurveyElement } from "base-interfaces";
9465
+ import { DragDropInfo } from "drag-drop-helper-v1";
9466
+ import { PanelModelBase, QuestionRowModel } from "panel";
9467
+ export class DragDropPanelHelperV1 {
9468
+ private panel;
9469
+ constructor(panel: PanelModelBase);
9470
+ dragDropAddTarget(dragDropInfo: DragDropInfo): void;
9471
+ dragDropFindRow(findElement: ISurveyElement): QuestionRowModel;
9472
+ dragDropMoveElement(src: IElement, target: IElement, targetIndex: number): void;
9473
+ updateRowsOnElementAdded(element: IElement, index: number, dragDropInfo?: DragDropInfo, thisElement?: PanelModelBase): void;
9474
+ private dragDropAddTargetToRow;
9475
+ private dragDropAddTargetToEmptyPanel;
9476
+ private dragDropAddTargetToExistingRow;
9477
+ private dragDropAddTargetToNewRow;
9478
+ private dragDropAddTargetToEmptyPanelCore;
9479
+ }
9480
+ }
9376
9481
  declare module "panel" {
9377
9482
  import { HashTable } from "helpers";
9378
9483
  import { Base } from "base";
@@ -9384,15 +9489,7 @@ declare module "panel" {
9384
9489
  import { SurveyError } from "survey-error";
9385
9490
  import { IAction } from "actions/action";
9386
9491
  import { ActionContainer } from "actions/container";
9387
- export class DragDropInfo {
9388
- source: IElement;
9389
- target: IElement;
9390
- nestedPanelDepth: number;
9391
- constructor(source: IElement, target: IElement, nestedPanelDepth?: number);
9392
- destination: ISurveyElement;
9393
- isBottom: boolean;
9394
- isEdge: boolean;
9395
- }
9492
+ import { DragDropInfo } from "drag-drop-helper-v1";
9396
9493
  export class QuestionRowModel extends Base {
9397
9494
  panel: PanelModelBase;
9398
9495
  private static rowCounter;
@@ -9439,6 +9536,7 @@ declare module "panel" {
9439
9536
  addElementCallback: (element: IElement) => void;
9440
9537
  removeElementCallback: (element: IElement) => void;
9441
9538
  onGetQuestionTitleLocation: () => string;
9539
+ private dragDropPanelHelper;
9442
9540
  constructor(name?: string);
9443
9541
  getType(): string;
9444
9542
  setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void;
@@ -9652,10 +9750,10 @@ declare module "panel" {
9652
9750
  getQuestionStartIndex(): string;
9653
9751
  getChildrenLayoutType(): string;
9654
9752
  getProgressInfo(): IProgressInfo;
9655
- protected get root(): PanelModelBase;
9753
+ get root(): PanelModelBase;
9656
9754
  protected childVisibilityChanged(): void;
9657
- protected createRowAndSetLazy(index: number): QuestionRowModel;
9658
- protected createRow(): QuestionRowModel;
9755
+ createRowAndSetLazy(index: number): QuestionRowModel;
9756
+ createRow(): QuestionRowModel;
9659
9757
  onSurveyLoad(): void;
9660
9758
  onFirstRendering(): void;
9661
9759
  updateRows(): void;
@@ -9667,15 +9765,14 @@ declare module "panel" {
9667
9765
  private onElementVisibilityChanged;
9668
9766
  private onElementStartWithNewLineChanged;
9669
9767
  private updateRowsVisibility;
9670
- private canBuildRows;
9768
+ canBuildRows(): boolean;
9671
9769
  private buildRows;
9672
9770
  private isLazyRenderInRow;
9673
9771
  protected canRenderFirstRows(): boolean;
9674
- protected getDragDropInfo(): any;
9675
- private updateRowsOnElementAdded;
9772
+ getDragDropInfo(): any;
9676
9773
  private updateRowsOnElementRemoved;
9677
- protected updateRowsRemoveElementFromRow(element: IElement, row: QuestionRowModel): void;
9678
- private findRowByElement;
9774
+ updateRowsRemoveElementFromRow(element: IElement, row: QuestionRowModel): void;
9775
+ findRowByElement(el: IElement): QuestionRowModel;
9679
9776
  elementWidthChanged(el: IElement): void;
9680
9777
  get processedTitle(): string;
9681
9778
  protected getRenderedTitle(str: string): string;
@@ -9765,13 +9862,8 @@ declare module "panel" {
9765
9862
  runCondition(values: HashTable<any>, properties: HashTable<any>): void;
9766
9863
  onAnyValueChanged(name: string): void;
9767
9864
  checkBindings(valueName: string, value: any): void;
9768
- protected dragDropAddTarget(dragDropInfo: DragDropInfo): void;
9865
+ dragDropAddTarget(dragDropInfo: DragDropInfo): void;
9769
9866
  dragDropFindRow(findElement: ISurveyElement): QuestionRowModel;
9770
- private dragDropAddTargetToRow;
9771
- private dragDropAddTargetToEmptyPanel;
9772
- private dragDropAddTargetToExistingRow;
9773
- private dragDropAddTargetToNewRow;
9774
- private dragDropAddTargetToEmptyPanelCore;
9775
9867
  dragDropMoveElement(src: IElement, target: IElement, targetIndex: number): void;
9776
9868
  needResponsiveWidth(): boolean;
9777
9869
  get hasDescriptionUnderTitle(): boolean;
@@ -12304,6 +12396,7 @@ declare module "question_dropdown" {
12304
12396
  getType(): string;
12305
12397
  get ariaRole(): string;
12306
12398
  get selectedItem(): ItemValue;
12399
+ protected onGetSingleSelectedItem(selectedItemByValue: ItemValue): void;
12307
12400
  supportGoNextPageAutomatic(): boolean;
12308
12401
  private minMaxChoices;
12309
12402
  protected getChoices(): Array<ItemValue>;
@@ -12772,6 +12865,7 @@ declare module "dropdownMultiSelectListModel" {
12772
12865
  private getSelectedActions;
12773
12866
  protected getFocusFirstInputSelector(): string;
12774
12867
  protected createListModel(): MultiSelectListModel<ItemValue>;
12868
+ protected resetFilterString(): void;
12775
12869
  previousValue: any;
12776
12870
  doneButtonCaption: string;
12777
12871
  private get shouldResetAfterCancel();
@@ -13634,6 +13728,7 @@ declare module "surveyToc" {
13634
13728
  import { SurveyModel } from "survey";
13635
13729
  export function tryNavigateToPage(survey: SurveyModel, index: number): boolean;
13636
13730
  export function createTOCListModel(survey: SurveyModel): ListModel<Action>;
13731
+ export function getTocRootCss(survey: SurveyModel): string;
13637
13732
  }
13638
13733
  declare module "surveyProgress" {
13639
13734
  export class SurveyProgressModel {
@@ -14251,6 +14346,7 @@ declare module "dragdrop/survey-elements" {
14251
14346
  protected getDraggedElementClass(): string;
14252
14347
  protected createElementFromJson(json: object): HTMLElement;
14253
14348
  private createNewElement;
14349
+ protected findDropTargetNodeByDragOverNode(dragOverNode: HTMLElement): HTMLElement;
14254
14350
  protected getDropTargetByDataAttributeValue(dataAttributeValue: string, dropTargetNode: HTMLElement, event: PointerEvent): any;
14255
14351
  protected isDropTargetValid(): boolean;
14256
14352
  protected calculateIsBottom(clientY: number, dropTargetNode?: HTMLElement): boolean;
@@ -14601,6 +14697,8 @@ declare module "defaultCss/cssstandard" {
14601
14697
  paneldynamic: {
14602
14698
  root: string;
14603
14699
  title: string;
14700
+ header: string;
14701
+ headerTab: string;
14604
14702
  button: string;
14605
14703
  buttonAdd: string;
14606
14704
  buttonRemove: string;
@@ -14673,6 +14771,10 @@ declare module "defaultCss/cssstandard" {
14673
14771
  minText: string;
14674
14772
  itemText: string;
14675
14773
  maxText: string;
14774
+ itemStar: string;
14775
+ itemStarSelected: string;
14776
+ itemSmiley: string;
14777
+ itemSmileySelected: string;
14676
14778
  };
14677
14779
  text: {
14678
14780
  root: string;
@@ -15108,6 +15210,10 @@ declare module "defaultCss/cssmodern" {
15108
15210
  cleanButtonIconId: string;
15109
15211
  controlValue: string;
15110
15212
  controlInputFieldComponent: string;
15213
+ itemSmiley: string;
15214
+ itemStar: string;
15215
+ itemSmileySelected: string;
15216
+ itemStarSelected: string;
15111
15217
  };
15112
15218
  comment: {
15113
15219
  root: string;
@@ -21278,8 +21384,8 @@ declare module "react/reactquestion_matrixdropdownbase" {
21278
21384
  renderHeader(): JSX.Element | null;
21279
21385
  renderFooter(): JSX.Element | null;
21280
21386
  renderRows(): JSX.Element;
21281
- renderRow(keyValue: any, row: QuestionMatrixDropdownRenderedRow, cssClasses: any): JSX.Element;
21282
- renderCell(cell: QuestionMatrixDropdownRenderedCell, index: number, cssClasses: any): JSX.Element;
21387
+ renderRow(keyValue: any, row: QuestionMatrixDropdownRenderedRow, cssClasses: any, reason?: string): JSX.Element;
21388
+ renderCell(cell: QuestionMatrixDropdownRenderedCell, index: number, cssClasses: any, reason?: string): JSX.Element;
21283
21389
  private renderCellContent;
21284
21390
  }
21285
21391
  export class SurveyQuestionMatrixDropdownCell extends SurveyQuestionAndErrorsCell {