survey-react 1.9.89 → 1.9.90

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
@@ -1530,6 +1530,7 @@ declare module "list" {
1530
1530
  private loadingIndicatorValue;
1531
1531
  searchEnabled: boolean;
1532
1532
  showFilter: boolean;
1533
+ forceShowFilter: boolean;
1533
1534
  isExpanded: boolean;
1534
1535
  selectedItem: IAction;
1535
1536
  focusedItem: T;
@@ -3017,7 +3018,7 @@ declare module "panel" {
3017
3018
  import { HashTable } from "helpers";
3018
3019
  import { Base } from "base";
3019
3020
  import { ISurveyImpl, IPage, IPanel, IConditionRunner, IElement, ISurveyElement, IQuestion, ISurveyErrorOwner, ITitleOwner, IProgressInfo, ISurvey, IFindElement } from "base-interfaces";
3020
- import { SurveyElement } from "survey-element";
3021
+ import { DragTypeOverMeEnum, SurveyElement } from "survey-element";
3021
3022
  import { Question } from "question";
3022
3023
  import { LocalizableString } from "localizablestring";
3023
3024
  import { findScrollableParent } from "utils/utils";
@@ -3056,6 +3057,7 @@ declare module "panel" {
3056
3057
  private getRenderedWidthFromWidth;
3057
3058
  private calcVisible;
3058
3059
  private needToUpdateVisibleElements;
3060
+ dragTypeOverMe: DragTypeOverMeEnum;
3059
3061
  dispose(): void;
3060
3062
  getRowCss(): string;
3061
3063
  }
@@ -3249,12 +3251,14 @@ declare module "panel" {
3249
3251
  updateElementVisibility(): void;
3250
3252
  getFirstQuestionToFocus(withError?: boolean, ignoreCollapseState?: boolean): Question;
3251
3253
  /**
3252
- * Sets focus on the input of the first question in this panel/page.
3254
+ * Focuses the first question in this panel/page.
3255
+ * @see focusFirstErrorQuestion
3253
3256
  */
3254
3257
  focusFirstQuestion(): void;
3255
3258
  /**
3256
- * Sets focus on the input of the first question in this panel/page that has an error.
3259
+ * Focuses the first question with a validation error in this panel/page.
3257
3260
  * @see validate
3261
+ * @see focusFirstQuestion
3258
3262
  */
3259
3263
  focusFirstErrorQuestion(): void;
3260
3264
  addQuestionsToList(list: Array<IQuestion>, visibleOnly?: boolean, includingDesignTime?: boolean): void;
@@ -4025,7 +4029,6 @@ declare module "question_baseselect" {
4025
4029
  protected updateSelectedItemValues(): void;
4026
4030
  protected updateSingleSelectedItemValues(): void;
4027
4031
  protected updateMultipleSelectedItemValues(): void;
4028
- protected resetSelectedItemValues(): void;
4029
4032
  protected hasUnknownValue(val: any, includeOther?: boolean, isFilteredChoices?: boolean, checkEmptyValue?: boolean): boolean;
4030
4033
  protected isValueDisabled(val: any): boolean;
4031
4034
  /**
@@ -4560,23 +4563,70 @@ declare module "question_matrixdropdowncolumn" {
4560
4563
  private addProperty;
4561
4564
  }
4562
4565
  }
4566
+ declare module "dragdrop/engine" {
4567
+ export interface IDragDropEngine {
4568
+ dragInit(event: PointerEvent, draggedElement: any, parentElement: any, draggedElementNode: HTMLElement): void;
4569
+ dragOver(event: PointerEvent): void;
4570
+ drop(): void;
4571
+ clear(): void;
4572
+ }
4573
+ }
4563
4574
  declare module "utils/devices" {
4564
4575
  export const IsMobile: boolean;
4565
4576
  export let IsTouch: boolean;
4566
4577
  export function _setIsTouch(val: boolean): void;
4567
4578
  }
4579
+ declare module "dragdrop/dom-adapter" {
4580
+ import { IDragDropEngine } from "dragdrop/engine";
4581
+ export interface IDragDropDOMAdapter {
4582
+ startDrag(event: PointerEvent, draggedElement: any, parentElement: any, draggedElementNode: HTMLElement, preventSaveTargetNode: boolean): void;
4583
+ draggedElementShortcut: HTMLElement;
4584
+ }
4585
+ export class DragDropDOMAdapter implements IDragDropDOMAdapter {
4586
+ private dd;
4587
+ private longTap?;
4588
+ static PreventScrolling: boolean;
4589
+ private timeoutID;
4590
+ private startX;
4591
+ private startY;
4592
+ private currentX;
4593
+ private currentY;
4594
+ private savedTargetNode;
4595
+ private scrollIntervalId;
4596
+ constructor(dd: IDragDropEngine, longTap?: boolean);
4597
+ private stopLongTapIfMoveEnough;
4598
+ private get isMicroMovement();
4599
+ private stopLongTap;
4600
+ private startLongTapProcessing;
4601
+ private handlePointerCancel;
4602
+ private handleEscapeButton;
4603
+ private onContextMenu;
4604
+ private moveShortcutElement;
4605
+ private getShortcutBottomCoordinate;
4606
+ private getShortcutRightCoordinate;
4607
+ private doScroll;
4608
+ private dragOver;
4609
+ private clear;
4610
+ private drop;
4611
+ private doStartDrag;
4612
+ draggedElementShortcut: any;
4613
+ startDrag(event: PointerEvent, draggedElement: any, parentElement?: any, draggedElementNode?: HTMLElement, preventSaveTargetNode?: boolean): void;
4614
+ }
4615
+ }
4568
4616
  declare module "dragdrop/core" {
4569
4617
  import { SurveyModel } from "survey";
4570
- import { Base, EventBase } from "base";
4618
+ import { EventBase } from "base";
4571
4619
  import { IShortcutText, ISurvey } from "base-interfaces";
4572
- export abstract class DragDropCore<T> extends Base {
4620
+ import { IDragDropEngine } from "dragdrop/engine";
4621
+ import { IDragDropDOMAdapter } from "dragdrop/dom-adapter";
4622
+ export abstract class DragDropCore<T> implements IDragDropEngine {
4573
4623
  private surveyValue?;
4574
4624
  private creator?;
4575
- private longTap?;
4576
- isBottom: boolean;
4625
+ private _isBottom;
4626
+ get isBottom(): boolean;
4627
+ set isBottom(val: boolean);
4577
4628
  onGhostPositionChanged: EventBase<{}>;
4578
4629
  protected ghostPositionChanged(): void;
4579
- static PreventScrolling: boolean;
4580
4630
  onDragStart: EventBase<DragDropCore<T>>;
4581
4631
  onDragEnd: EventBase<DragDropCore<T>>;
4582
4632
  onBeforeDrop: EventBase<DragDropCore<T>, any>;
@@ -4588,54 +4638,34 @@ declare module "dragdrop/core" {
4588
4638
  protected get dropTargetDataAttributeName(): string;
4589
4639
  protected get survey(): SurveyModel;
4590
4640
  prevDropTarget: any;
4591
- protected draggedElementShortcut: any;
4592
- private scrollIntervalId;
4593
4641
  protected allowDropHere: boolean;
4594
- constructor(surveyValue?: ISurvey, creator?: any, longTap?: boolean);
4642
+ protected domAdapter: IDragDropDOMAdapter;
4643
+ constructor(surveyValue?: ISurvey, creator?: any, longTap?: boolean, domAdapter?: IDragDropDOMAdapter);
4595
4644
  startDrag(event: PointerEvent, draggedElement: any, parentElement?: any, draggedElementNode?: HTMLElement, preventSaveTargetNode?: boolean): void;
4596
- private timeoutID;
4597
- private startX;
4598
- private startY;
4599
- private currentX;
4600
- private currentY;
4601
- private savedTargetNode;
4602
- private startLongTapProcessing;
4603
- private stopLongTapIfMoveEnough;
4604
- private get isMicroMovement();
4605
- private stopLongTap;
4606
- private doStartDrag;
4607
- private onContextMenu;
4608
- private dragOver;
4609
- private drop;
4610
- protected isDropTargetDoesntChanged(newIsBottom: boolean): boolean;
4645
+ dragInit(event: PointerEvent, draggedElement: any, parentElement?: any, draggedElementNode?: HTMLElement): void;
4611
4646
  protected onStartDrag(): void;
4647
+ protected isDropTargetDoesntChanged(newIsBottom: boolean): boolean;
4612
4648
  protected getShortcutText(draggedElement: IShortcutText): string;
4613
4649
  protected createDraggedElementShortcut(text: string, draggedElementNode?: HTMLElement, event?: PointerEvent): HTMLElement;
4614
4650
  protected getDraggedElementClass(): string;
4615
- protected doDragOver(dropTargetNode?: HTMLElement, event?: PointerEvent): void;
4616
- protected afterDragOver(dropTargetNode?: HTMLElement, event?: PointerEvent): void;
4617
- getGhostPosition(item: any): string;
4651
+ protected doDragOver(): void;
4652
+ protected afterDragOver(dropTargetNode: HTMLElement): void;
4618
4653
  protected abstract isDropTargetValid(dropTarget: any, dropTargetNode?: HTMLElement): boolean;
4619
- private handlePointerCancel;
4620
- protected handleEscapeButton: (event: KeyboardEvent) => void;
4621
- private moveShortcutElement;
4622
- private getShortcutBottomCoordinate;
4623
- private getShortcutRightCoordinate;
4624
- private doScroll;
4625
4654
  protected banDropHere: () => void;
4626
4655
  protected doBanDropHere: () => void;
4656
+ protected findDropTargetNodeFromPoint(clientX: number, clientY: number): HTMLElement;
4627
4657
  protected getDataAttributeValueByNode(node: HTMLElement): string;
4628
4658
  protected getDropTargetByNode(dropTargetNode: HTMLElement, event: PointerEvent): any;
4629
4659
  private capitalizeFirstLetter;
4630
4660
  protected abstract getDropTargetByDataAttributeValue(dataAttributeValue: string, dropTargetNode?: HTMLElement, event?: PointerEvent): any;
4631
4661
  protected calculateVerticalMiddleOfHTMLElement(HTMLElement: HTMLElement): number;
4632
4662
  protected calculateHorizontalMiddleOfHTMLElement(HTMLElement: HTMLElement): number;
4633
- protected abstract calculateIsBottom(clientY: number, dropTargetNode?: HTMLElement): boolean;
4634
- private findDropTargetNodeFromPoint;
4663
+ protected calculateIsBottom(clientY: number, dropTargetNode?: HTMLElement): boolean;
4635
4664
  protected findDropTargetNodeByDragOverNode(dragOverNode: HTMLElement): HTMLElement;
4665
+ dragOver(event: PointerEvent): void;
4636
4666
  protected abstract doDrop(): any;
4637
- protected clear: () => void;
4638
- protected doClear(): void;
4667
+ drop(): void;
4668
+ clear(): void;
4639
4669
  }
4640
4670
  }
4641
4671
  declare module "dragdrop/matrix-rows" {
@@ -4648,11 +4678,11 @@ declare module "dragdrop/matrix-rows" {
4648
4678
  private fromIndex;
4649
4679
  private toIndex;
4650
4680
  protected getDropTargetByDataAttributeValue(dataAttributeValue: any): MatrixDropdownRowModelBase;
4651
- protected isDropTargetValid(dropTarget: any): boolean;
4681
+ protected isDropTargetValid(dropTarget: any, dropTargetNode?: HTMLElement): boolean;
4652
4682
  protected calculateIsBottom(clientY: number): boolean;
4653
4683
  protected afterDragOver(dropTargetNode: HTMLElement): void;
4654
4684
  protected doDrop: () => QuestionMatrixDynamicModel;
4655
- protected doClear(): void;
4685
+ clear(): void;
4656
4686
  }
4657
4687
  }
4658
4688
  declare module "question_matrixdropdownrendered" {
@@ -5661,6 +5691,7 @@ declare module "question_paneldynamic" {
5661
5691
  protected createAndSetupNewPanelObject(): PanelModel;
5662
5692
  private getTemplateQuestionTitleLocation;
5663
5693
  protected createNewPanelObject(): PanelModel;
5694
+ private settingPanelCountBasedOnValue;
5664
5695
  private setPanelCountBasedOnValue;
5665
5696
  setQuestionValue(newValue: any): void;
5666
5697
  onSurveyValueChanged(newValue: any): void;
@@ -7481,7 +7512,7 @@ declare module "survey" {
7481
7512
  */
7482
7513
  onNavigateToUrl: EventBase<SurveyModel, NavigateToUrlEvent>;
7483
7514
  /**
7484
- * An event that is raised when the survey [`state`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#state) changes from `"starting"` to `"running"`. This occurs only if your survey includes a [start page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#start-page).
7515
+ * An event that is raised when the survey [`state`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#state) changes to `"running"`.
7485
7516
  * @see firstPageIsStarted
7486
7517
  */
7487
7518
  onStarted: EventBase<SurveyModel, {}>;
@@ -7843,13 +7874,17 @@ declare module "survey" {
7843
7874
  */
7844
7875
  onAfterRenderPanel: EventBase<SurveyModel, AfterRenderPanelEvent>;
7845
7876
  /**
7846
- * The event occurs when an element within a question gets focus.
7877
+ * An event that is raised when an element (input field, checkbox, radio button) within a question gets focus.
7847
7878
  * @see onFocusInPanel
7879
+ * @see focusFirstQuestionAutomatic
7880
+ * @see focusQuestion
7848
7881
  */
7849
7882
  onFocusInQuestion: EventBase<SurveyModel, FocusInQuestionEvent>;
7850
7883
  /**
7851
- * The event occurs when an element within a panel gets focus.
7884
+ * An event that is raised when an element within a panel gets focus.
7852
7885
  * @see onFocusInQuestion
7886
+ * @see focusFirstQuestionAutomatic
7887
+ * @see focusQuestion
7853
7888
  */
7854
7889
  onFocusInPanel: EventBase<SurveyModel, FocusInPanelEvent>;
7855
7890
  /**
@@ -8170,13 +8205,21 @@ declare module "survey" {
8170
8205
  get surveyShowDataSaving(): boolean;
8171
8206
  set surveyShowDataSaving(val: boolean);
8172
8207
  /**
8173
- * Gets or sets whether the first input is focused on showing a next or a previous page.
8208
+ * Specifies whether to focus the first question on the page on survey startup or when users switch between pages.
8209
+ *
8210
+ * Default value: `true`
8211
+ * @see focusOnFirstError
8212
+ * @see focusFirstQuestion
8213
+ * @see focusQuestion
8174
8214
  */
8175
8215
  get focusFirstQuestionAutomatic(): boolean;
8176
8216
  set focusFirstQuestionAutomatic(val: boolean);
8177
8217
  /**
8178
- * Gets or sets whether the first input is focused if the current page has errors.
8179
- * Set this property to `false` (the default value is `true`) if you do not want to bring the focus to the first question that has error on the page.
8218
+ * Specifies whether to focus the first question with a validation error on the current page.
8219
+ *
8220
+ * Default value: `true`
8221
+ * @see validate
8222
+ * @see focusFirstQuestionAutomatic
8180
8223
  */
8181
8224
  get focusOnFirstError(): boolean;
8182
8225
  set focusOnFirstError(val: boolean);
@@ -8348,14 +8391,25 @@ declare module "survey" {
8348
8391
  get checkErrorsMode(): string;
8349
8392
  set checkErrorsMode(val: string);
8350
8393
  /**
8351
- * Specifies whether to increase the height of text areas to accommodate multi-line comments.
8394
+ * Specifies whether to increase the height of [Long Text](https://surveyjs.io/form-library/examples/add-open-ended-question-to-a-form/) questions and other text areas to accommodate multi-line text content.
8352
8395
  *
8353
8396
  * Default value: `false`
8354
8397
  *
8355
- * You can override this property for individual Comment questions: [`autoGrow`](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model#autoGrow).
8398
+ * You can override this property for individual Long Text questions: [`autoGrow`](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model#autoGrow).
8399
+ * @see allowResizeComment
8356
8400
  */
8357
8401
  get autoGrowComment(): boolean;
8358
8402
  set autoGrowComment(val: boolean);
8403
+ /**
8404
+ * Specifies whether to display a resize handle for [Long Text](https://surveyjs.io/form-library/examples/add-open-ended-question-to-a-form/) questions and other text areas intended for multi-line text content.
8405
+ *
8406
+ * Default value: `true`
8407
+ *
8408
+ * You can override this property for individual Long Text questions: [`allowResize`](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model#allowResize).
8409
+ * @see autoGrowComment
8410
+ */
8411
+ get allowResizeComment(): boolean;
8412
+ set allowResizeComment(val: boolean);
8359
8413
  /**
8360
8414
  * Gets or sets a value that specifies how the survey updates its questions' text values.
8361
8415
  *
@@ -8891,7 +8945,9 @@ declare module "survey" {
8891
8945
  get questionsOrder(): string;
8892
8946
  set questionsOrder(val: string);
8893
8947
  /**
8894
- * Sets the input focus to the first question with the input field.
8948
+ * Focuses the first question on the current page.
8949
+ * @see focusQuestion
8950
+ * @see focusFirstQuestionAutomatic
8895
8951
  */
8896
8952
  focusFirstQuestion(): void;
8897
8953
  scrollToTopOnPageChange(doScroll?: boolean): void;
@@ -9365,6 +9421,9 @@ declare module "survey" {
9365
9421
  addPage(page: PageModel, index?: number): void;
9366
9422
  /**
9367
9423
  * Creates a new page and adds it to the survey.
9424
+ *
9425
+ * If you want to switch a survey to the newly added page, assign its index to the [`currentPageNo`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#currentPageNo) property or assign the entire page to the [`currentPage`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#currentPage) property.
9426
+ *
9368
9427
  * @param name A page name. If you do not specify this parameter, it will be generated automatically.
9369
9428
  * @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.
9370
9429
  * @returns The created and added page.
@@ -9782,9 +9841,11 @@ declare module "survey" {
9782
9841
  private needRenderIcons;
9783
9842
  private skippedPages;
9784
9843
  /**
9785
- * Focus question by its name. If needed change the current page on the page where question is located.
9786
- * Function returns false if there is no question with this name or question is invisible, otherwise it returns true.
9787
- * @param name question name
9844
+ * Focuses a question with a specified name. Switches the current page if needed.
9845
+ * @param name A question name.
9846
+ * @returns `false` if the survey does not contain a question with a specified name or this question is hidden; otherwise, `true`.
9847
+ * @see focusFirstQuestion
9848
+ * @see focusFirstQuestionAutomatic
9788
9849
  */
9789
9850
  focusQuestion(name: string): boolean;
9790
9851
  questionEditFinishCallback(question: Question, event: any): void;
@@ -9896,7 +9957,11 @@ declare module "survey-element" {
9896
9957
  export enum DragTypeOverMeEnum {
9897
9958
  InsideEmptyPanel = 1,
9898
9959
  MultilineRight = 2,
9899
- MultilineLeft = 3
9960
+ MultilineLeft = 3,
9961
+ Top = 4,
9962
+ Right = 5,
9963
+ Bottom = 6,
9964
+ Left = 7
9900
9965
  }
9901
9966
  /**
9902
9967
  * A base class for all survey elements.
@@ -10752,6 +10817,7 @@ declare module "question" {
10752
10817
  protected initCommentFromSurvey(): void;
10753
10818
  protected runExpression(expression: string): any;
10754
10819
  private get autoGrowComment();
10820
+ private get allowResizeComment();
10755
10821
  private get questionValue();
10756
10822
  private set questionValue(value);
10757
10823
  private get questionComment();
@@ -11016,7 +11082,7 @@ declare module "question" {
11016
11082
  protected getCompactRenderAs(): string;
11017
11083
  protected getDesktopRenderAs(): string;
11018
11084
  protected processResponsiveness(requiredWidth: number, availableWidth: number): any;
11019
- private destroyResizeObserver;
11085
+ destroyResizeObserver(): void;
11020
11086
  dispose(): void;
11021
11087
  }
11022
11088
  }
@@ -11681,6 +11747,7 @@ declare module "base-interfaces" {
11681
11747
  isLoadingFromJson: boolean;
11682
11748
  isUpdateValueTextOnTyping: boolean;
11683
11749
  autoGrowComment: boolean;
11750
+ allowResizeComment: boolean;
11684
11751
  state: string;
11685
11752
  isLazyRendering: boolean;
11686
11753
  cancelPreviewByPage(panel: IPanel): any;
@@ -11896,511 +11963,43 @@ declare module "base-interfaces" {
11896
11963
  data?: any;
11897
11964
  }
11898
11965
  }
11899
- declare module "question_dropdown" {
11900
- import { QuestionSelectBase } from "question_baseselect";
11901
- import { LocalizableString } from "localizablestring";
11902
- import { ItemValue } from "itemvalue";
11903
- import { PopupModel } from "popup";
11904
- import { EventBase } from "base";
11905
- import { DropdownListModel } from "dropdownListModel";
11966
+ declare module "itemvalue" {
11967
+ import { ILocalizableOwner, LocalizableString } from "localizablestring";
11968
+ import { ConditionRunner } from "conditions";
11969
+ import { IShortcutText, ISurvey } from "base-interfaces";
11970
+ import { BaseAction } from "actions/action";
11906
11971
  /**
11907
- * A class that describes the Dropdown question type.
11908
- *
11909
- * [View Demo](https://surveyjs.io/form-library/examples/questiontype-dropdown/ (linkStyle))
11972
+ * Array of ItemValue is used in checkox, dropdown and radiogroup choices, matrix columns and rows.
11973
+ * It has two main properties: value and text. If text is empty, value is used for displaying.
11974
+ * The text property is localizable and support markdown.
11910
11975
  */
11911
- export class QuestionDropdownModel extends QuestionSelectBase {
11912
- dropdownListModelValue: DropdownListModel;
11913
- lastSelectedItemValue: ItemValue;
11914
- updateReadOnlyText(): void;
11915
- constructor(name: string);
11916
- locStrsChanged(): void;
11917
- get showOptionsCaption(): boolean;
11918
- set showOptionsCaption(val: boolean);
11919
- get optionsCaption(): string;
11920
- set optionsCaption(val: string);
11976
+ export class ItemValue extends BaseAction implements ILocalizableOwner, IShortcutText {
11977
+ protected typeName: string;
11978
+ [index: string]: any;
11979
+ getMarkdownHtml(text: string, name: string): string;
11980
+ getRenderer(name: string): string;
11981
+ getRendererContext(locStr: LocalizableString): any;
11982
+ getProcessedText(text: string): string;
11983
+ static get Separator(): string;
11984
+ static set Separator(val: string);
11921
11985
  /**
11922
- * A placeholder for the input field.
11986
+ * Resets the input array and fills it with values from the values array
11923
11987
  */
11924
- get placeholder(): string;
11925
- set placeholder(val: string);
11926
- get locPlaceholder(): LocalizableString;
11927
- get clearCaption(): string;
11928
- set clearCaption(value: string);
11929
- get locClearCaption(): LocalizableString;
11930
- getType(): string;
11931
- get ariaRole(): string;
11932
- get selectedItem(): ItemValue;
11933
- protected onGetSingleSelectedItem(selectedItemByValue: ItemValue): void;
11934
- supportGoNextPageAutomatic(): boolean;
11935
- private minMaxChoices;
11936
- protected getChoices(): Array<ItemValue>;
11937
- /**
11938
- * Use the `choicesMin`, `choicesMax`, and `choicesStep` properties to generate choice items automatically. For example, the configuration below generates three choice items: [10, 20, 30].
11939
- *
11940
- * ```js
11941
- * "choicesMin": 10,
11942
- * "choicesMax": 30
11943
- * "choicesStep": 10
11944
- * ```
11945
- * @see choicesMax
11946
- * @see choicesStep
11947
- */
11948
- get choicesMin(): number;
11949
- set choicesMin(val: number);
11950
- /**
11951
- * Use the `choicesMin`, `choicesMax`, and `choicesStep` properties to generate choice items automatically. For example, the configuration below generates three choice items: [10, 20, 30].
11952
- *
11953
- * ```js
11954
- * "choicesMin": 10,
11955
- * "choicesMax": 30
11956
- * "choicesStep": 10
11957
- * ```
11958
- * @see choicesMin
11959
- * @see choicesStep
11960
- */
11961
- get choicesMax(): number;
11962
- set choicesMax(val: number);
11963
- /**
11964
- * Use the `choicesMin`, `choicesMax`, and `choicesStep` properties to generate choice items automatically. For example, the configuration below generates three choice items: [10, 20, 30].
11965
- *
11966
- * ```js
11967
- * "choicesMin": 10,
11968
- * "choicesMax": 30
11969
- * "choicesStep": 10
11970
- * ```
11971
- *
11972
- * The default value of the `choicesStep` property is 1.
11973
- * @see choicesMin
11974
- * @see choicesMax
11975
- */
11976
- get choicesStep(): number;
11977
- set choicesStep(val: number);
11978
- get autocomplete(): string;
11979
- set autocomplete(val: string);
11980
- /**
11981
- * Specifies whether to display a button that clears the selected value.
11982
- */
11983
- allowClear: boolean;
11984
- /**
11985
- * Specifies whether users can enter a value into the input field to filter the drop-down list.
11986
- */
11987
- searchEnabled: boolean;
11988
- inputHasValue: boolean;
11989
- readOnlyText: string;
11990
- /**
11991
- * Enables lazy loading. If you set this property to `true`, you should implement the Survey's [`onChoicesLazyLoad`](https://surveyjs.io/form-library/documentation/surveymodel#onChoicesLazyLoad) event handler.
11992
- * @see choicesLazyLoadPageSize
11993
- * @see SurveyModel.onChoicesLazyLoad
11994
- */
11995
- choicesLazyLoadEnabled: boolean;
11996
- /**
11997
- * Specifies the number of choice items to load at a time when choices are loaded on demand.
11998
- * @see choicesLazyLoadEnabled
11999
- * @see SurveyModel.onChoicesLazyLoad
12000
- */
12001
- choicesLazyLoadPageSize: number;
12002
- getControlClass(): string;
12003
- suggestedItem: ItemValue;
12004
- get selectedItemLocText(): LocalizableString;
12005
- get inputFieldComponentName(): string;
12006
- get showSelectedItemLocText(): boolean;
12007
- get showInputFieldComponent(): boolean;
12008
- private get selectedItemText();
12009
- get dropdownListModel(): DropdownListModel;
12010
- set dropdownListModel(val: DropdownListModel);
12011
- get popupModel(): PopupModel;
12012
- get ariaExpanded(): string;
12013
- onOpened: EventBase<QuestionDropdownModel>;
12014
- onOpenedCallBack(): void;
12015
- protected onSelectedItemValuesChangedHandler(newValue: any): void;
12016
- protected hasUnknownValue(val: any, includeOther: boolean, isFilteredChoices: boolean, checkEmptyValue: boolean): boolean;
12017
- protected needConvertRenderedOtherToDataValue(): boolean;
12018
- protected onVisibleChoicesChanged(): void;
12019
- protected getFirstInputElementId(): string;
12020
- getInputId(): string;
12021
- clearValue(): void;
12022
- onClick(e: any): void;
12023
- onKeyUp(event: any): void;
12024
- dispose(): void;
12025
- }
12026
- }
12027
- declare module "dropdownListModel" {
12028
- import { IAction } from "actions/action";
12029
- import { Base } from "base";
12030
- import { ItemValue } from "itemvalue";
12031
- import { ListModel } from "list";
12032
- import { PopupModel } from "popup";
12033
- import { Question } from "question";
12034
- export class DropdownListModel extends Base {
12035
- protected question: Question;
12036
- protected onSelectionChanged?: (item: IAction, ...params: any[]) => void;
12037
- readonly minPageSize = 25;
12038
- readonly loadingItemHeight = 40;
12039
- private _markdownMode;
12040
- private _popupModel;
12041
- private get focusFirstInputSelector();
12042
- protected readonly selectedItemSelector = ".sv-list__item--selected";
12043
- protected readonly itemSelector = ".sv-list__item";
12044
- protected getFocusFirstInputSelector(): string;
12045
- private itemsSettings;
12046
- private isRunningLoadQuestionChoices;
12047
- protected listModel: ListModel<ItemValue>;
12048
- protected popupCssClasses: string;
12049
- private resetItemsSettings;
12050
- private setItems;
12051
- private updateQuestionChoices;
12052
- private updatePopupFocusFirstInputSelector;
12053
- protected createPopup(): void;
12054
- private setFilterStringToListModel;
12055
- protected popupRecalculatePosition(isResetHeight: boolean): void;
12056
- protected onHidePopup(): void;
12057
- protected getAvailableItems(): Array<ItemValue>;
12058
- protected createListModel(): ListModel<ItemValue>;
12059
- protected updateAfterListModelCreated(model: ListModel<ItemValue>): void;
12060
- updateCssClasses(popupCssClass: string, listCssClasses: any): void;
12061
- protected resetFilterString(): void;
12062
- clear(): void;
12063
- protected onSetFilterString(): void;
12064
- searchEnabled: boolean;
12065
- filterString: string;
12066
- inputString: string;
12067
- showSelectedItemLocText: boolean;
12068
- showInputFieldComponent: boolean;
12069
- ariaActivedescendant: string;
12070
- private applyInputString;
12071
- protected fixInputCase(): void;
12072
- protected applyHintString(item: ItemValue): void;
12073
- get inputStringRendered(): string;
12074
- set inputStringRendered(val: string);
12075
- get placeholderRendered(): any;
12076
- get listElementId(): string;
12077
- hasScroll: boolean;
12078
- hintString: string;
12079
- private get hintStringLC();
12080
- private get inputStringLC();
12081
- get showHintPrefix(): boolean;
12082
- get hintStringPrefix(): string;
12083
- get showHintString(): boolean;
12084
- get hintStringSuffix(): string;
12085
- get hintStringMiddle(): string;
12086
- constructor(question: Question, onSelectionChanged?: (item: IAction, ...params: any[]) => void);
12087
- get popupModel(): PopupModel;
12088
- get inputReadOnly(): boolean;
12089
- get filterStringEnabled(): boolean;
12090
- get inputMode(): "none" | "text";
12091
- setSearchEnabled(newValue: boolean): void;
12092
- updateItems(): void;
12093
- onClick(event: any): void;
12094
- protected focusItemOnClickAndPopup(): void;
12095
- onClear(event: any): void;
12096
- getSelectedAction(): ItemValue;
12097
- changeSelectionWithKeyboard(reverse: boolean): void;
12098
- protected beforeScrollToFocusedItem(focusedItem: ItemValue): void;
12099
- protected afterScrollToFocusedItem(): void;
12100
- keyHandler(event: any): void;
12101
- protected onEscape(): void;
12102
- onScroll(event: Event): void;
12103
- onBlur(event: any): void;
12104
- onFocus(event: any): void;
12105
- setInputStringFromSelectedItem(newValue?: any): void;
12106
- dispose(): void;
12107
- scrollToFocusedItem(): void;
12108
- }
12109
- }
12110
- declare module "question_rating" {
12111
- import { ItemValue } from "itemvalue";
12112
- import { Question } from "question";
12113
- import { LocalizableString } from "localizablestring";
12114
- import { Base } from "base";
12115
- import { DropdownListModel } from "dropdownListModel";
12116
- export class RenderedRatingItem extends Base {
12117
- itemValue: ItemValue;
12118
- private locString;
12119
- private onStringChangedCallback;
12120
- get value(): number;
12121
- highlight: "none" | "highlighted" | "unhighlighted";
12122
- get locText(): LocalizableString;
12123
- text: string;
12124
- style: any;
12125
- constructor(itemValue: ItemValue, locString?: LocalizableString);
12126
- }
12127
- /**
12128
- * A class that describes the Rating Scale question type.
12129
- *
12130
- * [View Demo](https://surveyjs.io/form-library/examples/rating-scale/ (linkStyle))
12131
- */
12132
- export class QuestionRatingModel extends Question {
12133
- constructor(name: string);
12134
- private jsonObj;
12135
- private setIconsToRateValues;
12136
- startLoadingFromJson(jsonObj: any): void;
12137
- endLoadingFromJson(): void;
12138
- private _syncPropertiesChanging;
12139
- private registerSychProperties;
12140
- private useRateValues;
12141
- private updateRateMax;
12142
- private updateRateMin;
12143
- private updateRateCount;
12144
- initPropertyDependencies(): void;
12145
- autoGenerate: boolean;
12146
- /**
12147
- * A list of rate values.
12148
- *
12149
- * This property accepts an array of objects with the following structure:
12150
- *
12151
- * ```js
12152
- * {
12153
- * "value": any, // A value to be saved in survey results
12154
- * "text": String, // A display text. This property supports Markdown. When `text` is undefined, `value` is used.
12155
- * "customProperty": any // Any property that you find useful.
12156
- * }
12157
- * ```
12158
- *
12159
- * If you add custom properties, refer to the following help topic to learn how to serialize them into JSON: [Add Custom Properties to Property Grid](https://surveyjs.io/survey-creator/documentation/property-grid#add-custom-properties-to-the-property-grid).
12160
- *
12161
- * To enable Markdown support for the `text` 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/).
12162
- *
12163
- * If you need to specify only the `value` property, you can set the `rateValues` property to an array of numbers, for example, `[ 3, 6, 10 ]`. These values are both saved in survey results and used as display text.
12164
- *
12165
- * If you do not specify the `rateValues` property, rate values are generated automatically based upon the [`rateMin`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateMin), [`rateMax`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateMax), [`rateStep`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateStep), and [`rateCount`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateCount) property values.
12166
- *
12167
- * [View Demo](/form-library/examples/rating-scale/ (linkStyle))
12168
- */
12169
- get rateValues(): Array<any>;
12170
- set rateValues(val: Array<any>);
12171
- /**
12172
- * Specifies the first rate value in the generated sequence of rate values. Applies if the [`rateValues`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateValues) array is empty.
12173
- *
12174
- * Default value: 1
12175
- *
12176
- * [View Demo](/form-library/examples/rating-scale/ (linkStyle))
12177
- * @see rateMax
12178
- * @see rateStep
12179
- * @see rateCount
12180
- */
12181
- get rateMin(): number;
12182
- set rateMin(val: number);
12183
- /**
12184
- * Specifies the last rate value in the generated sequence of rate values. Applies if the [`rateValues`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateValues) array is empty.
12185
- *
12186
- * Default value: 5
12187
- *
12188
- * [View Demo](/form-library/examples/rating-scale/ (linkStyle))
12189
- * @see rateMin
12190
- * @see rateStep
12191
- * @see rateCount
12192
- */
12193
- get rateMax(): number;
12194
- set rateMax(val: number);
12195
- /**
12196
- * Specifies a step with which to generate rate values. Applies if the [`rateValues`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateValues) array is empty.
12197
- *
12198
- * Default value: 1
12199
- *
12200
- * [View Demo](/form-library/examples/rating-scale/ (linkStyle))
12201
- * @see rateMin
12202
- * @see rateMax
12203
- * @see rateCount
12204
- */
12205
- get rateStep(): number;
12206
- set rateStep(val: number);
12207
- /**
12208
- * Specifies the number of rate values you want to generate. Applies if the [`rateValues`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateValues) array is empty.
12209
- *
12210
- * Set the [`rateMin`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateMin) or [`rateMax`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateMax) property to specify the first or the last rate value. Use the [`rateStep`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateStep) property to specify a step with which to generate rate values.
12211
- *
12212
- * [View Demo](/form-library/examples/rating-scale/ (linkStyle))
12213
- */
12214
- rateCount: number;
12215
- private static badColor;
12216
- private static normalColor;
12217
- private static goodColor;
12218
- private static badColorLight;
12219
- private static normalColorLight;
12220
- private static goodColorLight;
12221
- private initColors;
12222
- protected getDisplayValueCore(keysAsText: boolean, value: any): any;
12223
- get visibleRateValues(): ItemValue[];
12224
- itemValuePropertyChanged(item: ItemValue, name: string, oldValue: any, newValue: any): void;
12225
- private createRenderedRateItems;
12226
- renderedRateItems: Array<RenderedRatingItem>;
12227
- private correctValue;
12228
- getType(): string;
12229
- protected getFirstInputElementId(): string;
12230
- getInputId(index: number): string;
12231
- supportGoNextPageAutomatic(): boolean;
12232
- supportOther(): boolean;
12233
- /**
12234
- * Specifies a description for the minimum (first) rate value.
12235
- * @see rateValues
12236
- * @see rateMin
12237
- * @see displayRateDescriptionsAsExtremeItems
12238
- */
12239
- get minRateDescription(): string;
12240
- set minRateDescription(val: string);
12241
- get locMinRateDescription(): LocalizableString;
12242
- /**
12243
- * Specifies a description for the maximum (last) rate value.
12244
- * @see rateValues
12245
- * @see rateMax
12246
- * @see displayRateDescriptionsAsExtremeItems
12247
- */
12248
- get maxRateDescription(): string;
12249
- set maxRateDescription(val: string);
12250
- get locMaxRateDescription(): LocalizableString;
12251
- hasMinRateDescription: boolean;
12252
- hasMaxRateDescription: boolean;
12253
- get hasMinLabel(): boolean;
12254
- get hasMaxLabel(): boolean;
12255
- /**
12256
- * Specifies whether to display `minRateDescription` and `maxRateDescription` values as captions for buttons that correspond to the extreme (first and last) rate values.
12257
- *
12258
- * Default value: `false`
12259
- *
12260
- * If this property is disabled, the `minRateDescription` and `maxRateDescription` values are displayed as plain non-clickable texts.
12261
- *
12262
- * If any of the `minRateDescription` and `maxRateDescription` properties is empty, the corresponding rate value's `value` or `text` is displayed as a button caption.
12263
- * @see minRateDescription
12264
- * @see maxRateDescription
12265
- * @see rateMin
12266
- * @see rateMax
12267
- * @see rateValues
12268
- */
12269
- displayRateDescriptionsAsExtremeItems: boolean;
12270
- /**
12271
- * Specifies whether to display rate values as buttons or items in a drop-down list.
12272
- *
12273
- * Possible values:
12274
- *
12275
- * - `"buttons"` - Displays rate values as buttons in a row.
12276
- * - `"dropdown"` - Displays rate values as items in a drop-down list.
12277
- * - `"auto"` (default) - Selects between the `"buttons"` and `"dropdown"` modes based on the available width. When the width is insufficient to display buttons, the question displays a dropdown.
12278
- *
12279
- * [View Demo](/form-library/examples/ui-adaptation-modes-for-rating-scale/ (linkStyle))
12280
- * @see rateType
12281
- */
12282
- displayMode: "dropdown" | "buttons" | "auto";
12283
- /**
12284
- * Specifies the visual representation of rate values.
12285
- *
12286
- * Possible values:
12287
- *
12288
- * - `"labels"` (default) - Displays rate values as buttons with labels.
12289
- * - `"stars"` - Displays rate values as stars.
12290
- * - `"smileys"` - Displays rate values as smiley faces.
12291
- *
12292
- * [View Demo](/form-library/examples/rating-scale/ (linkStyle))
12293
- * @see scaleColorMode
12294
- * @see rateColorMode
12295
- * @see displayMode
12296
- */
12297
- rateType: "labels" | "stars" | "smileys";
12298
- get rateDisplayMode(): "labels" | "stars" | "smileys";
12299
- set rateDisplayMode(val: "labels" | "stars" | "smileys");
12300
- /**
12301
- * Specifies how to colorize the smiley face rating scale. Applies only if [`rateType`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateType) is `"smileys"`.
12302
- *
12303
- * Possible values:
12304
- *
12305
- * - `"monochrome"` (default) - Displays emojis in monochrome.
12306
- * - `"colored"` - Displays emojis in color.
12307
- *
12308
- * [View Demo](/form-library/examples/rating-scale/ (linkStyle))
12309
- * @see rateColorMode
12310
- */
12311
- scaleColorMode: "monochrome" | "colored";
12312
- /**
12313
- * Specifies how to colorize the selected emoji. Applies only if [`rateType`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateType) is `"smileys"`.
12314
- *
12315
- * Possible values:
12316
- *
12317
- * - `"default"` - Displays the selected emoji in default survey color.
12318
- * - `"scale"` (default) - Inherits the color from the scale.
12319
- * @see scaleColorMode
12320
- */
12321
- rateColorMode: "default" | "scale";
12322
- get isStar(): boolean;
12323
- get isSmiley(): boolean;
12324
- get itemComponentName(): "sv-rating-item-star" | "sv-rating-item-smiley" | "sv-rating-item";
12325
- protected valueToData(val: any): any;
12326
- setValueFromClick(value: any): void;
12327
- onItemMouseIn(item: RenderedRatingItem): void;
12328
- onItemMouseOut(item: RenderedRatingItem): void;
12329
- get itemSmallMode(): boolean;
12330
- get ratingRootCss(): string;
12331
- get itemStarIcon(): string;
12332
- get itemStarIconAlt(): string;
12333
- getItemSmiley(item: ItemValue): string;
12334
- getItemSmileyIconName(item: ItemValue): string;
12335
- getItemClassByText(item: ItemValue, text: string): string;
12336
- private getRenderedItemColor;
12337
- getItemStyle(item: ItemValue, highlight?: "none" | "highlighted" | "unhighlighted"): {
12338
- borderColor: string;
12339
- fill: string;
12340
- backgroundColor: string;
12341
- };
12342
- getItemClass(item: ItemValue, highlight?: "none" | "highlighted" | "unhighlighted"): string;
12343
- getControlClass(): string;
12344
- get placeholder(): string;
12345
- set placeholder(val: string);
12346
- get locPlaceholder(): LocalizableString;
12347
- get allowClear(): boolean;
12348
- get searchEnabled(): boolean;
12349
- get renderedValue(): any;
12350
- set renderedValue(val: any);
12351
- isItemSelected(item: ItemValue): boolean;
12352
- get visibleChoices(): ItemValue[];
12353
- get readOnlyText(): any;
12354
- needResponsiveWidth(): boolean;
12355
- protected supportResponsiveness(): boolean;
12356
- protected getCompactRenderAs(): string;
12357
- protected getDesktopRenderAs(): string;
12358
- get ariaExpanded(): string;
12359
- private dropdownListModelValue;
12360
- set dropdownListModel(val: DropdownListModel);
12361
- get dropdownListModel(): DropdownListModel;
12362
- protected updateCssClasses(res: any, css: any): void;
12363
- protected calcCssClasses(css: any): any;
12364
- dispose(): void;
12365
- }
12366
- }
12367
- declare module "itemvalue" {
12368
- import { ILocalizableOwner, LocalizableString } from "localizablestring";
12369
- import { ConditionRunner } from "conditions";
12370
- import { IShortcutText, ISurvey } from "base-interfaces";
12371
- import { BaseAction } from "actions/action";
12372
- /**
12373
- * Array of ItemValue is used in checkox, dropdown and radiogroup choices, matrix columns and rows.
12374
- * It has two main properties: value and text. If text is empty, value is used for displaying.
12375
- * The text property is localizable and support markdown.
12376
- */
12377
- export class ItemValue extends BaseAction implements ILocalizableOwner, IShortcutText {
12378
- protected typeName: string;
12379
- [index: string]: any;
12380
- getMarkdownHtml(text: string, name: string): string;
12381
- getRenderer(name: string): string;
12382
- getRendererContext(locStr: LocalizableString): any;
12383
- getProcessedText(text: string): string;
12384
- static get Separator(): string;
12385
- static set Separator(val: string);
12386
- /**
12387
- * Resets the input array and fills it with values from the values array
12388
- */
12389
- static setData(items: Array<ItemValue>, values: Array<any>, type?: string): void;
12390
- static getData(items: Array<ItemValue>): any;
12391
- static getItemByValue(items: Array<ItemValue>, val: any): ItemValue;
12392
- static getTextOrHtmlByValue(items: Array<ItemValue>, val: any): string;
12393
- static locStrsChanged(items: Array<ItemValue>): void;
12394
- static runConditionsForItems(items: Array<ItemValue>, filteredItems: Array<ItemValue>, runner: ConditionRunner, values: any, properties: any, useItemExpression?: boolean, onItemCallBack?: (item: ItemValue, val: boolean) => boolean): boolean;
12395
- static runEnabledConditionsForItems(items: Array<ItemValue>, runner: ConditionRunner, values: any, properties: any, onItemCallBack?: (item: ItemValue, val: boolean) => boolean): boolean;
12396
- private static runConditionsForItemsCore;
12397
- ownerPropertyName: string;
12398
- private _visible;
12399
- private locTextValue;
12400
- private visibleConditionRunner;
12401
- private enableConditionRunner;
12402
- constructor(value: any, text?: string, typeName?: string);
12403
- onCreating(): any;
11988
+ static setData(items: Array<ItemValue>, values: Array<any>, type?: string): void;
11989
+ static getData(items: Array<ItemValue>): any;
11990
+ static getItemByValue(items: Array<ItemValue>, val: any): ItemValue;
11991
+ static getTextOrHtmlByValue(items: Array<ItemValue>, val: any): string;
11992
+ static locStrsChanged(items: Array<ItemValue>): void;
11993
+ static runConditionsForItems(items: Array<ItemValue>, filteredItems: Array<ItemValue>, runner: ConditionRunner, values: any, properties: any, useItemExpression?: boolean, onItemCallBack?: (item: ItemValue, val: boolean) => boolean): boolean;
11994
+ static runEnabledConditionsForItems(items: Array<ItemValue>, runner: ConditionRunner, values: any, properties: any, onItemCallBack?: (item: ItemValue, val: boolean) => boolean): boolean;
11995
+ private static runConditionsForItemsCore;
11996
+ ownerPropertyName: string;
11997
+ private _visible;
11998
+ private locTextValue;
11999
+ private visibleConditionRunner;
12000
+ private enableConditionRunner;
12001
+ constructor(value: any, text?: string, typeName?: string);
12002
+ onCreating(): any;
12404
12003
  getType(): string;
12405
12004
  getSurvey(live?: boolean): ISurvey;
12406
12005
  getLocale(): string;
@@ -12933,32 +12532,244 @@ declare module "question_matrixdropdown" {
12933
12532
  constructor(name: string);
12934
12533
  getType(): string;
12935
12534
  /**
12936
- * A title for the total row. Applies if at least one column displays total values.
12937
- * @see rowTitleWidth
12938
- * @see columns
12535
+ * A title for the total row. Applies if at least one column displays total values.
12536
+ * @see rowTitleWidth
12537
+ * @see columns
12538
+ */
12539
+ get totalText(): string;
12540
+ set totalText(val: string);
12541
+ get locTotalText(): LocalizableString;
12542
+ getFooterText(): LocalizableString;
12543
+ getRowTitleWidth(): string;
12544
+ /**
12545
+ * Specifies whether to hide the question when the matrix has no visible rows.
12546
+ * @see rowsVisibleIf
12547
+ */
12548
+ get hideIfRowsEmpty(): boolean;
12549
+ set hideIfRowsEmpty(val: boolean);
12550
+ protected getDisplayValueCore(keysAsText: boolean, value: any): any;
12551
+ protected getConditionObjectRowName(index: number): string;
12552
+ protected getConditionObjectRowText(index: number): string;
12553
+ protected getConditionObjectsRowIndeces(): Array<number>;
12554
+ protected setNewValue(newValue: any): void;
12555
+ clearIncorrectValues(): void;
12556
+ protected clearValueIfInvisibleCore(): void;
12557
+ protected generateRows(): Array<MatrixDropdownRowModel>;
12558
+ protected createMatrixRow(item: ItemValue, value: any): MatrixDropdownRowModel;
12559
+ protected getSearchableItemValueKeys(keys: Array<string>): void;
12560
+ protected updateProgressInfoByValues(res: IProgressInfo): void;
12561
+ }
12562
+ }
12563
+ declare module "dropdownListModel" {
12564
+ import { IAction } from "actions/action";
12565
+ import { Base } from "base";
12566
+ import { ItemValue } from "itemvalue";
12567
+ import { ListModel } from "list";
12568
+ import { PopupModel } from "popup";
12569
+ import { Question } from "question";
12570
+ export class DropdownListModel extends Base {
12571
+ protected question: Question;
12572
+ protected onSelectionChanged?: (item: IAction, ...params: any[]) => void;
12573
+ readonly minPageSize = 25;
12574
+ readonly loadingItemHeight = 40;
12575
+ private _markdownMode;
12576
+ private _popupModel;
12577
+ private get focusFirstInputSelector();
12578
+ protected readonly selectedItemSelector = ".sv-list__item--selected";
12579
+ protected readonly itemSelector = ".sv-list__item";
12580
+ protected getFocusFirstInputSelector(): string;
12581
+ private itemsSettings;
12582
+ private isRunningLoadQuestionChoices;
12583
+ protected listModel: ListModel<ItemValue>;
12584
+ protected popupCssClasses: string;
12585
+ protected listModelFilterStringChanged: (newValue: string) => void;
12586
+ private resetItemsSettings;
12587
+ private setItems;
12588
+ private updateQuestionChoices;
12589
+ private updatePopupFocusFirstInputSelector;
12590
+ protected createPopup(): void;
12591
+ private setFilterStringToListModel;
12592
+ protected popupRecalculatePosition(isResetHeight: boolean): void;
12593
+ protected onHidePopup(): void;
12594
+ protected getAvailableItems(): Array<ItemValue>;
12595
+ protected createListModel(): ListModel<ItemValue>;
12596
+ protected updateAfterListModelCreated(model: ListModel<ItemValue>): void;
12597
+ updateCssClasses(popupCssClass: string, listCssClasses: any): void;
12598
+ protected resetFilterString(): void;
12599
+ clear(): void;
12600
+ protected onSetFilterString(): void;
12601
+ searchEnabled: boolean;
12602
+ filterString: string;
12603
+ inputString: string;
12604
+ showSelectedItemLocText: boolean;
12605
+ showInputFieldComponent: boolean;
12606
+ ariaActivedescendant: string;
12607
+ private applyInputString;
12608
+ protected fixInputCase(): void;
12609
+ protected applyHintString(item: ItemValue): void;
12610
+ get inputStringRendered(): string;
12611
+ set inputStringRendered(val: string);
12612
+ get placeholderRendered(): any;
12613
+ get listElementId(): string;
12614
+ hasScroll: boolean;
12615
+ hintString: string;
12616
+ private get hintStringLC();
12617
+ private get inputStringLC();
12618
+ get showHintPrefix(): boolean;
12619
+ get hintStringPrefix(): string;
12620
+ get showHintString(): boolean;
12621
+ get hintStringSuffix(): string;
12622
+ get hintStringMiddle(): string;
12623
+ constructor(question: Question, onSelectionChanged?: (item: IAction, ...params: any[]) => void);
12624
+ get popupModel(): PopupModel;
12625
+ get inputReadOnly(): boolean;
12626
+ get filterStringEnabled(): boolean;
12627
+ get inputMode(): "none" | "text";
12628
+ setSearchEnabled(newValue: boolean): void;
12629
+ updateItems(): void;
12630
+ onClick(event: any): void;
12631
+ protected focusItemOnClickAndPopup(): void;
12632
+ onClear(event: any): void;
12633
+ getSelectedAction(): ItemValue;
12634
+ changeSelectionWithKeyboard(reverse: boolean): void;
12635
+ protected beforeScrollToFocusedItem(focusedItem: ItemValue): void;
12636
+ protected afterScrollToFocusedItem(): void;
12637
+ keyHandler(event: any): void;
12638
+ protected onEscape(): void;
12639
+ onScroll(event: Event): void;
12640
+ onBlur(event: any): void;
12641
+ onFocus(event: any): void;
12642
+ setInputStringFromSelectedItem(newValue: any): void;
12643
+ dispose(): void;
12644
+ scrollToFocusedItem(): void;
12645
+ }
12646
+ }
12647
+ declare module "question_dropdown" {
12648
+ import { QuestionSelectBase } from "question_baseselect";
12649
+ import { LocalizableString } from "localizablestring";
12650
+ import { ItemValue } from "itemvalue";
12651
+ import { PopupModel } from "popup";
12652
+ import { EventBase } from "base";
12653
+ import { DropdownListModel } from "dropdownListModel";
12654
+ /**
12655
+ * A class that describes the Dropdown question type.
12656
+ *
12657
+ * [View Demo](https://surveyjs.io/form-library/examples/questiontype-dropdown/ (linkStyle))
12658
+ */
12659
+ export class QuestionDropdownModel extends QuestionSelectBase {
12660
+ dropdownListModelValue: DropdownListModel;
12661
+ lastSelectedItemValue: ItemValue;
12662
+ updateReadOnlyText(): void;
12663
+ constructor(name: string);
12664
+ locStrsChanged(): void;
12665
+ get showOptionsCaption(): boolean;
12666
+ set showOptionsCaption(val: boolean);
12667
+ get optionsCaption(): string;
12668
+ set optionsCaption(val: string);
12669
+ /**
12670
+ * A placeholder for the input field.
12671
+ */
12672
+ get placeholder(): string;
12673
+ set placeholder(val: string);
12674
+ get locPlaceholder(): LocalizableString;
12675
+ get clearCaption(): string;
12676
+ set clearCaption(value: string);
12677
+ get locClearCaption(): LocalizableString;
12678
+ getType(): string;
12679
+ get ariaRole(): string;
12680
+ get selectedItem(): ItemValue;
12681
+ protected onGetSingleSelectedItem(selectedItemByValue: ItemValue): void;
12682
+ supportGoNextPageAutomatic(): boolean;
12683
+ private minMaxChoices;
12684
+ protected getChoices(): Array<ItemValue>;
12685
+ /**
12686
+ * Use the `choicesMin`, `choicesMax`, and `choicesStep` properties to generate choice items automatically. For example, the configuration below generates three choice items: [10, 20, 30].
12687
+ *
12688
+ * ```js
12689
+ * "choicesMin": 10,
12690
+ * "choicesMax": 30
12691
+ * "choicesStep": 10
12692
+ * ```
12693
+ * @see choicesMax
12694
+ * @see choicesStep
12695
+ */
12696
+ get choicesMin(): number;
12697
+ set choicesMin(val: number);
12698
+ /**
12699
+ * Use the `choicesMin`, `choicesMax`, and `choicesStep` properties to generate choice items automatically. For example, the configuration below generates three choice items: [10, 20, 30].
12700
+ *
12701
+ * ```js
12702
+ * "choicesMin": 10,
12703
+ * "choicesMax": 30
12704
+ * "choicesStep": 10
12705
+ * ```
12706
+ * @see choicesMin
12707
+ * @see choicesStep
12708
+ */
12709
+ get choicesMax(): number;
12710
+ set choicesMax(val: number);
12711
+ /**
12712
+ * Use the `choicesMin`, `choicesMax`, and `choicesStep` properties to generate choice items automatically. For example, the configuration below generates three choice items: [10, 20, 30].
12713
+ *
12714
+ * ```js
12715
+ * "choicesMin": 10,
12716
+ * "choicesMax": 30
12717
+ * "choicesStep": 10
12718
+ * ```
12719
+ *
12720
+ * The default value of the `choicesStep` property is 1.
12721
+ * @see choicesMin
12722
+ * @see choicesMax
12723
+ */
12724
+ get choicesStep(): number;
12725
+ set choicesStep(val: number);
12726
+ get autocomplete(): string;
12727
+ set autocomplete(val: string);
12728
+ /**
12729
+ * Specifies whether to display a button that clears the selected value.
12939
12730
  */
12940
- get totalText(): string;
12941
- set totalText(val: string);
12942
- get locTotalText(): LocalizableString;
12943
- getFooterText(): LocalizableString;
12944
- getRowTitleWidth(): string;
12731
+ allowClear: boolean;
12945
12732
  /**
12946
- * Specifies whether to hide the question when the matrix has no visible rows.
12947
- * @see rowsVisibleIf
12733
+ * Specifies whether users can enter a value into the input field to filter the drop-down list.
12948
12734
  */
12949
- get hideIfRowsEmpty(): boolean;
12950
- set hideIfRowsEmpty(val: boolean);
12951
- protected getDisplayValueCore(keysAsText: boolean, value: any): any;
12952
- protected getConditionObjectRowName(index: number): string;
12953
- protected getConditionObjectRowText(index: number): string;
12954
- protected getConditionObjectsRowIndeces(): Array<number>;
12955
- protected setNewValue(newValue: any): void;
12956
- clearIncorrectValues(): void;
12957
- protected clearValueIfInvisibleCore(): void;
12958
- protected generateRows(): Array<MatrixDropdownRowModel>;
12959
- protected createMatrixRow(item: ItemValue, value: any): MatrixDropdownRowModel;
12960
- protected getSearchableItemValueKeys(keys: Array<string>): void;
12961
- protected updateProgressInfoByValues(res: IProgressInfo): void;
12735
+ searchEnabled: boolean;
12736
+ inputHasValue: boolean;
12737
+ readOnlyText: string;
12738
+ /**
12739
+ * Enables lazy loading. If you set this property to `true`, you should implement the Survey's [`onChoicesLazyLoad`](https://surveyjs.io/form-library/documentation/surveymodel#onChoicesLazyLoad) event handler.
12740
+ * @see choicesLazyLoadPageSize
12741
+ * @see SurveyModel.onChoicesLazyLoad
12742
+ */
12743
+ choicesLazyLoadEnabled: boolean;
12744
+ /**
12745
+ * Specifies the number of choice items to load at a time when choices are loaded on demand.
12746
+ * @see choicesLazyLoadEnabled
12747
+ * @see SurveyModel.onChoicesLazyLoad
12748
+ */
12749
+ choicesLazyLoadPageSize: number;
12750
+ getControlClass(): string;
12751
+ suggestedItem: ItemValue;
12752
+ get selectedItemLocText(): LocalizableString;
12753
+ get inputFieldComponentName(): string;
12754
+ get showSelectedItemLocText(): boolean;
12755
+ get showInputFieldComponent(): boolean;
12756
+ private get selectedItemText();
12757
+ get dropdownListModel(): DropdownListModel;
12758
+ set dropdownListModel(val: DropdownListModel);
12759
+ get popupModel(): PopupModel;
12760
+ get ariaExpanded(): string;
12761
+ onOpened: EventBase<QuestionDropdownModel>;
12762
+ onOpenedCallBack(): void;
12763
+ protected onSelectedItemValuesChangedHandler(newValue: any): void;
12764
+ protected hasUnknownValue(val: any, includeOther: boolean, isFilteredChoices: boolean, checkEmptyValue: boolean): boolean;
12765
+ protected needConvertRenderedOtherToDataValue(): boolean;
12766
+ protected onVisibleChoicesChanged(): void;
12767
+ protected getFirstInputElementId(): string;
12768
+ getInputId(): string;
12769
+ clearValue(): void;
12770
+ onClick(e: any): void;
12771
+ onKeyUp(event: any): void;
12772
+ dispose(): void;
12962
12773
  }
12963
12774
  }
12964
12775
  declare module "question_matrix" {
@@ -13441,7 +13252,8 @@ declare module "question_imagepicker" {
13441
13252
  import { ILocalizableOwner, LocalizableString } from "localizablestring";
13442
13253
  export class ImageItemValue extends ItemValue implements ILocalizableOwner {
13443
13254
  protected typeName: string;
13444
- contentNotLoaded: boolean;
13255
+ private videoNotLoaded;
13256
+ private imageNotLoaded;
13445
13257
  constructor(value: any, text?: string, typeName?: string);
13446
13258
  getType(): string;
13447
13259
  /**
@@ -13457,6 +13269,8 @@ declare module "question_imagepicker" {
13457
13269
  getRendererContext(locStr: LocalizableString): any;
13458
13270
  getProcessedText(text: string): string;
13459
13271
  onErrorHandler(): void;
13272
+ set contentNotLoaded(val: boolean);
13273
+ get contentNotLoaded(): boolean;
13460
13274
  }
13461
13275
  /**
13462
13276
  * A class that describes the Image Picker question type.
@@ -13577,12 +13391,12 @@ declare module "dragdrop/choices" {
13577
13391
  protected getDropTargetByDataAttributeValue(dataAttributeValue: string): ItemValue;
13578
13392
  private getVisibleChoices;
13579
13393
  protected doDragOver: () => any;
13580
- protected isDropTargetValid(dropTarget: ItemValue): boolean;
13394
+ protected isDropTargetValid(dropTarget: ItemValue, dropTargetNode?: HTMLElement): boolean;
13581
13395
  protected doBanDropHere: () => any;
13582
13396
  protected calculateIsBottom(clientY: number): boolean;
13583
13397
  protected afterDragOver(dropTargetNode: HTMLElement): void;
13584
13398
  protected doDrop(): any;
13585
- protected doClear(): void;
13399
+ clear(): void;
13586
13400
  private updateVisibleChoices;
13587
13401
  }
13588
13402
  }
@@ -13605,7 +13419,7 @@ declare module "dragdrop/ranking-choices" {
13605
13419
  protected ghostPositionChanged(): void;
13606
13420
  protected doBanDropHere: () => any;
13607
13421
  protected doDrop: () => any;
13608
- protected doClear: () => void;
13422
+ clear(): void;
13609
13423
  }
13610
13424
  }
13611
13425
  declare module "question_ranking" {
@@ -13683,103 +13497,363 @@ declare module "question_comment" {
13683
13497
  /**
13684
13498
  * Specifies the visible height of the comment area, measured in lines.
13685
13499
  *
13686
- * The value of this property is passed on to the `rows` attribute of the underlying `<textarea>` element.
13687
- * @see cols
13500
+ * The value of this property is passed on to the `rows` attribute of the underlying `<textarea>` element.
13501
+ */
13502
+ get rows(): number;
13503
+ set rows(val: number);
13504
+ get cols(): number;
13505
+ set cols(val: number);
13506
+ /**
13507
+ * Specifies whether the question allows line breaks.
13508
+ *
13509
+ * When this property is enabled, a user can press Enter to insert line breaks. They are saved as `\n` in survey results. The Comment question also recognizes and interprets the `\n` sequence as a line break when you set the question `value` in code.
13510
+ */
13511
+ get acceptCarriageReturn(): boolean;
13512
+ set acceptCarriageReturn(val: boolean);
13513
+ /**
13514
+ * Specifies whether the comment area automatically increases its height to accomodate multi-line content.
13515
+ *
13516
+ * Default value: `false` (inherited from `SurveyModel`'s [`autoGrowComment`](https://surveyjs.io/form-library/documentation/surveymodel#autoGrowComment) property)
13517
+ * @see allowResize
13518
+ */
13519
+ get autoGrow(): boolean;
13520
+ set autoGrow(val: boolean);
13521
+ /**
13522
+ * Specifies whether to display a resize handle for the comment area.
13523
+ *
13524
+ * Default value: `true` (inherited from `SurveyModel`'s [`allowResizeComment`](https://surveyjs.io/form-library/documentation/surveymodel#allowResizeComment) property)
13525
+ * @see autoGrow
13526
+ */
13527
+ get allowResize(): boolean;
13528
+ set allowResize(val: boolean);
13529
+ get resizeStyle(): "none" | "both";
13530
+ getType(): string;
13531
+ afterRenderQuestionElement(el: HTMLElement): void;
13532
+ updateElement(): void;
13533
+ beforeDestroyQuestionElement(el: HTMLElement): void;
13534
+ onInput(event: any): void;
13535
+ onKeyDown(event: any): void;
13536
+ onValueChanged(): void;
13537
+ protected setNewValue(newValue: string): any;
13538
+ get className(): string;
13539
+ }
13540
+ }
13541
+ declare module "question_html" {
13542
+ import { QuestionNonValue } from "questionnonvalue";
13543
+ import { LocalizableString } from "localizablestring";
13544
+ /**
13545
+ * A class that describes the Html question type. Unlike other question types, Html cannot have a title or value.
13546
+ *
13547
+ * [View Demo](https://surveyjs.io/form-library/examples/questiontype-html/ (linkStyle))
13548
+ */
13549
+ export class QuestionHtmlModel extends QuestionNonValue {
13550
+ ignoreHtmlProgressing: boolean;
13551
+ constructor(name: string);
13552
+ getType(): string;
13553
+ get isCompositeQuestion(): boolean;
13554
+ getProcessedText(text: string): string;
13555
+ /**
13556
+ * HTML markup to display.
13557
+ *
13558
+ * > IMPORTANT: If you get the markup from a third party, ensure that it does not contain malicious code.
13559
+ */
13560
+ get html(): string;
13561
+ set html(val: string);
13562
+ get locHtml(): LocalizableString;
13563
+ get processedHtml(): string;
13564
+ private processHtml;
13565
+ }
13566
+ }
13567
+ declare module "question_radiogroup" {
13568
+ import { QuestionCheckboxBase } from "question_baseselect";
13569
+ import { ItemValue } from "itemvalue";
13570
+ import { Action } from "actions/action";
13571
+ /**
13572
+ * A class that describes the Radiogroup question type.
13573
+ *
13574
+ * [View Demo](https://surveyjs.io/form-library/examples/questiontype-radiogroup/ (linkStyle))
13575
+ */
13576
+ export class QuestionRadiogroupModel extends QuestionCheckboxBase {
13577
+ constructor(name: string);
13578
+ protected getDefaultItemComponent(): string;
13579
+ getType(): string;
13580
+ get ariaRole(): string;
13581
+ get titleAriaLabel(): string | null;
13582
+ protected getFirstInputElementId(): string;
13583
+ /**
13584
+ * Returns the selected choice item. If no item is selected, returns `null`.
13585
+ */
13586
+ get selectedItem(): ItemValue;
13587
+ /**
13588
+ * Specifies whether to display a button that clears the question value.
13589
+ *
13590
+ * Default value: `false`
13591
+ */
13592
+ get showClearButton(): boolean;
13593
+ set showClearButton(val: boolean);
13594
+ get canShowClearButton(): boolean;
13595
+ get clearButtonCaption(): string;
13596
+ supportGoNextPageAutomatic(): boolean;
13597
+ get showClearButtonInContent(): boolean;
13598
+ clickItemHandler(item: ItemValue): void;
13599
+ protected getDefaultTitleActions(): Array<Action>;
13600
+ }
13601
+ }
13602
+ declare module "question_rating" {
13603
+ import { ItemValue } from "itemvalue";
13604
+ import { Question } from "question";
13605
+ import { LocalizableString } from "localizablestring";
13606
+ import { Base } from "base";
13607
+ import { DropdownListModel } from "dropdownListModel";
13608
+ export class RenderedRatingItem extends Base {
13609
+ itemValue: ItemValue;
13610
+ private locString;
13611
+ private onStringChangedCallback;
13612
+ get value(): number;
13613
+ highlight: "none" | "highlighted" | "unhighlighted";
13614
+ get locText(): LocalizableString;
13615
+ text: string;
13616
+ style: any;
13617
+ constructor(itemValue: ItemValue, locString?: LocalizableString);
13618
+ }
13619
+ /**
13620
+ * A class that describes the Rating Scale question type.
13621
+ *
13622
+ * [View Demo](https://surveyjs.io/form-library/examples/rating-scale/ (linkStyle))
13623
+ */
13624
+ export class QuestionRatingModel extends Question {
13625
+ constructor(name: string);
13626
+ private jsonObj;
13627
+ private setIconsToRateValues;
13628
+ startLoadingFromJson(jsonObj: any): void;
13629
+ endLoadingFromJson(): void;
13630
+ private _syncPropertiesChanging;
13631
+ private registerSychProperties;
13632
+ private useRateValues;
13633
+ private updateRateMax;
13634
+ private updateRateMin;
13635
+ private updateRateCount;
13636
+ initPropertyDependencies(): void;
13637
+ autoGenerate: boolean;
13638
+ /**
13639
+ * A list of rate values.
13640
+ *
13641
+ * This property accepts an array of objects with the following structure:
13642
+ *
13643
+ * ```js
13644
+ * {
13645
+ * "value": any, // A value to be saved in survey results
13646
+ * "text": String, // A display text. This property supports Markdown. When `text` is undefined, `value` is used.
13647
+ * "customProperty": any // Any property that you find useful.
13648
+ * }
13649
+ * ```
13650
+ *
13651
+ * If you add custom properties, refer to the following help topic to learn how to serialize them into JSON: [Add Custom Properties to Property Grid](https://surveyjs.io/survey-creator/documentation/property-grid#add-custom-properties-to-the-property-grid).
13652
+ *
13653
+ * To enable Markdown support for the `text` 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/).
13654
+ *
13655
+ * If you need to specify only the `value` property, you can set the `rateValues` property to an array of numbers, for example, `[ 3, 6, 10 ]`. These values are both saved in survey results and used as display text.
13656
+ *
13657
+ * If you do not specify the `rateValues` property, rate values are generated automatically based upon the [`rateMin`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateMin), [`rateMax`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateMax), [`rateStep`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateStep), and [`rateCount`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateCount) property values.
13658
+ *
13659
+ * [View Demo](/form-library/examples/rating-scale/ (linkStyle))
13660
+ */
13661
+ get rateValues(): Array<any>;
13662
+ set rateValues(val: Array<any>);
13663
+ /**
13664
+ * Specifies the first rate value in the generated sequence of rate values. Applies if the [`rateValues`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateValues) array is empty.
13665
+ *
13666
+ * Default value: 1
13667
+ *
13668
+ * [View Demo](/form-library/examples/rating-scale/ (linkStyle))
13669
+ * @see rateMax
13670
+ * @see rateStep
13671
+ * @see rateCount
13672
+ */
13673
+ get rateMin(): number;
13674
+ set rateMin(val: number);
13675
+ /**
13676
+ * Specifies the last rate value in the generated sequence of rate values. Applies if the [`rateValues`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateValues) array is empty.
13677
+ *
13678
+ * Default value: 5
13679
+ *
13680
+ * [View Demo](/form-library/examples/rating-scale/ (linkStyle))
13681
+ * @see rateMin
13682
+ * @see rateStep
13683
+ * @see rateCount
13684
+ */
13685
+ get rateMax(): number;
13686
+ set rateMax(val: number);
13687
+ /**
13688
+ * Specifies a step with which to generate rate values. Applies if the [`rateValues`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateValues) array is empty.
13689
+ *
13690
+ * Default value: 1
13691
+ *
13692
+ * [View Demo](/form-library/examples/rating-scale/ (linkStyle))
13693
+ * @see rateMin
13694
+ * @see rateMax
13695
+ * @see rateCount
13688
13696
  */
13689
- get rows(): number;
13690
- set rows(val: number);
13697
+ get rateStep(): number;
13698
+ set rateStep(val: number);
13691
13699
  /**
13692
- * Specifies the visible width of the comment area, measured in average character width.
13700
+ * Specifies the number of rate values you want to generate. Applies if the [`rateValues`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateValues) array is empty.
13693
13701
  *
13694
- * The value of this property is passed on to the `cols` attribute of the underlying `<textarea>` element.
13695
- * @see rows
13702
+ * Set the [`rateMin`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateMin) or [`rateMax`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateMax) property to specify the first or the last rate value. Use the [`rateStep`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateStep) property to specify a step with which to generate rate values.
13703
+ *
13704
+ * [View Demo](/form-library/examples/rating-scale/ (linkStyle))
13696
13705
  */
13697
- get cols(): number;
13698
- set cols(val: number);
13706
+ rateCount: number;
13707
+ private static badColor;
13708
+ private static normalColor;
13709
+ private static goodColor;
13710
+ private static badColorLight;
13711
+ private static normalColorLight;
13712
+ private static goodColorLight;
13713
+ private initColors;
13714
+ protected getDisplayValueCore(keysAsText: boolean, value: any): any;
13715
+ get visibleRateValues(): ItemValue[];
13716
+ itemValuePropertyChanged(item: ItemValue, name: string, oldValue: any, newValue: any): void;
13717
+ private createRenderedRateItems;
13718
+ renderedRateItems: Array<RenderedRatingItem>;
13719
+ private correctValue;
13720
+ getType(): string;
13721
+ protected getFirstInputElementId(): string;
13722
+ getInputId(index: number): string;
13723
+ supportGoNextPageAutomatic(): boolean;
13724
+ supportOther(): boolean;
13699
13725
  /**
13700
- * Specifies whether the question allows line breaks.
13701
- *
13702
- * When this property is enabled, a user can press Enter to insert line breaks. They are saved as `\n` in survey results. The Comment question also recognizes and interprets the `\n` sequence as a line break when you set the question `value` in code.
13726
+ * Specifies a description for the minimum (first) rate value.
13727
+ * @see rateValues
13728
+ * @see rateMin
13729
+ * @see displayRateDescriptionsAsExtremeItems
13703
13730
  */
13704
- get acceptCarriageReturn(): boolean;
13705
- set acceptCarriageReturn(val: boolean);
13731
+ get minRateDescription(): string;
13732
+ set minRateDescription(val: string);
13733
+ get locMinRateDescription(): LocalizableString;
13706
13734
  /**
13707
- * Specifies whether the comment area automatically increases its height to accomodate multi-line content.
13708
- *
13709
- * Default value: `false` (inherited from `SurveyModel`'s [`autoGrowComment`](https://surveyjs.io/form-library/documentation/surveymodel#autoGrowComment) property)
13735
+ * Specifies a description for the maximum (last) rate value.
13736
+ * @see rateValues
13737
+ * @see rateMax
13738
+ * @see displayRateDescriptionsAsExtremeItems
13710
13739
  */
13711
- get autoGrow(): boolean;
13712
- set autoGrow(val: boolean);
13713
- getType(): string;
13714
- afterRenderQuestionElement(el: HTMLElement): void;
13715
- updateElement(): void;
13716
- beforeDestroyQuestionElement(el: HTMLElement): void;
13717
- onInput(event: any): void;
13718
- onKeyDown(event: any): void;
13719
- onValueChanged(): void;
13720
- protected setNewValue(newValue: string): any;
13721
- get className(): string;
13722
- }
13723
- }
13724
- declare module "question_html" {
13725
- import { QuestionNonValue } from "questionnonvalue";
13726
- import { LocalizableString } from "localizablestring";
13727
- /**
13728
- * A class that describes the Html question type. Unlike other question types, Html cannot have a title or value.
13729
- *
13730
- * [View Demo](https://surveyjs.io/form-library/examples/questiontype-html/ (linkStyle))
13731
- */
13732
- export class QuestionHtmlModel extends QuestionNonValue {
13733
- ignoreHtmlProgressing: boolean;
13734
- constructor(name: string);
13735
- getType(): string;
13736
- get isCompositeQuestion(): boolean;
13737
- getProcessedText(text: string): string;
13740
+ get maxRateDescription(): string;
13741
+ set maxRateDescription(val: string);
13742
+ get locMaxRateDescription(): LocalizableString;
13743
+ hasMinRateDescription: boolean;
13744
+ hasMaxRateDescription: boolean;
13745
+ get hasMinLabel(): boolean;
13746
+ get hasMaxLabel(): boolean;
13738
13747
  /**
13739
- * HTML markup to display.
13748
+ * Specifies whether to display `minRateDescription` and `maxRateDescription` values as captions for buttons that correspond to the extreme (first and last) rate values.
13749
+ *
13750
+ * Default value: `false`
13751
+ *
13752
+ * If this property is disabled, the `minRateDescription` and `maxRateDescription` values are displayed as plain non-clickable texts.
13753
+ *
13754
+ * If any of the `minRateDescription` and `maxRateDescription` properties is empty, the corresponding rate value's `value` or `text` is displayed as a button caption.
13755
+ * @see minRateDescription
13756
+ * @see maxRateDescription
13757
+ * @see rateMin
13758
+ * @see rateMax
13759
+ * @see rateValues
13760
+ */
13761
+ displayRateDescriptionsAsExtremeItems: boolean;
13762
+ /**
13763
+ * Specifies whether to display rate values as buttons or items in a drop-down list.
13764
+ *
13765
+ * Possible values:
13766
+ *
13767
+ * - `"buttons"` - Displays rate values as buttons in a row.
13768
+ * - `"dropdown"` - Displays rate values as items in a drop-down list.
13769
+ * - `"auto"` (default) - Selects between the `"buttons"` and `"dropdown"` modes based on the available width. When the width is insufficient to display buttons, the question displays a dropdown.
13770
+ *
13771
+ * [View Demo](/form-library/examples/ui-adaptation-modes-for-rating-scale/ (linkStyle))
13772
+ * @see rateType
13773
+ */
13774
+ displayMode: "dropdown" | "buttons" | "auto";
13775
+ /**
13776
+ * Specifies the visual representation of rate values.
13740
13777
  *
13741
- * > IMPORTANT: If you get the markup from a third party, ensure that it does not contain malicious code.
13778
+ * Possible values:
13779
+ *
13780
+ * - `"labels"` (default) - Displays rate values as buttons with labels.
13781
+ * - `"stars"` - Displays rate values as stars.
13782
+ * - `"smileys"` - Displays rate values as smiley faces.
13783
+ *
13784
+ * [View Demo](/form-library/examples/rating-scale/ (linkStyle))
13785
+ * @see scaleColorMode
13786
+ * @see rateColorMode
13787
+ * @see displayMode
13742
13788
  */
13743
- get html(): string;
13744
- set html(val: string);
13745
- get locHtml(): LocalizableString;
13746
- get processedHtml(): string;
13747
- private processHtml;
13748
- }
13749
- }
13750
- declare module "question_radiogroup" {
13751
- import { QuestionCheckboxBase } from "question_baseselect";
13752
- import { ItemValue } from "itemvalue";
13753
- import { Action } from "actions/action";
13754
- /**
13755
- * A class that describes the Radiogroup question type.
13756
- *
13757
- * [View Demo](https://surveyjs.io/form-library/examples/questiontype-radiogroup/ (linkStyle))
13758
- */
13759
- export class QuestionRadiogroupModel extends QuestionCheckboxBase {
13760
- constructor(name: string);
13761
- protected getDefaultItemComponent(): string;
13762
- getType(): string;
13763
- get ariaRole(): string;
13764
- get titleAriaLabel(): string | null;
13765
- protected getFirstInputElementId(): string;
13789
+ rateType: "labels" | "stars" | "smileys";
13790
+ get rateDisplayMode(): "labels" | "stars" | "smileys";
13791
+ set rateDisplayMode(val: "labels" | "stars" | "smileys");
13766
13792
  /**
13767
- * Returns the selected choice item. If no item is selected, returns `null`.
13793
+ * Specifies how to colorize the smiley face rating scale. Applies only if [`rateType`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateType) is `"smileys"`.
13794
+ *
13795
+ * Possible values:
13796
+ *
13797
+ * - `"monochrome"` (default) - Displays emojis in monochrome.
13798
+ * - `"colored"` - Displays emojis in color.
13799
+ *
13800
+ * [View Demo](/form-library/examples/rating-scale/ (linkStyle))
13801
+ * @see rateColorMode
13768
13802
  */
13769
- get selectedItem(): ItemValue;
13803
+ scaleColorMode: "monochrome" | "colored";
13770
13804
  /**
13771
- * Specifies whether to display a button that clears the question value.
13805
+ * Specifies how to colorize the selected emoji. Applies only if [`rateType`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateType) is `"smileys"`.
13772
13806
  *
13773
- * Default value: `false`
13807
+ * Possible values:
13808
+ *
13809
+ * - `"default"` - Displays the selected emoji in default survey color.
13810
+ * - `"scale"` (default) - Inherits the color from the scale.
13811
+ * @see scaleColorMode
13774
13812
  */
13775
- get showClearButton(): boolean;
13776
- set showClearButton(val: boolean);
13777
- get canShowClearButton(): boolean;
13778
- get clearButtonCaption(): string;
13779
- supportGoNextPageAutomatic(): boolean;
13780
- get showClearButtonInContent(): boolean;
13781
- clickItemHandler(item: ItemValue): void;
13782
- protected getDefaultTitleActions(): Array<Action>;
13813
+ rateColorMode: "default" | "scale";
13814
+ get isStar(): boolean;
13815
+ get isSmiley(): boolean;
13816
+ get itemComponentName(): "sv-rating-item-star" | "sv-rating-item-smiley" | "sv-rating-item";
13817
+ protected valueToData(val: any): any;
13818
+ setValueFromClick(value: any): void;
13819
+ onItemMouseIn(item: RenderedRatingItem): void;
13820
+ onItemMouseOut(item: RenderedRatingItem): void;
13821
+ get itemSmallMode(): boolean;
13822
+ get ratingRootCss(): string;
13823
+ get itemStarIcon(): string;
13824
+ get itemStarIconAlt(): string;
13825
+ getItemSmiley(item: ItemValue): string;
13826
+ getItemSmileyIconName(item: ItemValue): string;
13827
+ getItemClassByText(item: ItemValue, text: string): string;
13828
+ private getRenderedItemColor;
13829
+ getItemStyle(item: ItemValue, highlight?: "none" | "highlighted" | "unhighlighted"): {
13830
+ borderColor: string;
13831
+ fill: string;
13832
+ backgroundColor: string;
13833
+ };
13834
+ getItemClass(item: ItemValue, highlight?: "none" | "highlighted" | "unhighlighted"): string;
13835
+ getControlClass(): string;
13836
+ get placeholder(): string;
13837
+ set placeholder(val: string);
13838
+ get locPlaceholder(): LocalizableString;
13839
+ get allowClear(): boolean;
13840
+ get searchEnabled(): boolean;
13841
+ get renderedValue(): any;
13842
+ set renderedValue(val: any);
13843
+ isItemSelected(item: ItemValue): boolean;
13844
+ get visibleChoices(): ItemValue[];
13845
+ get readOnlyText(): any;
13846
+ needResponsiveWidth(): boolean;
13847
+ protected supportResponsiveness(): boolean;
13848
+ protected getCompactRenderAs(): string;
13849
+ protected getDesktopRenderAs(): string;
13850
+ get ariaExpanded(): string;
13851
+ private dropdownListModelValue;
13852
+ set dropdownListModel(val: DropdownListModel);
13853
+ get dropdownListModel(): DropdownListModel;
13854
+ protected updateCssClasses(res: any, css: any): void;
13855
+ protected calcCssClasses(css: any): any;
13856
+ dispose(): void;
13783
13857
  }
13784
13858
  }
13785
13859
  declare module "question_boolean" {
@@ -14634,59 +14708,6 @@ declare module "question_buttongroup" {
14634
14708
  onChange(): void;
14635
14709
  }
14636
14710
  }
14637
- declare module "dragdrop/survey-elements" {
14638
- import { IElement, IShortcutText } from "base-interfaces";
14639
- import { JsonObject } from "jsonobject";
14640
- import { PageModel } from "page";
14641
- import { DragDropCore } from "dragdrop/core";
14642
- export class DragDropSurveyElements extends DragDropCore<any> {
14643
- static newGhostPage: PageModel;
14644
- static restrictDragQuestionBetweenPages: boolean;
14645
- static edgeHeight: number;
14646
- static nestedPanelDepth: number;
14647
- static ghostSurveyElementName: string;
14648
- protected isEdge: boolean;
14649
- protected prevIsEdge: any;
14650
- protected ghostSurveyElement: IElement;
14651
- protected get draggedElementType(): string;
14652
- protected isDraggedElementSelected: boolean;
14653
- private isRight;
14654
- protected prevIsRight: boolean;
14655
- startDragToolboxItem(event: PointerEvent, draggedElementJson: JsonObject, toolboxItemTitle: string): void;
14656
- startDragSurveyElement(event: PointerEvent, draggedElement: any, isElementSelected?: boolean): void;
14657
- protected getShortcutText(draggedElement: IShortcutText): string;
14658
- protected createDraggedElementShortcut(text: string, draggedElementNode?: HTMLElement, event?: PointerEvent): HTMLElement;
14659
- protected createDraggedElementIcon(): HTMLElement;
14660
- protected getDraggedElementClass(): string;
14661
- protected createElementFromJson(json: object): HTMLElement;
14662
- private createNewElement;
14663
- protected findDropTargetNodeByDragOverNode(dragOverNode: HTMLElement): HTMLElement;
14664
- protected getDropTargetByDataAttributeValue(dataAttributeValue: string, dropTargetNode: HTMLElement, event: PointerEvent): any;
14665
- protected isDropTargetValid(): boolean;
14666
- protected calculateIsBottom(clientY: number, dropTargetNode?: HTMLElement): boolean;
14667
- protected calculateIsRight(clientX: number, dropTargetNode?: HTMLElement): boolean;
14668
- protected isDropTargetDoesntChanged(newIsBottom: boolean): boolean;
14669
- private shouldRestricDragQuestionBetweenPages;
14670
- private getPanelDropTarget;
14671
- protected findDeepestDropTargetChild(parent: HTMLElement): HTMLElement;
14672
- private calculateIsEdge;
14673
- protected doDragOver(dropTargetNode?: HTMLElement, event?: PointerEvent): void;
14674
- protected afterDragOver(dropTargetNode: HTMLElement, event: PointerEvent): void;
14675
- protected onStartDrag(): void;
14676
- protected doBanDropHere: () => void;
14677
- protected doDrop: () => any;
14678
- protected doClear: () => void;
14679
- protected insertGhostElementIntoSurvey(): boolean;
14680
- private calcTargetRowMultiple;
14681
- private getTargetParent;
14682
- private getTargetRow;
14683
- private isDragOverInsideEmptyPanel;
14684
- protected removeGhostElementFromSurvey(): void;
14685
- private insertRealElementIntoSurvey;
14686
- private createFakeTargetElement;
14687
- private createGhostSurveyElement;
14688
- }
14689
- }
14690
14711
  declare module "entries/chunks/model" {
14691
14712
  export var Version: string;
14692
14713
  export function checkLibraryVersion(ver: string, libraryName: string): void;
@@ -14695,7 +14716,7 @@ declare module "entries/chunks/model" {
14695
14716
  export { AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner } from "validator";
14696
14717
  export { ItemValue } from "itemvalue";
14697
14718
  export { Base, Event, EventBase, ArrayChanges, ComputedUpdater } from "base";
14698
- export { ISurvey, ISurveyElement, IElement, IQuestion, IPage, IPanel, ISurveyData, ITitleOwner, ISurveyLayoutElement } from "base-interfaces";
14719
+ export { ISurvey, ISurveyElement, IElement, IQuestion, IPage, IPanel, ISurveyData, ITitleOwner, ISurveyLayoutElement, IShortcutText } from "base-interfaces";
14699
14720
  export { SurveyError } from "survey-error";
14700
14721
  export { SurveyElementCore, SurveyElement, DragTypeOverMeEnum } from "survey-element";
14701
14722
  export { CalculatedValue } from "calculatedValue";
@@ -14774,7 +14795,7 @@ declare module "entries/chunks/model" {
14774
14795
  export { confirmAction, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, sanitizeEditableContent, IAttachKey2clickOptions } from "utils/utils";
14775
14796
  export * from "utils/cssClassBuilder";
14776
14797
  export { surveyCss, defaultV2Css, defaultV2ThemeName } from "defaultCss/defaultV2Css";
14777
- export { DragDropSurveyElements } from "dragdrop/survey-elements";
14798
+ export { DragDropCore } from "dragdrop/core";
14778
14799
  export { DragDropChoices } from "dragdrop/choices";
14779
14800
  }
14780
14801
  declare module "defaultCss/cssstandard" {
@@ -18089,6 +18110,7 @@ declare module "localization/greek" {
18089
18110
  noneItemText: string;
18090
18111
  selectAllItemText: string;
18091
18112
  progressText: string;
18113
+ indexText: string;
18092
18114
  panelDynamicProgressText: string;
18093
18115
  questionsProgressText: string;
18094
18116
  emptySurvey: string;
@@ -18096,11 +18118,14 @@ declare module "localization/greek" {
18096
18118
  completingSurveyBefore: string;
18097
18119
  loadingSurvey: string;
18098
18120
  placeholder: string;
18121
+ ratingOptionsCaption: string;
18099
18122
  value: string;
18100
18123
  requiredError: string;
18101
18124
  requiredErrorInPanel: string;
18102
18125
  requiredInAllRowsError: string;
18103
18126
  numericError: string;
18127
+ minError: string;
18128
+ maxError: string;
18104
18129
  textMinLength: string;
18105
18130
  textMaxLength: string;
18106
18131
  textMinMaxLength: string;
@@ -18120,16 +18145,19 @@ declare module "localization/greek" {
18120
18145
  loadingFile: string;
18121
18146
  chooseFile: string;
18122
18147
  noFileChosen: string;
18148
+ fileDragAreaPlaceholder: string;
18123
18149
  confirmDelete: string;
18124
18150
  keyDuplicationError: string;
18125
18151
  addColumn: string;
18126
18152
  addRow: string;
18127
18153
  removeRow: string;
18154
+ emptyRowsText: string;
18128
18155
  addPanel: string;
18129
18156
  removePanel: string;
18130
18157
  choices_Item: string;
18131
18158
  matrix_column: string;
18132
18159
  matrix_row: string;
18160
+ multipletext_itemname: string;
18133
18161
  savingData: string;
18134
18162
  savingDataError: string;
18135
18163
  savingDataSuccess: string;
@@ -18143,6 +18171,7 @@ declare module "localization/greek" {
18143
18171
  timerLimitPage: string;
18144
18172
  timerLimitSurvey: string;
18145
18173
  clearCaption: string;
18174
+ signaturePlaceHolder: string;
18146
18175
  chooseFileCaption: string;
18147
18176
  removeFileCaption: string;
18148
18177
  booleanCheckedLabel: string;
@@ -18150,6 +18179,13 @@ declare module "localization/greek" {
18150
18179
  confirmRemoveFile: string;
18151
18180
  confirmRemoveAllFiles: string;
18152
18181
  questionTitlePatternText: string;
18182
+ modalCancelButtonText: string;
18183
+ modalApplyButtonText: string;
18184
+ filterStringPlaceholder: string;
18185
+ emptyMessage: string;
18186
+ noEntriesText: string;
18187
+ more: string;
18188
+ tagboxDoneButtonCaption: string;
18153
18189
  };
18154
18190
  }
18155
18191
  declare module "localization/hebrew" {