survey-react 1.11.8 → 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/defaultV2.css +23 -9
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +1 -1
- package/modern.min.css +1 -1
- package/package.json +1 -1
- package/survey.css +1 -1
- package/survey.min.css +1 -1
- package/survey.react.d.ts +154 -61
- package/survey.react.js +399 -177
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +3 -3
package/modern.css
CHANGED
package/modern.min.css
CHANGED
package/package.json
CHANGED
package/survey.css
CHANGED
package/survey.min.css
CHANGED
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;
|
@@ -3052,6 +3052,7 @@ declare module "question_custom" {
|
|
3052
3052
|
getFilteredValues(): any;
|
3053
3053
|
getFilteredProperties(): any;
|
3054
3054
|
findQuestionByName(name: string): IQuestion;
|
3055
|
+
getEditingSurveyElement(): Base;
|
3055
3056
|
addElement(element: IElement, index: number): void;
|
3056
3057
|
removeElement(element: IElement): boolean;
|
3057
3058
|
getQuestionTitleLocation(): string;
|
@@ -3121,6 +3122,12 @@ declare module "question_custom" {
|
|
3121
3122
|
get contentPanel(): PanelModel;
|
3122
3123
|
hasErrors(fireCallback?: boolean, rec?: any): boolean;
|
3123
3124
|
updateElementCss(reNew?: boolean): void;
|
3125
|
+
dispose(): void;
|
3126
|
+
private editingObjValue;
|
3127
|
+
private onEditingObjPropertyChanged;
|
3128
|
+
private updateEditingObj;
|
3129
|
+
private unConnectEditingObj;
|
3130
|
+
getEditingSurveyElement(): Base;
|
3124
3131
|
getTextProcessor(): ITextProcessor;
|
3125
3132
|
findQuestionByName(name: string): IQuestion;
|
3126
3133
|
protected clearValueIfInvisibleCore(reason: string): void;
|
@@ -3129,6 +3136,7 @@ declare module "question_custom" {
|
|
3129
3136
|
get isContainer(): boolean;
|
3130
3137
|
protected createPanel(): PanelModel;
|
3131
3138
|
protected onReadOnlyChanged(): void;
|
3139
|
+
updateValueFromSurvey(newValue: any, clearData?: boolean): void;
|
3132
3140
|
onSurveyLoad(): void;
|
3133
3141
|
private setIsContentElement;
|
3134
3142
|
setVisibleIndex(val: number): number;
|
@@ -3884,6 +3892,8 @@ declare module "question_file" {
|
|
3884
3892
|
clearOnDeletingContainer(): void;
|
3885
3893
|
protected onCheckForErrors(errors: Array<SurveyError>, isOnValueChanged: boolean): void;
|
3886
3894
|
protected uploadFiles(files: File[]): void;
|
3895
|
+
protected loadPreview(newValue: any): void;
|
3896
|
+
protected onChangeQuestionValue(newValue: any): void;
|
3887
3897
|
}
|
3888
3898
|
/**
|
3889
3899
|
* A class that describes the File Upload question type.
|
@@ -3921,6 +3931,9 @@ declare module "question_file" {
|
|
3921
3931
|
startCameraAction: Action;
|
3922
3932
|
cleanAction: Action;
|
3923
3933
|
actionsContainer: ActionContainer;
|
3934
|
+
private isFileLoadingValue;
|
3935
|
+
protected get isFileLoading(): boolean;
|
3936
|
+
protected set isFileLoading(val: boolean);
|
3924
3937
|
get fileNavigatorVisible(): boolean;
|
3925
3938
|
private get pagesCount();
|
3926
3939
|
get actionsContainerVisible(): boolean;
|
@@ -4063,9 +4076,6 @@ declare module "question_file" {
|
|
4063
4076
|
protected get camera(): Camera;
|
4064
4077
|
canPreviewImage(fileItem: any): boolean;
|
4065
4078
|
protected loadPreview(newValue: any): void;
|
4066
|
-
private isFileLoadingValue;
|
4067
|
-
protected get isFileLoading(): boolean;
|
4068
|
-
protected set isFileLoading(val: boolean);
|
4069
4079
|
protected getIsQuestionReady(): boolean;
|
4070
4080
|
private allFilesOk;
|
4071
4081
|
private isFileImage;
|
@@ -4078,7 +4088,6 @@ declare module "question_file" {
|
|
4078
4088
|
get fileRootCss(): string;
|
4079
4089
|
getFileDecoratorCss(): string;
|
4080
4090
|
private onChange;
|
4081
|
-
protected onChangeQuestionValue(newValue: any): void;
|
4082
4091
|
protected calcCssClasses(css: any): any;
|
4083
4092
|
onSurveyLoad(): void;
|
4084
4093
|
protected needResponsiveness(): boolean;
|
@@ -4093,7 +4102,8 @@ declare module "question_file" {
|
|
4093
4102
|
protected processResponsiveness(_: number, availableWidth: number): boolean;
|
4094
4103
|
private rootElement;
|
4095
4104
|
private canDragDrop;
|
4096
|
-
|
4105
|
+
afterRenderQuestionElement(el: HTMLElement): void;
|
4106
|
+
beforeDestroyQuestionElement(el: HTMLElement): void;
|
4097
4107
|
private dragCounter;
|
4098
4108
|
onDragEnter: (event: any) => void;
|
4099
4109
|
onDragOver: (event: any) => boolean;
|
@@ -4111,7 +4121,7 @@ declare module "question_file" {
|
|
4111
4121
|
export class FileLoader {
|
4112
4122
|
private fileQuestion;
|
4113
4123
|
private callback;
|
4114
|
-
constructor(fileQuestion:
|
4124
|
+
constructor(fileQuestion: QuestionFileModelBase, callback: (status: string, files: any[]) => void);
|
4115
4125
|
loaded: any[];
|
4116
4126
|
load(files: Array<any>): void;
|
4117
4127
|
dispose(): void;
|
@@ -4784,11 +4794,6 @@ declare module "question_baseselect" {
|
|
4784
4794
|
get hasHeadItems(): boolean;
|
4785
4795
|
get hasFootItems(): boolean;
|
4786
4796
|
get columns(): any[];
|
4787
|
-
protected getObservedElementSelector(): string;
|
4788
|
-
protected supportResponsiveness(): boolean;
|
4789
|
-
allowMultiColumns: boolean;
|
4790
|
-
protected onBeforeSetCompactRenderer(): void;
|
4791
|
-
protected onBeforeSetDesktopRenderer(): void;
|
4792
4797
|
get hasColumns(): boolean;
|
4793
4798
|
get rowLayout(): boolean;
|
4794
4799
|
get blockedRow(): boolean;
|
@@ -5549,6 +5554,7 @@ declare module "dragdrop/core" {
|
|
5549
5554
|
protected ghostPositionChanged(): void;
|
5550
5555
|
onDragStart: EventBase<DragDropCore<T>>;
|
5551
5556
|
onDragEnd: EventBase<DragDropCore<T>>;
|
5557
|
+
onDragClear: EventBase<DragDropCore<T>>;
|
5552
5558
|
onBeforeDrop: EventBase<DragDropCore<T>, any>;
|
5553
5559
|
onAfterDrop: EventBase<DragDropCore<T>, any>;
|
5554
5560
|
draggedElement: any;
|
@@ -6291,6 +6297,7 @@ declare module "question_paneldynamic" {
|
|
6291
6297
|
import { HashTable } from "helpers";
|
6292
6298
|
import { IElement, IQuestion, IPanel, ISurveyData, ISurvey, ISurveyImpl, ITextProcessor, IProgressInfo, IPlainDataOptions } from "base-interfaces";
|
6293
6299
|
import { LocalizableString } from "localizablestring";
|
6300
|
+
import { Base } from "base";
|
6294
6301
|
import { Question, IConditionObject, IQuestionPlainData } from "question";
|
6295
6302
|
import { PanelModel } from "panel";
|
6296
6303
|
import { SurveyError } from "survey-error";
|
@@ -6326,6 +6333,7 @@ declare module "question_paneldynamic" {
|
|
6326
6333
|
getComment(name: string): string;
|
6327
6334
|
setComment(name: string, newValue: string, locNotification: any): void;
|
6328
6335
|
findQuestionByName(name: string): IQuestion;
|
6336
|
+
getEditingSurveyElement(): Base;
|
6329
6337
|
getAllValues(): any;
|
6330
6338
|
getFilteredValues(): any;
|
6331
6339
|
getFilteredProperties(): any;
|
@@ -6987,6 +6995,8 @@ declare module "question_signaturepad" {
|
|
6987
6995
|
private fromUrl;
|
6988
6996
|
private refreshCanvas;
|
6989
6997
|
private updateValueHandler;
|
6998
|
+
protected loadPreview(newValue: any): void;
|
6999
|
+
onSurveyLoad(): void;
|
6990
7000
|
initSignaturePad(el: HTMLElement): void;
|
6991
7001
|
destroySignaturePad(el: HTMLElement): void;
|
6992
7002
|
/**
|
@@ -8141,6 +8151,32 @@ declare module "survey-events-api" {
|
|
8141
8151
|
*/
|
8142
8152
|
visible: boolean;
|
8143
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
|
+
}
|
8144
8180
|
export interface ElementWrapperComponentEventMixin {
|
8145
8181
|
element: any;
|
8146
8182
|
wrapperName: string;
|
@@ -8808,6 +8844,7 @@ declare module "question_text" {
|
|
8808
8844
|
private hasToConvertToUTC;
|
8809
8845
|
protected valueForSurveyCore(val: any): any;
|
8810
8846
|
protected valueFromDataCore(val: any): any;
|
8847
|
+
private dateValidationMessage;
|
8811
8848
|
protected onCheckForErrors(errors: Array<SurveyError>, isOnValueChanged: boolean): void;
|
8812
8849
|
protected canSetValueToSurvey(): boolean;
|
8813
8850
|
protected convertFuncValuetoQuestionValue(val: any): any;
|
@@ -8846,6 +8883,7 @@ declare module "question_text" {
|
|
8846
8883
|
private updateValueOnEvent;
|
8847
8884
|
onCompositionUpdate: (event: any) => void;
|
8848
8885
|
onKeyUp: (event: any) => void;
|
8886
|
+
private updateDateValidationMessage;
|
8849
8887
|
onKeyDown: (event: any) => void;
|
8850
8888
|
onChange: (event: any) => void;
|
8851
8889
|
onBlur: (event: any) => void;
|
@@ -9041,6 +9079,7 @@ declare module "question_multipletext" {
|
|
9041
9079
|
getFilteredValues(): any;
|
9042
9080
|
getFilteredProperties(): any;
|
9043
9081
|
findQuestionByName(name: string): IQuestion;
|
9082
|
+
getEditingSurveyElement(): Base;
|
9044
9083
|
getValidatorTitle(): string;
|
9045
9084
|
get validatedValue(): any;
|
9046
9085
|
set validatedValue(val: any);
|
@@ -9377,7 +9416,7 @@ declare module "surveyToc" {
|
|
9377
9416
|
declare module "survey" {
|
9378
9417
|
import { JsonError } from "jsonobject";
|
9379
9418
|
import { Base, EventBase } from "base";
|
9380
|
-
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";
|
9381
9420
|
import { SurveyElementCore } from "survey-element";
|
9382
9421
|
import { ISurveyTriggerOwner, SurveyTrigger, Trigger } from "trigger";
|
9383
9422
|
import { CalculatedValue } from "calculatedValue";
|
@@ -9395,7 +9434,7 @@ declare module "survey" {
|
|
9395
9434
|
import { ActionContainer } from "actions/container";
|
9396
9435
|
import { QuestionPanelDynamicModel } from "question_paneldynamic";
|
9397
9436
|
import { Notifier } from "notifier";
|
9398
|
-
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";
|
9399
9438
|
import { QuestionMatrixDropdownModelBase } from "question_matrixdropdownbase";
|
9400
9439
|
import { QuestionMatrixDynamicModel } from "question_matrixdynamic";
|
9401
9440
|
import { QuestionFileModel } from "question_file";
|
@@ -10090,9 +10129,17 @@ declare module "survey" {
|
|
10090
10129
|
*/
|
10091
10130
|
onGetExpressionDisplayValue: EventBase<SurveyModel, GetExpressionDisplayValueEvent>;
|
10092
10131
|
/**
|
10093
|
-
* An event that is raised after the visibility of a popup is changed.
|
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).
|
10094
10135
|
*/
|
10095
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>;
|
10096
10143
|
onElementWrapperComponentName: EventBase<SurveyModel, ElementWrapperComponentNameEvent>;
|
10097
10144
|
onElementWrapperComponentData: EventBase<SurveyModel, ElementWrapperComponentDataEvent>;
|
10098
10145
|
constructor(jsonObj?: any, renderedElement?: any);
|
@@ -10998,6 +11045,7 @@ declare module "survey" {
|
|
10998
11045
|
private onEditingObjPropertyChanged;
|
10999
11046
|
get editingObj(): Base;
|
11000
11047
|
set editingObj(val: Base);
|
11048
|
+
private unConnectEditingObj;
|
11001
11049
|
get isEditingSurveyElement(): boolean;
|
11002
11050
|
private setCalculatedValuesIntoResult;
|
11003
11051
|
getAllValues(): any;
|
@@ -11536,8 +11584,8 @@ declare module "survey" {
|
|
11536
11584
|
updatePanelCssClasses(panel: PanelModel, cssClasses: any): void;
|
11537
11585
|
updatePageCssClasses(page: PageModel, cssClasses: any): void;
|
11538
11586
|
updateChoiceItemCss(question: IQuestion, options: any): void;
|
11539
|
-
private isFirstPageRendering;
|
11540
11587
|
private isCurrentPageRendering;
|
11588
|
+
private isCurrentPageRendered;
|
11541
11589
|
afterRenderPage(htmlElement: HTMLElement): void;
|
11542
11590
|
afterRenderHeader(htmlElement: HTMLElement): void;
|
11543
11591
|
afterRenderQuestion(question: Question, htmlElement: HTMLElement): void;
|
@@ -11710,6 +11758,7 @@ declare module "survey" {
|
|
11710
11758
|
*/
|
11711
11759
|
getQuestionByName(name: string, caseInsensitive?: boolean): Question;
|
11712
11760
|
findQuestionByName(name: string): IQuestion;
|
11761
|
+
getEditingSurveyElement(): Base;
|
11713
11762
|
/**
|
11714
11763
|
* Returns a question with a specified [`valueName`](https://surveyjs.io/form-library/documentation/api-reference/question#valueName).
|
11715
11764
|
*
|
@@ -12230,6 +12279,7 @@ declare module "survey" {
|
|
12230
12279
|
removeLayoutElement(layoutElementId: string): ISurveyLayoutElement;
|
12231
12280
|
getContainerContent(container: LayoutElementContainer): any[];
|
12232
12281
|
processPopupVisiblityChanged(question: Question, popup: PopupModel<any>, visible: boolean): void;
|
12282
|
+
processOpenDropdownMenu(question: Question, options: IDropdownMenuOptions): void;
|
12233
12283
|
/**
|
12234
12284
|
* Applies a specified theme to the survey.
|
12235
12285
|
*
|
@@ -12750,7 +12800,7 @@ declare module "rendererFactory" {
|
|
12750
12800
|
declare module "question" {
|
12751
12801
|
import { HashTable } from "helpers";
|
12752
12802
|
import { EventBase } from "base";
|
12753
|
-
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";
|
12754
12804
|
import { SurveyElement } from "survey-element";
|
12755
12805
|
import { SurveyValidator, IValidatorOwner } from "validator";
|
12756
12806
|
import { TextPreProcessorValue } from "textPreProcessor";
|
@@ -13623,6 +13673,7 @@ declare module "question" {
|
|
13623
13673
|
set validatedValue(val: any);
|
13624
13674
|
getAllValues(): any;
|
13625
13675
|
processPopupVisiblilityChanged(popupModel: PopupModel, visible: boolean): void;
|
13676
|
+
processOpenDropdownMenu(options: IDropdownMenuOptions): void;
|
13626
13677
|
protected onTextKeyDownHandler(event: any): void;
|
13627
13678
|
transformToMobileView(): void;
|
13628
13679
|
transformToDesktopView(): void;
|
@@ -13992,6 +14043,7 @@ declare module "question_matrixdropdownbase" {
|
|
13992
14043
|
getComment(name: string): string;
|
13993
14044
|
setComment(name: string, newValue: string, locNotification: any): void;
|
13994
14045
|
findQuestionByName(name: string): IQuestion;
|
14046
|
+
getEditingSurveyElement(): Base;
|
13995
14047
|
private setValueCore;
|
13996
14048
|
private updateQuestionsValue;
|
13997
14049
|
runTriggers(name: string, value: any): void;
|
@@ -14433,6 +14485,7 @@ declare module "base-interfaces" {
|
|
14433
14485
|
getFilteredValues(): any;
|
14434
14486
|
getFilteredProperties(): any;
|
14435
14487
|
findQuestionByName(name: string): IQuestion;
|
14488
|
+
getEditingSurveyElement(): Base;
|
14436
14489
|
}
|
14437
14490
|
export interface ITextProcessor {
|
14438
14491
|
processText(text: string, returnDisplayValue: boolean): string;
|
@@ -14574,6 +14627,7 @@ declare module "base-interfaces" {
|
|
14574
14627
|
elementContentVisibilityChanged(element: ISurveyElement): void;
|
14575
14628
|
onCorrectQuestionAnswer(question: IQuestion, options: any): void;
|
14576
14629
|
processPopupVisiblityChanged(question: IQuestion, popupModel: PopupModel, visible: boolean): void;
|
14630
|
+
processOpenDropdownMenu(question: IQuestion, options: IDropdownMenuOptions): void;
|
14577
14631
|
chooseFiles(input: HTMLInputElement, callback: (files: File[]) => void, context?: {
|
14578
14632
|
element: Base;
|
14579
14633
|
item?: any;
|
@@ -14741,6 +14795,13 @@ declare module "base-interfaces" {
|
|
14741
14795
|
storeDefaults?: boolean;
|
14742
14796
|
version?: string;
|
14743
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
|
+
}
|
14744
14805
|
}
|
14745
14806
|
declare module "jsonobject" {
|
14746
14807
|
import { Base } from "base";
|
@@ -14874,7 +14935,7 @@ declare module "jsonobject" {
|
|
14874
14935
|
onPropertyEditorUpdate: (obj: any, propEditor: any) => any;
|
14875
14936
|
constructor(classInfo: JsonMetadataClass, name: string, isRequired?: boolean);
|
14876
14937
|
uniqueProperty?: string;
|
14877
|
-
dependsOn?: string | string
|
14938
|
+
dependsOn?: string | Array<string>;
|
14878
14939
|
default?: any;
|
14879
14940
|
defaultFunc?: (obj: Base) => any;
|
14880
14941
|
get id(): number;
|
@@ -15087,6 +15148,7 @@ declare module "jsonobject" {
|
|
15087
15148
|
toJsonObject(obj: any, options?: ISaveToJSONOptions | boolean): any;
|
15088
15149
|
toObject(jsonObj: any, obj: any, options?: ILoadFromJSONOptions): void;
|
15089
15150
|
toObjectCore(jsonObj: any, obj: any, options?: ILoadFromJSONOptions): void;
|
15151
|
+
private setPropertyValueToObj;
|
15090
15152
|
toJsonObjectCore(obj: any, property: JsonObjectProperty, options?: ISaveToJSONOptions | boolean): any;
|
15091
15153
|
private getDynamicProperties;
|
15092
15154
|
private addDynamicProperties;
|
@@ -15663,7 +15725,7 @@ declare module "popup" {
|
|
15663
15725
|
isFocusedContainer: boolean;
|
15664
15726
|
cssClass: string;
|
15665
15727
|
title: string;
|
15666
|
-
overlayDisplayMode: "auto" | "overlay" | "dropdown-overlay";
|
15728
|
+
overlayDisplayMode: "auto" | "tablet-dropdown-overlay" | "dropdown-overlay" | "plain";
|
15667
15729
|
displayMode: "popup" | "overlay";
|
15668
15730
|
positionMode: PositionMode;
|
15669
15731
|
onVisibilityChanged: EventBase<PopupModel>;
|
@@ -15678,6 +15740,7 @@ declare module "popup" {
|
|
15678
15740
|
hide(): void;
|
15679
15741
|
recalculatePosition(isResetHeight: boolean): void;
|
15680
15742
|
updateFooterActions(footerActions: Array<IAction>): Array<IAction>;
|
15743
|
+
updateDisplayMode(menuType: "dropdown" | "popup" | "overlay"): void;
|
15681
15744
|
onHiding(): void;
|
15682
15745
|
dispose(): void;
|
15683
15746
|
}
|
@@ -15837,6 +15900,7 @@ declare module "settings" {
|
|
15837
15900
|
* const item = new ItemValue("item1");
|
15838
15901
|
* const itemString = item.toJSON(); // Produces { value: "item1", text: "item1" } instead of "item1"
|
15839
15902
|
* ```
|
15903
|
+
* @see [settings.parseNumber](https://surveyjs.io/form-library/documentation/api-reference/settings#parseNumber)
|
15840
15904
|
*/
|
15841
15905
|
serialization: {
|
15842
15906
|
itemValueSerializeAsObject: boolean;
|
@@ -16304,6 +16368,30 @@ declare module "settings" {
|
|
16304
16368
|
* ```
|
16305
16369
|
*/
|
16306
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;
|
16307
16395
|
};
|
16308
16396
|
}
|
16309
16397
|
declare module "question_matrixdropdown" {
|
@@ -16361,6 +16449,45 @@ declare module "question_matrixdropdown" {
|
|
16361
16449
|
protected updateProgressInfoByValues(res: IProgressInfo): void;
|
16362
16450
|
}
|
16363
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
|
+
}
|
16364
16491
|
declare module "dropdownListModel" {
|
16365
16492
|
import { IAction } from "actions/action";
|
16366
16493
|
import { Base } from "base";
|
@@ -16392,6 +16519,7 @@ declare module "dropdownListModel" {
|
|
16392
16519
|
private loadQuestionChoices;
|
16393
16520
|
private updateQuestionChoices;
|
16394
16521
|
private updatePopupFocusFirstInputSelector;
|
16522
|
+
private getDropdownMenuOptions;
|
16395
16523
|
protected createPopup(): void;
|
16396
16524
|
private setFilterStringToListModel;
|
16397
16525
|
private setTextWrapEnabled;
|
@@ -16713,8 +16841,8 @@ declare module "question_matrix" {
|
|
16713
16841
|
*
|
16714
16842
|
* Possible values:
|
16715
16843
|
*
|
16716
|
-
* - "initial" (default) - Preserves the original order of the `rows` array.
|
16717
|
-
* - "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.
|
16718
16846
|
* @see rows
|
16719
16847
|
*/
|
16720
16848
|
get rowsOrder(): string;
|
@@ -18302,44 +18430,6 @@ declare module "popup-survey" {
|
|
18302
18430
|
export class SurveyWindowModel extends PopupSurveyModel {
|
18303
18431
|
}
|
18304
18432
|
}
|
18305
|
-
declare module "popup-dropdown-view-model" {
|
18306
|
-
import { IPosition, Rect } from "utils/popup";
|
18307
|
-
import { CssClassBuilder } from "utils/cssClassBuilder";
|
18308
|
-
import { PopupModel } from "popup";
|
18309
|
-
import { PopupBaseViewModel } from "popup-view-model";
|
18310
|
-
export class PopupDropdownViewModel extends PopupBaseViewModel {
|
18311
|
-
targetElement?: HTMLElement;
|
18312
|
-
areaElement?: HTMLElement;
|
18313
|
-
private scrollEventCallBack;
|
18314
|
-
private static readonly tabletSizeBreakpoint;
|
18315
|
-
private calculateIsTablet;
|
18316
|
-
private resizeEventCallback;
|
18317
|
-
private resizeWindowCallback;
|
18318
|
-
private clientY;
|
18319
|
-
private isTablet;
|
18320
|
-
private touchStartEventCallback;
|
18321
|
-
private touchMoveEventCallback;
|
18322
|
-
protected getAvailableAreaRect(): Rect;
|
18323
|
-
protected getTargetElementRect(): Rect;
|
18324
|
-
private _updatePosition;
|
18325
|
-
protected getActualHorizontalPosition(): "left" | "center" | "right";
|
18326
|
-
protected getStyleClass(): CssClassBuilder;
|
18327
|
-
protected getShowHeader(): boolean;
|
18328
|
-
protected getPopupHeaderTemplate(): string;
|
18329
|
-
popupDirection: string;
|
18330
|
-
pointerTarget: IPosition;
|
18331
|
-
private recalculatePositionHandler;
|
18332
|
-
constructor(model: PopupModel, targetElement?: HTMLElement, areaElement?: HTMLElement);
|
18333
|
-
setComponentElement(componentRoot: HTMLElement, targetElement?: HTMLElement | null, areaElement?: HTMLElement | null): void;
|
18334
|
-
resetComponentElement(): void;
|
18335
|
-
updateOnShowing(): void;
|
18336
|
-
private get shouldCreateResizeCallback();
|
18337
|
-
updatePosition(isResetHeight: boolean, isDelayUpdating?: boolean): void;
|
18338
|
-
updateOnHiding(): void;
|
18339
|
-
protected onModelChanging(newModel: PopupModel): void;
|
18340
|
-
dispose(): void;
|
18341
|
-
}
|
18342
|
-
}
|
18343
18433
|
declare module "popup-modal-view-model" {
|
18344
18434
|
import { CssClassBuilder } from "utils/cssClassBuilder";
|
18345
18435
|
import { PopupModel } from "popup";
|
@@ -26879,6 +26969,7 @@ declare module "react/reactquestion_element" {
|
|
26879
26969
|
}
|
26880
26970
|
export class SurveyQuestionElementBase extends SurveyElementBase<any, any> {
|
26881
26971
|
control: HTMLElement;
|
26972
|
+
content: HTMLElement;
|
26882
26973
|
constructor(props: any);
|
26883
26974
|
componentDidUpdate(prevProps: any, prevState: any): void;
|
26884
26975
|
componentDidMount(): void;
|
@@ -26892,6 +26983,7 @@ declare module "react/reactquestion_element" {
|
|
26892
26983
|
protected get isDisplayMode(): boolean;
|
26893
26984
|
protected wrapCell(cell: any, element: JSX.Element, reason: string): JSX.Element;
|
26894
26985
|
setControl(element: HTMLElement | null): void;
|
26986
|
+
setContent(element: HTMLElement | null): void;
|
26895
26987
|
}
|
26896
26988
|
export class SurveyQuestionUncontrolledElement<T extends Question> extends SurveyQuestionElementBase {
|
26897
26989
|
constructor(props: any);
|
@@ -27778,6 +27870,7 @@ declare module "react/components/list/list" {
|
|
27778
27870
|
handleMouseMove: (event: any) => void;
|
27779
27871
|
getStateElement(): ListModel<import("survey-core").Action>;
|
27780
27872
|
componentDidMount(): void;
|
27873
|
+
componentDidUpdate(prevProps: any, prevState: any): void;
|
27781
27874
|
componentWillUnmount(): void;
|
27782
27875
|
renderElement(): JSX.Element;
|
27783
27876
|
renderList(): JSX.Element;
|