survey-react 1.11.9 → 1.11.10

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/modern.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.11.9
2
+ * surveyjs - Survey JavaScript library v1.11.10
3
3
  * Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
package/modern.min.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.11.9
2
+ * surveyjs - Survey JavaScript library v1.11.10
3
3
  * Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "survey-react",
3
- "version": "1.11.9",
3
+ "version": "1.11.10",
4
4
  "description": "survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.",
5
5
  "keywords": [
6
6
  "Survey",
package/survey.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.11.9
2
+ * surveyjs - Survey JavaScript library v1.11.10
3
3
  * Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
package/survey.min.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.11.9
2
+ * surveyjs - Survey JavaScript library v1.11.10
3
3
  * Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
package/survey.react.d.ts CHANGED
@@ -52,6 +52,8 @@ declare module "helpers" {
52
52
  static isValueObject(val: any, excludeArray?: boolean): boolean;
53
53
  static isNumber(value: any): boolean;
54
54
  static getNumber(value: any): number;
55
+ private static getNumberCore;
56
+ private static isStringHasOperator;
55
57
  private static prepareStringToNumber;
56
58
  static getMaxLength(maxLength: number, surveyLength: number): any;
57
59
  static getRemainingCharacterCounterText(newValue: string | undefined, maxLength: number | null): string;
@@ -439,7 +441,6 @@ declare module "expressions/expressions" {
439
441
  protected getCorrectValue(value: any): any;
440
442
  protected isContentEqual(op: Operand): boolean;
441
443
  private isQuote;
442
- private isBooleanValue;
443
444
  }
444
445
  export class Variable extends Const {
445
446
  private variableName;
@@ -480,8 +481,6 @@ declare module "expressions/expressions" {
480
481
  static throwInvalidOperatorError(op: string): void;
481
482
  static safeToString(operand: Operand, func: (op: Operand) => string): string;
482
483
  static toOperandString(value: string): string;
483
- static isSpaceString(str: string): boolean;
484
- static isNumeric(value: string): boolean;
485
484
  static isBooleanValue(value: string): boolean;
486
485
  static countDecimals(value: number): number;
487
486
  static plusMinus(a: number, b: number, res: number): number;
@@ -874,6 +873,7 @@ declare module "utils/utils" {
874
873
  function wrapUrlForBackgroundImage(url: string): string;
875
874
  function getIconNameFromProxy(iconName: string): string;
876
875
  function createSvg(size: number | string, width: number, height: number, iconName: string, svgElem: any, title: string): void;
876
+ export function getSafeUrl(url: string): string;
877
877
  export function unwrap<T>(value: T | (() => T)): T;
878
878
  export function getRenderedSize(val: string | number): number;
879
879
  export function getRenderedStyleSize(val: string | number): string;
@@ -3892,6 +3892,8 @@ declare module "question_file" {
3892
3892
  clearOnDeletingContainer(): void;
3893
3893
  protected onCheckForErrors(errors: Array<SurveyError>, isOnValueChanged: boolean): void;
3894
3894
  protected uploadFiles(files: File[]): void;
3895
+ protected loadPreview(newValue: any): void;
3896
+ protected onChangeQuestionValue(newValue: any): void;
3895
3897
  }
3896
3898
  /**
3897
3899
  * A class that describes the File Upload question type.
@@ -3929,6 +3931,9 @@ declare module "question_file" {
3929
3931
  startCameraAction: Action;
3930
3932
  cleanAction: Action;
3931
3933
  actionsContainer: ActionContainer;
3934
+ private isFileLoadingValue;
3935
+ protected get isFileLoading(): boolean;
3936
+ protected set isFileLoading(val: boolean);
3932
3937
  get fileNavigatorVisible(): boolean;
3933
3938
  private get pagesCount();
3934
3939
  get actionsContainerVisible(): boolean;
@@ -4071,9 +4076,6 @@ declare module "question_file" {
4071
4076
  protected get camera(): Camera;
4072
4077
  canPreviewImage(fileItem: any): boolean;
4073
4078
  protected loadPreview(newValue: any): void;
4074
- private isFileLoadingValue;
4075
- protected get isFileLoading(): boolean;
4076
- protected set isFileLoading(val: boolean);
4077
4079
  protected getIsQuestionReady(): boolean;
4078
4080
  private allFilesOk;
4079
4081
  private isFileImage;
@@ -4086,7 +4088,6 @@ declare module "question_file" {
4086
4088
  get fileRootCss(): string;
4087
4089
  getFileDecoratorCss(): string;
4088
4090
  private onChange;
4089
- protected onChangeQuestionValue(newValue: any): void;
4090
4091
  protected calcCssClasses(css: any): any;
4091
4092
  onSurveyLoad(): void;
4092
4093
  protected needResponsiveness(): boolean;
@@ -4120,7 +4121,7 @@ declare module "question_file" {
4120
4121
  export class FileLoader {
4121
4122
  private fileQuestion;
4122
4123
  private callback;
4123
- constructor(fileQuestion: QuestionFileModel, callback: (status: string, files: any[]) => void);
4124
+ constructor(fileQuestion: QuestionFileModelBase, callback: (status: string, files: any[]) => void);
4124
4125
  loaded: any[];
4125
4126
  load(files: Array<any>): void;
4126
4127
  dispose(): void;
@@ -5553,6 +5554,7 @@ declare module "dragdrop/core" {
5553
5554
  protected ghostPositionChanged(): void;
5554
5555
  onDragStart: EventBase<DragDropCore<T>>;
5555
5556
  onDragEnd: EventBase<DragDropCore<T>>;
5557
+ onDragClear: EventBase<DragDropCore<T>>;
5556
5558
  onBeforeDrop: EventBase<DragDropCore<T>, any>;
5557
5559
  onAfterDrop: EventBase<DragDropCore<T>, any>;
5558
5560
  draggedElement: any;
@@ -6993,6 +6995,8 @@ declare module "question_signaturepad" {
6993
6995
  private fromUrl;
6994
6996
  private refreshCanvas;
6995
6997
  private updateValueHandler;
6998
+ protected loadPreview(newValue: any): void;
6999
+ onSurveyLoad(): void;
6996
7000
  initSignaturePad(el: HTMLElement): void;
6997
7001
  destroySignaturePad(el: HTMLElement): void;
6998
7002
  /**
@@ -8147,6 +8151,32 @@ declare module "survey-events-api" {
8147
8151
  */
8148
8152
  visible: boolean;
8149
8153
  }
8154
+ export interface OpenDropdownMenuEvent extends QuestionEventMixin {
8155
+ /**
8156
+ * A question for which the event is raised.
8157
+ */
8158
+ question: Question;
8159
+ /**
8160
+ * A device type.
8161
+ */
8162
+ deviceType: "mobile" | "tablet" | "desktop";
8163
+ /**
8164
+ * A Boolean value that indicates whether the current device supports touch gestures.
8165
+ */
8166
+ hasTouchScreen: boolean;
8167
+ /**
8168
+ * The height of the device screen in pixels.
8169
+ */
8170
+ screenHeight: number;
8171
+ /**
8172
+ * The width of the device screen in pixels.
8173
+ */
8174
+ screenWidth: number;
8175
+ /**
8176
+ * A menu type to use for the question: a classic dropdown, a pop-up dialog, or an overlay window. You can modify this parameter's value.
8177
+ */
8178
+ menuType: "dropdown" | "popup" | "overlay";
8179
+ }
8150
8180
  export interface ElementWrapperComponentEventMixin {
8151
8181
  element: any;
8152
8182
  wrapperName: string;
@@ -9386,7 +9416,7 @@ declare module "surveyToc" {
9386
9416
  declare module "survey" {
9387
9417
  import { JsonError } from "jsonobject";
9388
9418
  import { Base, EventBase } from "base";
9389
- import { ISurvey, ISurveyData, ISurveyImpl, ITextProcessor, IQuestion, IPanel, IElement, IPage, ISurveyErrorOwner, ISurveyElement, IProgressInfo, IFindElement, ISurveyLayoutElement, IPlainDataOptions, LayoutElementContainer, IValueItemCustomPropValues, ILoadFromJSONOptions } from "base-interfaces";
9419
+ import { ISurvey, ISurveyData, ISurveyImpl, ITextProcessor, IQuestion, IPanel, IElement, IPage, ISurveyErrorOwner, ISurveyElement, IProgressInfo, IFindElement, ISurveyLayoutElement, IPlainDataOptions, LayoutElementContainer, IValueItemCustomPropValues, ILoadFromJSONOptions, IDropdownMenuOptions } from "base-interfaces";
9390
9420
  import { SurveyElementCore } from "survey-element";
9391
9421
  import { ISurveyTriggerOwner, SurveyTrigger, Trigger } from "trigger";
9392
9422
  import { CalculatedValue } from "calculatedValue";
@@ -9404,7 +9434,7 @@ declare module "survey" {
9404
9434
  import { ActionContainer } from "actions/container";
9405
9435
  import { QuestionPanelDynamicModel } from "question_paneldynamic";
9406
9436
  import { Notifier } from "notifier";
9407
- import { TriggerExecutedEvent, CompletingEvent, CompleteEvent, ShowingPreviewEvent, NavigateToUrlEvent, CurrentPageChangingEvent, CurrentPageChangedEvent, ValueChangingEvent, ValueChangedEvent, VariableChangedEvent, QuestionVisibleChangedEvent, PageVisibleChangedEvent, PanelVisibleChangedEvent, QuestionCreatedEvent, QuestionAddedEvent, QuestionRemovedEvent, PanelAddedEvent, PanelRemovedEvent, PageAddedEvent, ValidateQuestionEvent, SettingQuestionErrorsEvent, ValidatePanelEvent, ErrorCustomTextEvent, ValidatedErrorsOnCurrentPageEvent, ProcessHtmlEvent, GetQuestionTitleEvent, GetTitleTagNameEvent, GetQuestionNoEvent, ProgressTextEvent, TextMarkdownEvent, TextRenderAsEvent, SendResultEvent, GetResultEvent, UploadFilesEvent, DownloadFileEvent, ClearFilesEvent, LoadChoicesFromServerEvent, ProcessTextValueEvent, UpdateQuestionCssClassesEvent, UpdatePanelCssClassesEvent, UpdatePageCssClassesEvent, UpdateChoiceItemCssEvent, AfterRenderSurveyEvent, AfterRenderHeaderEvent, AfterRenderPageEvent, AfterRenderQuestionEvent, AfterRenderQuestionInputEvent, AfterRenderPanelEvent, FocusInQuestionEvent, FocusInPanelEvent, ShowingChoiceItemEvent, ChoicesLazyLoadEvent, GetChoiceDisplayValueEvent, MatrixRowAddedEvent, MatrixBeforeRowAddedEvent, MatrixRowRemovingEvent, MatrixRowRemovedEvent, MatrixAllowRemoveRowEvent, MatrixDetailPanelVisibleChangedEvent, MatrixCellCreatingEvent, MatrixCellCreatedEvent, MatrixAfterCellRenderEvent, MatrixCellValueChangedEvent, MatrixCellValueChangingEvent, MatrixCellValidateEvent, DynamicPanelModifiedEvent, DynamicPanelRemovingEvent, TimerPanelInfoTextEvent, DynamicPanelItemValueChangedEvent, DynamicPanelGetTabTitleEvent, DynamicPanelCurrentIndexChangedEvent, IsAnswerCorrectEvent, DragDropAllowEvent, ScrollingElementToTopEvent, GetQuestionTitleActionsEvent, GetPanelTitleActionsEvent, GetPageTitleActionsEvent, GetPanelFooterActionsEvent, GetMatrixRowActionsEvent, ElementContentVisibilityChangedEvent, GetExpressionDisplayValueEvent, ServerValidateQuestionsEvent, MultipleTextItemAddedEvent, MatrixColumnAddedEvent, GetQuestionDisplayValueEvent, PopupVisibleChangedEvent, ChoicesSearchEvent, OpenFileChooserEvent, ElementWrapperComponentNameEvent, ElementWrapperComponentDataEvent } from "survey-events-api";
9437
+ import { TriggerExecutedEvent, CompletingEvent, CompleteEvent, ShowingPreviewEvent, NavigateToUrlEvent, CurrentPageChangingEvent, CurrentPageChangedEvent, ValueChangingEvent, ValueChangedEvent, VariableChangedEvent, QuestionVisibleChangedEvent, PageVisibleChangedEvent, PanelVisibleChangedEvent, QuestionCreatedEvent, QuestionAddedEvent, QuestionRemovedEvent, PanelAddedEvent, PanelRemovedEvent, PageAddedEvent, ValidateQuestionEvent, SettingQuestionErrorsEvent, ValidatePanelEvent, ErrorCustomTextEvent, ValidatedErrorsOnCurrentPageEvent, ProcessHtmlEvent, GetQuestionTitleEvent, GetTitleTagNameEvent, GetQuestionNoEvent, ProgressTextEvent, TextMarkdownEvent, TextRenderAsEvent, SendResultEvent, GetResultEvent, UploadFilesEvent, DownloadFileEvent, ClearFilesEvent, LoadChoicesFromServerEvent, ProcessTextValueEvent, UpdateQuestionCssClassesEvent, UpdatePanelCssClassesEvent, UpdatePageCssClassesEvent, UpdateChoiceItemCssEvent, AfterRenderSurveyEvent, AfterRenderHeaderEvent, AfterRenderPageEvent, AfterRenderQuestionEvent, AfterRenderQuestionInputEvent, AfterRenderPanelEvent, FocusInQuestionEvent, FocusInPanelEvent, ShowingChoiceItemEvent, ChoicesLazyLoadEvent, GetChoiceDisplayValueEvent, MatrixRowAddedEvent, MatrixBeforeRowAddedEvent, MatrixRowRemovingEvent, MatrixRowRemovedEvent, MatrixAllowRemoveRowEvent, MatrixDetailPanelVisibleChangedEvent, MatrixCellCreatingEvent, MatrixCellCreatedEvent, MatrixAfterCellRenderEvent, MatrixCellValueChangedEvent, MatrixCellValueChangingEvent, MatrixCellValidateEvent, DynamicPanelModifiedEvent, DynamicPanelRemovingEvent, TimerPanelInfoTextEvent, DynamicPanelItemValueChangedEvent, DynamicPanelGetTabTitleEvent, DynamicPanelCurrentIndexChangedEvent, IsAnswerCorrectEvent, DragDropAllowEvent, ScrollingElementToTopEvent, GetQuestionTitleActionsEvent, GetPanelTitleActionsEvent, GetPageTitleActionsEvent, GetPanelFooterActionsEvent, GetMatrixRowActionsEvent, ElementContentVisibilityChangedEvent, GetExpressionDisplayValueEvent, ServerValidateQuestionsEvent, MultipleTextItemAddedEvent, MatrixColumnAddedEvent, GetQuestionDisplayValueEvent, PopupVisibleChangedEvent, ChoicesSearchEvent, OpenFileChooserEvent, ElementWrapperComponentNameEvent, ElementWrapperComponentDataEvent, OpenDropdownMenuEvent } from "survey-events-api";
9408
9438
  import { QuestionMatrixDropdownModelBase } from "question_matrixdropdownbase";
9409
9439
  import { QuestionMatrixDynamicModel } from "question_matrixdynamic";
9410
9440
  import { QuestionFileModel } from "question_file";
@@ -10099,9 +10129,17 @@ declare module "survey" {
10099
10129
  */
10100
10130
  onGetExpressionDisplayValue: EventBase<SurveyModel, GetExpressionDisplayValueEvent>;
10101
10131
  /**
10102
- * An event that is raised after the visibility of a popup is changed. This event can be raised for [Single-](https://surveyjs.io/form-library/documentation/api-reference/dropdown-menu-model) and [Multi-Select Dropdown](https://surveyjs.io/form-library/documentation/api-reference/dropdown-tag-box-model) questions and [Rating](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model) questions [rendered as drop-down menus](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#displayMode).
10132
+ * An event that is raised after the visibility of a popup is changed.
10133
+ *
10134
+ * This event can be raised for [Single-](https://surveyjs.io/form-library/documentation/api-reference/dropdown-menu-model) and [Multi-Select Dropdown](https://surveyjs.io/form-library/documentation/api-reference/dropdown-tag-box-model) questions and [Rating Scale](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model) questions [rendered as drop-down menus](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#displayMode), and [Multi-Select Matrix](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-with-dropdown-list) questions that contain columns of the `"dropdown"` or `"tagbox"` [`cellType`](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-with-dropdown-list#cellType).
10103
10135
  */
10104
10136
  onPopupVisibleChanged: EventBase<SurveyModel, PopupVisibleChangedEvent>;
10137
+ /**
10138
+ * An event that is raised when users open a drop-down menu.
10139
+ *
10140
+ * This event can be raised for [Single-](https://surveyjs.io/form-library/documentation/api-reference/dropdown-menu-model) and [Multi-Select Dropdown](https://surveyjs.io/form-library/documentation/api-reference/dropdown-tag-box-model) questions, [Rating Scale](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model) questions [rendered as drop-down menus](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#displayMode), and [Multi-Select Matrix](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-with-dropdown-list) questions that contain columns of the `"dropdown"` or `"tagbox"` [`cellType`](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-with-dropdown-list#cellType). Handle this event to change the drop-down menu type for specific questions or device types.
10141
+ */
10142
+ onOpenDropdownMenu: EventBase<SurveyModel, OpenDropdownMenuEvent>;
10105
10143
  onElementWrapperComponentName: EventBase<SurveyModel, ElementWrapperComponentNameEvent>;
10106
10144
  onElementWrapperComponentData: EventBase<SurveyModel, ElementWrapperComponentDataEvent>;
10107
10145
  constructor(jsonObj?: any, renderedElement?: any);
@@ -12241,6 +12279,7 @@ declare module "survey" {
12241
12279
  removeLayoutElement(layoutElementId: string): ISurveyLayoutElement;
12242
12280
  getContainerContent(container: LayoutElementContainer): any[];
12243
12281
  processPopupVisiblityChanged(question: Question, popup: PopupModel<any>, visible: boolean): void;
12282
+ processOpenDropdownMenu(question: Question, options: IDropdownMenuOptions): void;
12244
12283
  /**
12245
12284
  * Applies a specified theme to the survey.
12246
12285
  *
@@ -12761,7 +12800,7 @@ declare module "rendererFactory" {
12761
12800
  declare module "question" {
12762
12801
  import { HashTable } from "helpers";
12763
12802
  import { EventBase } from "base";
12764
- import { IElement, IQuestion, IPanel, IConditionRunner, ISurveyImpl, IPage, ITitleOwner, IProgressInfo, ISurvey, IPlainDataOptions } from "base-interfaces";
12803
+ import { IElement, IQuestion, IPanel, IConditionRunner, ISurveyImpl, IPage, ITitleOwner, IProgressInfo, ISurvey, IPlainDataOptions, IDropdownMenuOptions } from "base-interfaces";
12765
12804
  import { SurveyElement } from "survey-element";
12766
12805
  import { SurveyValidator, IValidatorOwner } from "validator";
12767
12806
  import { TextPreProcessorValue } from "textPreProcessor";
@@ -13634,6 +13673,7 @@ declare module "question" {
13634
13673
  set validatedValue(val: any);
13635
13674
  getAllValues(): any;
13636
13675
  processPopupVisiblilityChanged(popupModel: PopupModel, visible: boolean): void;
13676
+ processOpenDropdownMenu(options: IDropdownMenuOptions): void;
13637
13677
  protected onTextKeyDownHandler(event: any): void;
13638
13678
  transformToMobileView(): void;
13639
13679
  transformToDesktopView(): void;
@@ -14587,6 +14627,7 @@ declare module "base-interfaces" {
14587
14627
  elementContentVisibilityChanged(element: ISurveyElement): void;
14588
14628
  onCorrectQuestionAnswer(question: IQuestion, options: any): void;
14589
14629
  processPopupVisiblityChanged(question: IQuestion, popupModel: PopupModel, visible: boolean): void;
14630
+ processOpenDropdownMenu(question: IQuestion, options: IDropdownMenuOptions): void;
14590
14631
  chooseFiles(input: HTMLInputElement, callback: (files: File[]) => void, context?: {
14591
14632
  element: Base;
14592
14633
  item?: any;
@@ -14754,6 +14795,13 @@ declare module "base-interfaces" {
14754
14795
  storeDefaults?: boolean;
14755
14796
  version?: string;
14756
14797
  }
14798
+ export interface IDropdownMenuOptions {
14799
+ menuType: "dropdown" | "popup" | "overlay";
14800
+ deviceType: "mobile" | "tablet" | "desktop";
14801
+ hasTouchScreen: boolean;
14802
+ screenHeight: number;
14803
+ screenWidth: number;
14804
+ }
14757
14805
  }
14758
14806
  declare module "jsonobject" {
14759
14807
  import { Base } from "base";
@@ -15677,7 +15725,7 @@ declare module "popup" {
15677
15725
  isFocusedContainer: boolean;
15678
15726
  cssClass: string;
15679
15727
  title: string;
15680
- overlayDisplayMode: "auto" | "overlay" | "dropdown-overlay";
15728
+ overlayDisplayMode: "auto" | "tablet-dropdown-overlay" | "dropdown-overlay" | "plain";
15681
15729
  displayMode: "popup" | "overlay";
15682
15730
  positionMode: PositionMode;
15683
15731
  onVisibilityChanged: EventBase<PopupModel>;
@@ -15692,6 +15740,7 @@ declare module "popup" {
15692
15740
  hide(): void;
15693
15741
  recalculatePosition(isResetHeight: boolean): void;
15694
15742
  updateFooterActions(footerActions: Array<IAction>): Array<IAction>;
15743
+ updateDisplayMode(menuType: "dropdown" | "popup" | "overlay"): void;
15695
15744
  onHiding(): void;
15696
15745
  dispose(): void;
15697
15746
  }
@@ -15851,6 +15900,7 @@ declare module "settings" {
15851
15900
  * const item = new ItemValue("item1");
15852
15901
  * const itemString = item.toJSON(); // Produces { value: "item1", text: "item1" } instead of "item1"
15853
15902
  * ```
15903
+ * @see [settings.parseNumber](https://surveyjs.io/form-library/documentation/api-reference/settings#parseNumber)
15854
15904
  */
15855
15905
  serialization: {
15856
15906
  itemValueSerializeAsObject: boolean;
@@ -16318,6 +16368,30 @@ declare module "settings" {
16318
16368
  * ```
16319
16369
  */
16320
16370
  storeUtcDates: boolean;
16371
+ /**
16372
+ * A function that allows you to define custom parsing rules for numbers represented as string values.
16373
+ *
16374
+ * The following code shows a template that you can use to implement the `parseNumber` function:
16375
+ *
16376
+ * ```js
16377
+ * import { settings } from "survey-core";
16378
+ *
16379
+ * settings.parseNumber = (stringValue, numericValue) => {
16380
+ * if (typeof stringValue !== "string" || !stringValue)
16381
+ * return numericValue;
16382
+ * let parsedNumber = numericValue;
16383
+ * // ...
16384
+ * // Parsing the number according to custom parsing rules
16385
+ * // ...
16386
+ * return parsedNumber;
16387
+ * };
16388
+ * ```
16389
+ * @param stringValue A number represented as a string value.
16390
+ * @param numericValue A number parsed using a default parsing function. `NaN` if the original string is not a number.
16391
+ * @returns A number that results from parsing the string value.
16392
+ * @see [settings.serialization](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization)
16393
+ */
16394
+ parseNumber: (stringValue: any, numericValue: number) => number;
16321
16395
  };
16322
16396
  }
16323
16397
  declare module "question_matrixdropdown" {
@@ -16375,6 +16449,45 @@ declare module "question_matrixdropdown" {
16375
16449
  protected updateProgressInfoByValues(res: IProgressInfo): void;
16376
16450
  }
16377
16451
  }
16452
+ declare module "popup-dropdown-view-model" {
16453
+ import { IPosition, Rect } from "utils/popup";
16454
+ import { CssClassBuilder } from "utils/cssClassBuilder";
16455
+ import { PopupModel } from "popup";
16456
+ import { PopupBaseViewModel } from "popup-view-model";
16457
+ export function calculateIsTablet(windowWidth?: number, windowHeight?: number): boolean;
16458
+ export class PopupDropdownViewModel extends PopupBaseViewModel {
16459
+ targetElement?: HTMLElement;
16460
+ areaElement?: HTMLElement;
16461
+ static readonly tabletSizeBreakpoint = 600;
16462
+ private scrollEventCallBack;
16463
+ private calculateIsTablet;
16464
+ private resizeEventCallback;
16465
+ private resizeWindowCallback;
16466
+ private clientY;
16467
+ private isTablet;
16468
+ private touchStartEventCallback;
16469
+ private touchMoveEventCallback;
16470
+ protected getAvailableAreaRect(): Rect;
16471
+ protected getTargetElementRect(): Rect;
16472
+ private _updatePosition;
16473
+ protected getActualHorizontalPosition(): "left" | "center" | "right";
16474
+ protected getStyleClass(): CssClassBuilder;
16475
+ protected getShowHeader(): boolean;
16476
+ protected getPopupHeaderTemplate(): string;
16477
+ popupDirection: string;
16478
+ pointerTarget: IPosition;
16479
+ private recalculatePositionHandler;
16480
+ constructor(model: PopupModel, targetElement?: HTMLElement, areaElement?: HTMLElement);
16481
+ setComponentElement(componentRoot: HTMLElement, targetElement?: HTMLElement | null, areaElement?: HTMLElement | null): void;
16482
+ resetComponentElement(): void;
16483
+ updateOnShowing(): void;
16484
+ private get shouldCreateResizeCallback();
16485
+ updatePosition(isResetHeight: boolean, isDelayUpdating?: boolean): void;
16486
+ updateOnHiding(): void;
16487
+ protected onModelChanging(newModel: PopupModel): void;
16488
+ dispose(): void;
16489
+ }
16490
+ }
16378
16491
  declare module "dropdownListModel" {
16379
16492
  import { IAction } from "actions/action";
16380
16493
  import { Base } from "base";
@@ -16406,6 +16519,7 @@ declare module "dropdownListModel" {
16406
16519
  private loadQuestionChoices;
16407
16520
  private updateQuestionChoices;
16408
16521
  private updatePopupFocusFirstInputSelector;
16522
+ private getDropdownMenuOptions;
16409
16523
  protected createPopup(): void;
16410
16524
  private setFilterStringToListModel;
16411
16525
  private setTextWrapEnabled;
@@ -16727,8 +16841,8 @@ declare module "question_matrix" {
16727
16841
  *
16728
16842
  * Possible values:
16729
16843
  *
16730
- * - "initial" (default) - Preserves the original order of the `rows` array.
16731
- * - "random" - Arranges matrix rows in random order each time the question is displayed.
16844
+ * - `"initial"` (default) - Preserves the original order of the `rows` array.
16845
+ * - `"random"` - Arranges matrix rows in random order each time the question is displayed.
16732
16846
  * @see rows
16733
16847
  */
16734
16848
  get rowsOrder(): string;
@@ -18316,44 +18430,6 @@ declare module "popup-survey" {
18316
18430
  export class SurveyWindowModel extends PopupSurveyModel {
18317
18431
  }
18318
18432
  }
18319
- declare module "popup-dropdown-view-model" {
18320
- import { IPosition, Rect } from "utils/popup";
18321
- import { CssClassBuilder } from "utils/cssClassBuilder";
18322
- import { PopupModel } from "popup";
18323
- import { PopupBaseViewModel } from "popup-view-model";
18324
- export class PopupDropdownViewModel extends PopupBaseViewModel {
18325
- targetElement?: HTMLElement;
18326
- areaElement?: HTMLElement;
18327
- private scrollEventCallBack;
18328
- private static readonly tabletSizeBreakpoint;
18329
- private calculateIsTablet;
18330
- private resizeEventCallback;
18331
- private resizeWindowCallback;
18332
- private clientY;
18333
- private isTablet;
18334
- private touchStartEventCallback;
18335
- private touchMoveEventCallback;
18336
- protected getAvailableAreaRect(): Rect;
18337
- protected getTargetElementRect(): Rect;
18338
- private _updatePosition;
18339
- protected getActualHorizontalPosition(): "left" | "center" | "right";
18340
- protected getStyleClass(): CssClassBuilder;
18341
- protected getShowHeader(): boolean;
18342
- protected getPopupHeaderTemplate(): string;
18343
- popupDirection: string;
18344
- pointerTarget: IPosition;
18345
- private recalculatePositionHandler;
18346
- constructor(model: PopupModel, targetElement?: HTMLElement, areaElement?: HTMLElement);
18347
- setComponentElement(componentRoot: HTMLElement, targetElement?: HTMLElement | null, areaElement?: HTMLElement | null): void;
18348
- resetComponentElement(): void;
18349
- updateOnShowing(): void;
18350
- private get shouldCreateResizeCallback();
18351
- updatePosition(isResetHeight: boolean, isDelayUpdating?: boolean): void;
18352
- updateOnHiding(): void;
18353
- protected onModelChanging(newModel: PopupModel): void;
18354
- dispose(): void;
18355
- }
18356
- }
18357
18433
  declare module "popup-modal-view-model" {
18358
18434
  import { CssClassBuilder } from "utils/cssClassBuilder";
18359
18435
  import { PopupModel } from "popup";