survey-react 1.11.5 → 1.11.7
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 +13 -5
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +6 -6
- package/modern.css.map +1 -1
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/survey.css +6 -6
- package/survey.css.map +1 -1
- package/survey.min.css +2 -2
- package/survey.react.d.ts +86 -86
- package/survey.react.js +296 -121
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +3 -3
package/survey.react.d.ts
CHANGED
@@ -1179,6 +1179,7 @@ declare module "actions/action" {
|
|
1179
1179
|
* [View Demo](https://surveyjs.io/form-library/examples/add-custom-navigation-button/ (linkStyle))
|
1180
1180
|
*/
|
1181
1181
|
action?: (context?: any) => void;
|
1182
|
+
onFocus?: (isMouse: boolean, event: any) => void;
|
1182
1183
|
/**
|
1183
1184
|
* One or several CSS classes that you want to apply to the outer `<div>` element.
|
1184
1185
|
*
|
@@ -1373,6 +1374,7 @@ declare module "actions/action" {
|
|
1373
1374
|
locTooltipName?: string;
|
1374
1375
|
private _enabled;
|
1375
1376
|
action: (context?: any, isUserAction?: boolean) => void;
|
1377
|
+
onFocus: (isMouse: boolean, event: any) => void;
|
1376
1378
|
_component: string;
|
1377
1379
|
items: any;
|
1378
1380
|
_title: string;
|
@@ -1383,6 +1385,10 @@ declare module "actions/action" {
|
|
1383
1385
|
get locTitleName(): string;
|
1384
1386
|
set locTitleName(val: string);
|
1385
1387
|
locStrsChanged(): void;
|
1388
|
+
doAction(args: any): boolean;
|
1389
|
+
private isMouseDown;
|
1390
|
+
doMouseDown(): void;
|
1391
|
+
doFocus(args: any): void;
|
1386
1392
|
private locStrChangedInPopupModel;
|
1387
1393
|
private locTitleChanged;
|
1388
1394
|
private locTooltipChanged;
|
@@ -1561,6 +1567,7 @@ declare module "defaultCss/defaultV2Css" {
|
|
1561
1567
|
titleExpanded: string;
|
1562
1568
|
titleCollapsed: string;
|
1563
1569
|
titleDisabled: string;
|
1570
|
+
titleHidden: string;
|
1564
1571
|
titleOnExpand: string;
|
1565
1572
|
titleOnError: string;
|
1566
1573
|
titleBar: string;
|
@@ -3043,6 +3050,7 @@ declare module "question_custom" {
|
|
3043
3050
|
indexOf(el: IElement): number;
|
3044
3051
|
ensureRowsVisibility(): void;
|
3045
3052
|
validateContainerOnly(): void;
|
3053
|
+
onQuestionValueChanged(el: IElement): void;
|
3046
3054
|
getQuestionErrorLocation(): string;
|
3047
3055
|
protected getContentDisplayValueCore(keyAsText: boolean, value: any, question: Question): any;
|
3048
3056
|
}
|
@@ -3440,6 +3448,7 @@ declare module "panel" {
|
|
3440
3448
|
*/
|
3441
3449
|
validate(fireCallback?: boolean, focusOnFirstError?: boolean, rec?: any): boolean;
|
3442
3450
|
validateContainerOnly(): void;
|
3451
|
+
onQuestionValueChanged(el: IElement): void;
|
3443
3452
|
private hasErrorsInPanels;
|
3444
3453
|
getErrorCustomText(text: string, error: SurveyError): string;
|
3445
3454
|
private hasRequiredError;
|
@@ -6813,7 +6822,7 @@ declare module "question_paneldynamic" {
|
|
6813
6822
|
private removedPanelIndex;
|
6814
6823
|
removePanel(value: any): void;
|
6815
6824
|
private getVisualPanelIndex;
|
6816
|
-
private
|
6825
|
+
private getPanelVisibleIndexById;
|
6817
6826
|
locStrsChanged(): void;
|
6818
6827
|
clearIncorrectValues(): void;
|
6819
6828
|
clearErrors(): void;
|
@@ -8012,7 +8021,7 @@ declare module "survey-events-api" {
|
|
8012
8021
|
* A Boolean property that you can set to `false` if you want to cancel the drag and drop operation.
|
8013
8022
|
*/
|
8014
8023
|
allow: boolean;
|
8015
|
-
|
8024
|
+
allowDropNextToAnother?: boolean;
|
8016
8025
|
/**
|
8017
8026
|
* Obsolete. Use `options.draggedElement` instead.
|
8018
8027
|
*/
|
@@ -8235,6 +8244,7 @@ declare module "page" {
|
|
8235
8244
|
*/
|
8236
8245
|
get maxTimeToFinish(): number;
|
8237
8246
|
set maxTimeToFinish(val: number);
|
8247
|
+
getMaxTimeToFinish(): number;
|
8238
8248
|
protected onNumChanged(value: number): void;
|
8239
8249
|
protected onVisibleChanged(): void;
|
8240
8250
|
getDragDropInfo(): any;
|
@@ -8327,20 +8337,25 @@ declare module "stylesmanager" {
|
|
8327
8337
|
}
|
8328
8338
|
}
|
8329
8339
|
declare module "surveytimer" {
|
8330
|
-
import {
|
8340
|
+
import { EventBase } from "base";
|
8331
8341
|
export var surveyTimerFunctions: {
|
8332
8342
|
setTimeout: (func: () => any) => number;
|
8333
8343
|
clearTimeout: (timerId: number) => void;
|
8334
8344
|
safeTimeOut: (func: () => any, delay: number) => number | any;
|
8345
|
+
now(): number;
|
8335
8346
|
};
|
8347
|
+
export interface SurveyTimerEvent {
|
8348
|
+
seconds: number;
|
8349
|
+
}
|
8336
8350
|
export class SurveyTimer {
|
8337
8351
|
private static instanceValue;
|
8338
8352
|
static get instance(): SurveyTimer;
|
8339
8353
|
private listenerCounter;
|
8340
8354
|
private timerId;
|
8341
|
-
|
8342
|
-
|
8343
|
-
|
8355
|
+
private prevTimeInMs;
|
8356
|
+
onTimer: EventBase<SurveyTimer, SurveyTimerEvent>;
|
8357
|
+
start(func?: (timer: SurveyTimer, options: SurveyTimerEvent) => void): void;
|
8358
|
+
stop(func?: (timer: SurveyTimer, options: SurveyTimerEvent) => any): void;
|
8344
8359
|
doTimer(): void;
|
8345
8360
|
}
|
8346
8361
|
}
|
@@ -8612,6 +8627,7 @@ declare module "mask/input_element_adapter" {
|
|
8612
8627
|
inputMaskInstancePropertyChangedHandler: (sender: any, options: any) => void;
|
8613
8628
|
clickHandler: (event: any) => void;
|
8614
8629
|
beforeInputHandler: (event: any) => void;
|
8630
|
+
changeHandler: (event: any) => void;
|
8615
8631
|
createArgs(event: any): ITextInputParams;
|
8616
8632
|
addInputEventListener(): void;
|
8617
8633
|
removeInputEventListener(): void;
|
@@ -8759,6 +8775,9 @@ declare module "question_text" {
|
|
8759
8775
|
set inputValue(val: string);
|
8760
8776
|
protected onChangeQuestionValue(newValue: any): void;
|
8761
8777
|
private updateInputValue;
|
8778
|
+
private hasToConvertToUTC;
|
8779
|
+
protected valueForSurveyCore(val: any): any;
|
8780
|
+
protected valueFromDataCore(val: any): any;
|
8762
8781
|
protected onCheckForErrors(errors: Array<SurveyError>, isOnValueChanged: boolean): void;
|
8763
8782
|
protected canSetValueToSurvey(): boolean;
|
8764
8783
|
protected convertFuncValuetoQuestionValue(val: any): any;
|
@@ -8766,6 +8785,7 @@ declare module "question_text" {
|
|
8766
8785
|
private get isValueLessMin();
|
8767
8786
|
private get isValueGreaterMax();
|
8768
8787
|
private get isDateInputType();
|
8788
|
+
private isDateTimeLocaleType;
|
8769
8789
|
private getCalculatedMinMax;
|
8770
8790
|
private setRenderedMinMax;
|
8771
8791
|
/**
|
@@ -9122,6 +9142,7 @@ declare module "question_multipletext" {
|
|
9122
9142
|
indexOf(el: IElement): number;
|
9123
9143
|
ensureRowsVisibility(): void;
|
9124
9144
|
validateContainerOnly(): void;
|
9145
|
+
onQuestionValueChanged(el: IElement): void;
|
9125
9146
|
getItemLabelCss(item: MultipleTextItemModel): string;
|
9126
9147
|
getItemCss(): string;
|
9127
9148
|
getItemTitleCss(): string;
|
@@ -10920,6 +10941,24 @@ declare module "survey" {
|
|
10920
10941
|
*/
|
10921
10942
|
mergeData(data: any): void;
|
10922
10943
|
setDataCore(data: any, clearData?: boolean): void;
|
10944
|
+
get isSurvey(): boolean;
|
10945
|
+
/**
|
10946
|
+
* Returns an object with survey results.
|
10947
|
+
*
|
10948
|
+
* If you want to get a survey results object that mirrors the survey structure, call the `getData()` method with an object that has the `includePages` and `includePanels` properties enabled. Without this object, the `getData()` method returns the [`data`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data) property value.
|
10949
|
+
*
|
10950
|
+
* ```js
|
10951
|
+
* import { Model } from "survey-core";
|
10952
|
+
*
|
10953
|
+
* const surveyJson = { ... };
|
10954
|
+
* const survey = new Model(surveyJson);
|
10955
|
+
* survey.getData({ includePages: true, includePanels: true });
|
10956
|
+
* ```
|
10957
|
+
*/
|
10958
|
+
getData(options?: {
|
10959
|
+
includePages?: boolean;
|
10960
|
+
includePanels?: boolean;
|
10961
|
+
}): any;
|
10923
10962
|
getStructuredData(includePages?: boolean, level?: number): any;
|
10924
10963
|
setStructuredData(data: any, doMerge?: boolean): void;
|
10925
10964
|
private collectDataFromPanel;
|
@@ -12090,7 +12129,6 @@ declare module "survey" {
|
|
12090
12129
|
*/
|
12091
12130
|
get maxTimeToFinishPage(): number;
|
12092
12131
|
set maxTimeToFinishPage(val: number);
|
12093
|
-
private getPageMaxTimeToFinish;
|
12094
12132
|
private doTimer;
|
12095
12133
|
get inSurvey(): boolean;
|
12096
12134
|
getSurveyData(): ISurveyData;
|
@@ -12175,61 +12213,13 @@ declare module "survey" {
|
|
12175
12213
|
dispose(): void;
|
12176
12214
|
disposeCallback: () => void;
|
12177
12215
|
private onScrollCallback;
|
12216
|
+
_isElementShouldBeSticky(selector: string): boolean;
|
12178
12217
|
onScroll(): void;
|
12179
12218
|
addScrollEventListener(): void;
|
12180
12219
|
removeScrollEventListener(): void;
|
12181
12220
|
questionErrorComponent: string;
|
12182
12221
|
}
|
12183
12222
|
}
|
12184
|
-
declare module "knockout/kobase" {
|
12185
|
-
import { Base } from "entries/core";
|
12186
|
-
export class ImplementorBase {
|
12187
|
-
element: Base;
|
12188
|
-
private static doIterateProperties;
|
12189
|
-
readonly implementedMark = "__surveyImplementedKo";
|
12190
|
-
constructor(element: Base);
|
12191
|
-
dispose(): void;
|
12192
|
-
}
|
12193
|
-
}
|
12194
|
-
declare module "knockout/kopage" {
|
12195
|
-
import { PageModel } from "entries/core";
|
12196
|
-
import { PanelModelBase, PanelModel, QuestionRowModel } from "entries/core";
|
12197
|
-
import { SurveyElement } from "entries/core";
|
12198
|
-
import { ImplementorBase } from "knockout/kobase";
|
12199
|
-
export class QuestionRow extends QuestionRowModel {
|
12200
|
-
panel: PanelModelBase;
|
12201
|
-
koElementAfterRender: any;
|
12202
|
-
constructor(panel: PanelModelBase);
|
12203
|
-
getElementType(el: any): "survey-panel" | "survey-question";
|
12204
|
-
koAfterRender(htmlElements: any, element: SurveyElement): void;
|
12205
|
-
private elementAfterRender;
|
12206
|
-
rowAfterRender(elements: HTMLElement[], model: QuestionRow): void;
|
12207
|
-
dispose(): void;
|
12208
|
-
}
|
12209
|
-
export class PanelImplementorBase extends ImplementorBase {
|
12210
|
-
panel: PanelModelBase;
|
12211
|
-
constructor(panel: PanelModelBase);
|
12212
|
-
}
|
12213
|
-
export class Panel extends PanelModel {
|
12214
|
-
private _implementor;
|
12215
|
-
koElementType: any;
|
12216
|
-
constructor(name?: string);
|
12217
|
-
protected onBaseCreating(): void;
|
12218
|
-
createRow(): QuestionRowModel;
|
12219
|
-
protected onCreating(): void;
|
12220
|
-
protected onNumChanged(value: number): void;
|
12221
|
-
dispose(): void;
|
12222
|
-
}
|
12223
|
-
export class Page extends PageModel {
|
12224
|
-
private _implementor;
|
12225
|
-
constructor(name?: string);
|
12226
|
-
protected onBaseCreating(): void;
|
12227
|
-
createRow(): QuestionRowModel;
|
12228
|
-
protected onCreating(): void;
|
12229
|
-
protected onNumChanged(value: number): void;
|
12230
|
-
dispose(): void;
|
12231
|
-
}
|
12232
|
-
}
|
12233
12223
|
declare module "survey-element" {
|
12234
12224
|
import { Base } from "base";
|
12235
12225
|
import { IAction } from "actions/action";
|
@@ -12244,6 +12234,26 @@ declare module "survey-element" {
|
|
12244
12234
|
export abstract class SurveyElementCore extends Base implements ILocalizableOwner {
|
12245
12235
|
constructor();
|
12246
12236
|
protected createLocTitleProperty(): LocalizableString;
|
12237
|
+
/**
|
12238
|
+
* Returns `true` if the survey element is a page.
|
12239
|
+
* @see Base.getType
|
12240
|
+
*/
|
12241
|
+
get isPage(): boolean;
|
12242
|
+
/**
|
12243
|
+
* Returns `true` if the survey element is a panel.
|
12244
|
+
* @see Base.getType
|
12245
|
+
*/
|
12246
|
+
get isPanel(): boolean;
|
12247
|
+
/**
|
12248
|
+
* Returns `true` if the survey element is a question.
|
12249
|
+
* @see Base.getType
|
12250
|
+
*/
|
12251
|
+
get isQuestion(): boolean;
|
12252
|
+
/**
|
12253
|
+
* Returns `true` if the element is a survey.
|
12254
|
+
* @see Base.getType
|
12255
|
+
*/
|
12256
|
+
get isSurvey(): boolean;
|
12247
12257
|
/**
|
12248
12258
|
* A title for the survey element. If `title` is undefined, the `name` property value is displayed instead.
|
12249
12259
|
*
|
@@ -12511,21 +12521,6 @@ declare module "survey-element" {
|
|
12511
12521
|
onFirstRendering(): void;
|
12512
12522
|
endLoadingFromJson(): void;
|
12513
12523
|
setVisibleIndex(index: number): number;
|
12514
|
-
/**
|
12515
|
-
* Returns `true` if the survey element is a page.
|
12516
|
-
* @see Base.getType
|
12517
|
-
*/
|
12518
|
-
get isPage(): boolean;
|
12519
|
-
/**
|
12520
|
-
* Returns `true` if the survey element is a panel.
|
12521
|
-
* @see Base.getType
|
12522
|
-
*/
|
12523
|
-
get isPanel(): boolean;
|
12524
|
-
/**
|
12525
|
-
* Returns `true` if the survey element is a question.
|
12526
|
-
* @see Base.getType
|
12527
|
-
*/
|
12528
|
-
get isQuestion(): boolean;
|
12529
12524
|
delete(doDispose: boolean): void;
|
12530
12525
|
locOwner: ILocalizableOwner;
|
12531
12526
|
/**
|
@@ -13290,6 +13285,8 @@ declare module "question" {
|
|
13290
13285
|
getFilteredValue(): any;
|
13291
13286
|
getFilteredName(): any;
|
13292
13287
|
get valueForSurvey(): any;
|
13288
|
+
protected valueForSurveyCore(val: any): any;
|
13289
|
+
protected valueFromDataCore(val: any): any;
|
13293
13290
|
/**
|
13294
13291
|
* Sets the question's `value` and `comment` properties to `undefined`.
|
13295
13292
|
* @see value
|
@@ -14170,6 +14167,7 @@ declare module "question_matrixdropdownbase" {
|
|
14170
14167
|
*/
|
14171
14168
|
get cellType(): string;
|
14172
14169
|
set cellType(val: string);
|
14170
|
+
isSelectCellType(): boolean;
|
14173
14171
|
private updateColumnsCellType;
|
14174
14172
|
private updateColumnsIndexes;
|
14175
14173
|
/**
|
@@ -14476,6 +14474,7 @@ declare module "base-interfaces" {
|
|
14476
14474
|
maxTextLength: number;
|
14477
14475
|
maxOthersLength: number;
|
14478
14476
|
clearValueOnDisableItems: boolean;
|
14477
|
+
maxTimeToFinishPage: number;
|
14479
14478
|
uploadFiles(question: IQuestion, name: string, files: File[], uploadingCallback: (data: any | Array<any>, errors?: any | Array<any>) => any): any;
|
14480
14479
|
downloadFile(question: IQuestion, name: string, content: string, callback: (status: string, data: any) => any): any;
|
14481
14480
|
clearFiles(question: IQuestion, name: string, value: any, fileName: string, clearCallback: (status: string, data: any) => any): any;
|
@@ -14636,6 +14635,7 @@ declare module "base-interfaces" {
|
|
14636
14635
|
elements: Array<IElement>;
|
14637
14636
|
ensureRowsVisibility(): void;
|
14638
14637
|
validateContainerOnly(): void;
|
14638
|
+
onQuestionValueChanged(el: IElement): void;
|
14639
14639
|
}
|
14640
14640
|
export interface IPage extends IPanel, IConditionRunner {
|
14641
14641
|
isStartPage: boolean;
|
@@ -16230,6 +16230,7 @@ declare module "settings" {
|
|
16230
16230
|
[key: string]: RegExp;
|
16231
16231
|
};
|
16232
16232
|
};
|
16233
|
+
storeUtcDates: boolean;
|
16233
16234
|
};
|
16234
16235
|
}
|
16235
16236
|
declare module "question_matrixdropdown" {
|
@@ -16310,7 +16311,6 @@ declare module "dropdownListModel" {
|
|
16310
16311
|
protected readonly itemSelector = ".sv-list__item";
|
16311
16312
|
protected getFocusFirstInputSelector(): string;
|
16312
16313
|
private itemsSettings;
|
16313
|
-
private isRunningLoadQuestionChoices;
|
16314
16314
|
protected listModel: ListModel<ItemValue>;
|
16315
16315
|
protected popupCssClasses: string;
|
16316
16316
|
protected listModelFilterStringChanged: (newValue: string) => void;
|
@@ -17507,16 +17507,16 @@ declare module "question_comment" {
|
|
17507
17507
|
* Default value: `false` (inherited from `SurveyModel`'s [`autoGrowComment`](https://surveyjs.io/form-library/documentation/surveymodel#autoGrowComment) property)
|
17508
17508
|
* @see allowResize
|
17509
17509
|
*/
|
17510
|
-
get autoGrow(): boolean;
|
17511
|
-
set autoGrow(val: boolean);
|
17510
|
+
get autoGrow(): boolean | undefined;
|
17511
|
+
set autoGrow(val: boolean | undefined);
|
17512
|
+
get renderedAutoGrow(): boolean;
|
17512
17513
|
/**
|
17513
|
-
* Specifies whether to display a resize handle for the comment area.
|
17514
17514
|
*
|
17515
17515
|
* Default value: `true` (inherited from `SurveyModel`'s [`allowResizeComment`](https://surveyjs.io/form-library/documentation/surveymodel#allowResizeComment) property)
|
17516
17516
|
* @see autoGrow
|
17517
17517
|
*/
|
17518
|
-
get allowResize(): boolean;
|
17519
|
-
set allowResize(val: boolean);
|
17518
|
+
get allowResize(): boolean | undefined;
|
17519
|
+
set allowResize(val: boolean | undefined);
|
17520
17520
|
get renderedAllowResize(): boolean;
|
17521
17521
|
get resizeStyle(): "none" | "both";
|
17522
17522
|
getType(): string;
|
@@ -27353,6 +27353,15 @@ declare module "react/components/loading-indicator" {
|
|
27353
27353
|
render(): JSX.Element | null;
|
27354
27354
|
}
|
27355
27355
|
}
|
27356
|
+
declare module "react/components/file/file-choose-button" {
|
27357
|
+
import { ReactSurveyElement } from "react/reactquestion_element";
|
27358
|
+
import { QuestionFileModel } from "entries/core";
|
27359
|
+
export class SurveyFileChooseButton extends ReactSurveyElement {
|
27360
|
+
constructor(props: any);
|
27361
|
+
protected get question(): QuestionFileModel;
|
27362
|
+
render(): JSX.Element;
|
27363
|
+
}
|
27364
|
+
}
|
27356
27365
|
declare module "react/reactquestion_file" {
|
27357
27366
|
import { QuestionFileModel } from "entries/core";
|
27358
27367
|
import { SurveyQuestionElementBase } from "react/reactquestion_element";
|
@@ -27368,15 +27377,6 @@ declare module "react/reactquestion_file" {
|
|
27368
27377
|
protected renderVideo(): JSX.Element;
|
27369
27378
|
}
|
27370
27379
|
}
|
27371
|
-
declare module "react/components/file/file-choose-button" {
|
27372
|
-
import { ReactSurveyElement } from "react/reactquestion_element";
|
27373
|
-
import { QuestionFileModel } from "entries/core";
|
27374
|
-
export class SurveyFileChooseButton extends ReactSurveyElement {
|
27375
|
-
constructor(props: any);
|
27376
|
-
protected get question(): QuestionFileModel;
|
27377
|
-
render(): JSX.Element;
|
27378
|
-
}
|
27379
|
-
}
|
27380
27380
|
declare module "react/components/file/file-preview" {
|
27381
27381
|
import { SurveyElementBase } from "react/reactquestion_element";
|
27382
27382
|
import { QuestionFileModel } from "entries/core";
|